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.
This commit is contained in:
Roland McGrath 2005-02-02 04:36:11 +00:00
parent dc26fffa8a
commit cbd3358a62

View File

@ -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]);