Skip to content

Commit

Permalink
Add mount options AllowDev and AllowSUID
Browse files Browse the repository at this point in the history
fixes #114

Docker-DCO-1.1-Signed-off-by: Josh Hawn <[email protected]> (github: jlhawn)
  • Loading branch information
Josh Hawn authored and tv42 committed Jun 6, 2016
1 parent ba03ef5 commit 0dfaa72
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,24 @@ func AllowRoot() MountOption {
}
}

// AllowDev enables interpreting character or block special devices on the
// filesystem.
func AllowDev() MountOption {
return func(conf *mountConfig) error {
conf.options["dev"] = ""
return nil
}
}

// AllowSUID allows set-user-identifier or set-group-identifier bits to take
// effect.
func AllowSUID() MountOption {
return func(conf *mountConfig) error {
conf.options["suid"] = ""
return nil
}
}

// DefaultPermissions makes the kernel enforce access control based on
// the file mode (as in chmod).
//
Expand Down

0 comments on commit 0dfaa72

Please sign in to comment.