diff options
author | Denis Vlasenko | 2008-02-18 11:08:33 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-02-18 11:08:33 +0000 |
commit | c9ca0a32745a43eaa6cb6b7b460718de8ccb84f2 (patch) | |
tree | 2b4bdf035b3a3c0436ce823e137d969af4d3a06f /util-linux | |
parent | 56244736ec7d0a3c338f542204aae83fb0200346 (diff) | |
download | busybox-c9ca0a32745a43eaa6cb6b7b460718de8ccb84f2.zip busybox-c9ca0a32745a43eaa6cb6b7b460718de8ccb84f2.tar.gz |
mount: recognize "dirsync" (closes bug 835)
mount: sanitize environ if called by non-root
*: adjust for slightly different sanitize routine
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/mount.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c index dd75323..054db57 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -33,6 +33,11 @@ #ifndef MS_SILENT #define MS_SILENT (1 << 15) #endif +/* Grab more as needed from util-linux's mount/mount_constants.h */ +#ifndef MS_DIRSYNC +#define MS_DIRSYNC 128 /* Directory modifications are synchronous */ +#endif + #if defined(__dietlibc__) /* 16.12.2006, Sampo Kellomaki (sampo@iki.fi) @@ -122,6 +127,7 @@ static const int32_t mount_options[] = { /* "exec" */ ~MS_NOEXEC, /* "noexec" */ MS_NOEXEC, /* "sync" */ MS_SYNCHRONOUS, + /* "dirsync" */ MS_DIRSYNC, /* "async" */ ~MS_SYNCHRONOUS, /* "atime" */ ~MS_NOATIME, /* "noatime" */ MS_NOATIME, @@ -171,6 +177,7 @@ static const char mount_option_str[] = "exec" "\0" "noexec" "\0" "sync" "\0" + "dirsync" "\0" "async" "\0" "atime" "\0" "noatime" "\0" @@ -1665,6 +1672,8 @@ int mount_main(int argc, char **argv) SKIP_DESKTOP(const int nonroot = 0;) USE_DESKTOP( int nonroot = (getuid() != 0);) + sanitize_env_if_suid(); + /* parse long options, like --bind and --move. Note that -o option * and --option are synonymous. Yes, this means --remount,rw works. */ |