2017-05-19 14:46:13 +00:00
|
|
|
// +build cmount
|
2017-05-07 19:48:17 +00:00
|
|
|
// +build cgo
|
|
|
|
// +build linux darwin freebsd
|
|
|
|
|
|
|
|
package cmount
|
|
|
|
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
|
2017-05-08 16:10:15 +00:00
|
|
|
const commandName = "cmount"
|
|
|
|
|
2017-05-07 19:48:17 +00:00
|
|
|
func init() {
|
|
|
|
umask = unix.Umask(0) // read the umask
|
|
|
|
unix.Umask(umask) // set it back to what it was
|
|
|
|
uid = uint32(unix.Geteuid())
|
|
|
|
gid = uint32(unix.Getegid())
|
|
|
|
commandDefintion.Flags().Uint32VarP(&uid, "uid", "", uid, "Override the uid field set by the filesystem.")
|
|
|
|
commandDefintion.Flags().Uint32VarP(&gid, "gid", "", gid, "Override the gid field set by the filesystem.")
|
|
|
|
}
|