diff options
author | Roland McGrath <roland@redhat.com> | 2005-02-02 04:36:11 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2005-02-02 04:36:11 +0000 |
commit | cbd3358a62fad460923d1626a220b6396e1fdd9f (patch) | |
tree | 400e7ad59abbf4bcbd7ba281a169c6c5606c4e00 /system.c | |
parent | dc26fffa8a82d318703bcf524ec2e1e66f9ce4b3 (diff) | |
download | strace-cbd3358a62fad460923d1626a220b6396e1fdd9f.tar.gz strace-cbd3358a62fad460923d1626a220b6396e1fdd9f.tar.bz2 strace-cbd3358a62fad460923d1626a220b6396e1fdd9f.tar.xz |
2005-02-01 Roland McGrath <roland@redhat.com>
* system.c [LINUX] (MS_MANDLOCK, MS_NOATIME, MS_NODIRATIME, MS_BIND,
MS_MOVE, MS_REC, MS_VERBOSE, MS_POSIXACL, MS_ACTIVE, MS_NOUSER):
New macros.
[LINUX] (mount_flags): Add them.
[LINUX] (sys_mount): If any of (MS_BIND|MS_MOVE|MS_REMOUNT) bits are
set in the flags argument, don't try to fetch the filesystem string.
Fixes RH#141932.
Diffstat (limited to 'system.c')
-rw-r--r-- | system.c | 42 |
1 files changed, 31 insertions, 11 deletions
@@ -36,12 +36,23 @@ #define _LINUX_SOCKET_H #define _LINUX_FS_H -#define MS_RDONLY 1 /* Mount read-only */ -#define MS_NOSUID 2 /* Ignore suid and sgid bits */ -#define MS_NODEV 4 /* Disallow access to device special files */ -#define MS_NOEXEC 8 /* Disallow program execution */ -#define MS_SYNCHRONOUS 16 /* Writes are synced at once */ -#define MS_REMOUNT 32 /* Alter flags of a mounted FS */ +#define MS_RDONLY 1 /* Mount read-only */ +#define MS_NOSUID 2 /* Ignore suid and sgid bits */ +#define MS_NODEV 4 /* Disallow access to device special files */ +#define MS_NOEXEC 8 /* Disallow program execution */ +#define MS_SYNCHRONOUS 16 /* Writes are synced at once */ +#define MS_REMOUNT 32 /* Alter flags of a mounted FS */ +#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */ +#define MS_DIRSYNC 128 /* Directory modifications are synchronous */ +#define MS_NOATIME 1024 /* Do not update access times. */ +#define MS_NODIRATIME 2048 /* Do not update directory access times */ +#define MS_BIND 4096 +#define MS_MOVE 8192 +#define MS_REC 16384 +#define MS_VERBOSE 32768 +#define MS_POSIXACL (1<<16) /* VFS does not apply the umask */ +#define MS_ACTIVE (1<<30) +#define MS_NOUSER (1<<31) #include <sys/socket.h> #include <netinet/in.h> @@ -72,12 +83,18 @@ static const struct xlat mount_flags[] = { { MS_NOSUID, "MS_NOSUID" }, { MS_NODEV, "MS_NODEV" }, { MS_NOEXEC, "MS_NOEXEC" }, -#ifdef MS_SYNCHRONOUS { MS_SYNCHRONOUS,"MS_SYNCHRONOUS"}, -#else - { MS_SYNC, "MS_SYNC" }, -#endif { MS_REMOUNT, "MS_REMOUNT" }, + { MS_MANDLOCK, "MS_MANDLOCK" }, + { MS_NOATIME, "MS_NOATIME" }, + { MS_NODIRATIME,"MS_NODIRATIME" }, + { MS_BIND, "MS_BIND" }, + { MS_MOVE, "MS_MOVE" }, + { MS_REC, "MS_REC" }, + { MS_VERBOSE, "MS_VERBOSE" }, + { MS_POSIXACL, "MS_POSIXACL" }, + { MS_ACTIVE, "MS_ACTIVE" }, + { MS_NOUSER, "MS_NOUSER" }, { 0, NULL }, }; @@ -90,7 +107,10 @@ struct tcb *tcp; tprintf(", "); printpath(tcp, tcp->u_arg[1]); tprintf(", "); - printpath(tcp, tcp->u_arg[2]); + if ((tcp->u_arg[3] & (MS_BIND|MS_MOVE|MS_REMOUNT)) == 0) + printpath(tcp, tcp->u_arg[2]); + else + tprintf("%#lx", tcp->u_arg[2]); tprintf(", "); printflags(mount_flags, tcp->u_arg[3]); tprintf(", %#lx", tcp->u_arg[4]); |