Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d199d652c513a010145a5a0d4e64c96361b97bee
Commit:     d199d652c513a010145a5a0d4e64c96361b97bee
Parent:     7c7d90f2dda6daec5a6aaf8f97aacc10ee4deb77
Author:     Anthony Liguori <[EMAIL PROTECTED]>
AuthorDate: Wed Feb 6 19:25:06 2008 -0600
Committer:  Eric Van Hensbergen <[EMAIL PROTECTED]>
CommitDate: Wed Feb 6 19:25:06 2008 -0600

    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 <[EMAIL PROTECTED]>
    Acked-by: Eric Van Hensbergen <[EMAIL PROTECTED]>
---
 fs/9p/vfs_inode.c   |    5 +++++
 include/net/9p/9p.h |    1 +
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 23581bc..5c5137c 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)
                        res |= P9_DMSETUID;
                if ((mode & S_ISGID) == S_ISGID)
                        res |= P9_DMSETGID;
+               if ((mode & S_ISVTX) == S_ISVTX)
+                       res |= P9_DMSETVTX;
                if ((mode & P9_DMLINK))
                        res |= P9_DMLINK;
        }
@@ -119,6 +121,9 @@ static int p9mode2unixmode(struct v9fs_session_info *v9ses, 
int mode)
 
                if ((mode & P9_DMSETGID) == P9_DMSETGID)
                        res |= S_ISGID;
+
+               if ((mode & P9_DMSETVTX) == P9_DMSETVTX)
+                       res |= S_ISVTX;
        }
 
        return res;
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index 625346c..585eb44 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -124,6 +124,7 @@ enum {
        P9_DMSOCKET = 0x00100000,
        P9_DMSETUID = 0x00080000,
        P9_DMSETGID = 0x00040000,
+       P9_DMSETVTX = 0x00010000,
 };
 
 /* qid.types */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to