Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357840
b: refs/heads/master
c: 4a2c8cf
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman committed Feb 13, 2013
1 parent f80a525 commit c26bfc5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6d4a083205c27bc2e2a1c03dff4acf2fe457d1c4
refs/heads/master: 4a2c8cf56953a6ebe3c8671433607b7f96f200d5
4 changes: 2 additions & 2 deletions trunk/fs/cifs/cifsglob.h
Original file line number Diff line number Diff line change
Expand Up @@ -1245,8 +1245,8 @@ struct cifs_fattr {
u64 cf_eof;
u64 cf_bytes;
u64 cf_createtime;
uid_t cf_uid;
gid_t cf_gid;
kuid_t cf_uid;
kgid_t cf_gid;
umode_t cf_mode;
dev_t cf_rdev;
unsigned int cf_nlink;
Expand Down
14 changes: 10 additions & 4 deletions trunk/fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,15 +247,21 @@ cifs_unix_basic_to_fattr(struct cifs_fattr *fattr, FILE_UNIX_BASIC_INFO *info,
fattr->cf_uid = cifs_sb->mnt_uid;
if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID)) {
u64 id = le64_to_cpu(info->Uid);
if (id < ((uid_t)-1))
fattr->cf_uid = id;
if (id < ((uid_t)-1)) {
kuid_t uid = make_kuid(&init_user_ns, id);
if (uid_valid(uid))
fattr->cf_uid = uid;
}
}

fattr->cf_gid = cifs_sb->mnt_gid;
if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID)) {
u64 id = le64_to_cpu(info->Gid);
if (id < ((gid_t)-1))
fattr->cf_gid = id;
if (id < ((gid_t)-1)) {
kgid_t gid = make_kgid(&init_user_ns, id);
if (gid_valid(gid))
fattr->cf_gid = gid;
}
}

fattr->cf_nlink = le64_to_cpu(info->Nlinks);
Expand Down

0 comments on commit c26bfc5

Please sign in to comment.