diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2008-02-06 20:25:06 -0500 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@opteron.homeip.net> | 2008-02-06 20:25:06 -0500 |
commit | d199d652c513a010145a5a0d4e64c96361b97bee (patch) | |
tree | b771aa8c4facd0a35ed46c70d79853cd50fb4a20 /fs/9p | |
parent | 7c7d90f2dda6daec5a6aaf8f97aacc10ee4deb77 (diff) |
9p: add support for sticky bit
GDM gets unhappy if /var/gdm doesn't have the sticky bit set. This patch adds
support for the sticky bit in much the same way setuid/setgid is supported.
With this patch, I can launch X from a v9fs rootfs (although I quickly run out
of fds in the server once gnome starts up).
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Acked-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p')
-rw-r--r-- | fs/9p/vfs_inode.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 23581bcb599b..5c5137c11484 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -77,6 +77,8 @@ static int unixmode2p9mode(struct v9fs_session_info *v9ses, int mode) | |||
77 | res |= P9_DMSETUID; | 77 | res |= P9_DMSETUID; |
78 | if ((mode & S_ISGID) == S_ISGID) | 78 | if ((mode & S_ISGID) == S_ISGID) |
79 | res |= P9_DMSETGID; | 79 | res |= P9_DMSETGID; |
80 | if ((mode & S_ISVTX) == S_ISVTX) | ||
81 | res |= P9_DMSETVTX; | ||
80 | if ((mode & P9_DMLINK)) | 82 | if ((mode & P9_DMLINK)) |
81 | res |= P9_DMLINK; | 83 | res |= P9_DMLINK; |
82 | } | 84 | } |
@@ -119,6 +121,9 @@ static int p9mode2unixmode(struct v9fs_session_info *v9ses, int mode) | |||
119 | 121 | ||
120 | if ((mode & P9_DMSETGID) == P9_DMSETGID) | 122 | if ((mode & P9_DMSETGID) == P9_DMSETGID) |
121 | res |= S_ISGID; | 123 | res |= S_ISGID; |
124 | |||
125 | if ((mode & P9_DMSETVTX) == P9_DMSETVTX) | ||
126 | res |= S_ISVTX; | ||
122 | } | 127 | } |
123 | 128 | ||
124 | return res; | 129 | return res; |