lkml.org 
[lkml]   [2012]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 08/11] userns: Convert squashfs to use kuid/kgid where appropriate
    From: "Eric W. Biederman" <ebiederm@xmission.com>

    Cc: Phillip Lougher <phillip@squashfs.org.uk>
    Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
    Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
    ---
    fs/squashfs/inode.c | 8 ++++++--
    init/Kconfig | 1 -
    2 files changed, 6 insertions(+), 3 deletions(-)

    diff --git a/fs/squashfs/inode.c b/fs/squashfs/inode.c
    index 81afbcc..a1ce5ce 100644
    --- a/fs/squashfs/inode.c
    +++ b/fs/squashfs/inode.c
    @@ -56,16 +56,20 @@
    static int squashfs_new_inode(struct super_block *sb, struct inode *inode,
    struct squashfs_base_inode *sqsh_ino)
    {
    + uid_t i_uid;
    + gid_t i_gid;
    int err;

    - err = squashfs_get_id(sb, le16_to_cpu(sqsh_ino->uid), &inode->i_uid);
    + err = squashfs_get_id(sb, le16_to_cpu(sqsh_ino->uid), &i_uid);
    if (err)
    return err;

    - err = squashfs_get_id(sb, le16_to_cpu(sqsh_ino->guid), &inode->i_gid);
    + err = squashfs_get_id(sb, le16_to_cpu(sqsh_ino->guid), &i_gid);
    if (err)
    return err;

    + i_uid_write(inode, i_uid);
    + i_gid_write(inode, i_gid);
    inode->i_ino = le32_to_cpu(sqsh_ino->inode_number);
    inode->i_mtime.tv_sec = le32_to_cpu(sqsh_ino->mtime);
    inode->i_atime.tv_sec = inode->i_mtime.tv_sec;
    diff --git a/init/Kconfig b/init/Kconfig
    index 8b11f29..d88f945 100644
    --- a/init/Kconfig
    +++ b/init/Kconfig
    @@ -939,7 +939,6 @@ config UIDGID_CONVERTED
    depends on NFSD = n
    depends on NFS_FS = n
    depends on OCFS2_FS = n
    - depends on SQUASHFS = n
    depends on UBIFS_FS = n
    depends on UDF_FS = n
    depends on UFS_FS = n
    --
    1.7.5.4


    \
     
     \ /
      Last update: 2012-09-22 04:21    [W:0.028 / U:30.044 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site