CRED: Wrap current->cred and a few other accessors
Wrap current->cred and a few other accessors to hide their actual implementation. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: James Morris <jmorris@namei.org> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
committed by
James Morris
parent
f1752eec61
commit
86a264abe5
@@ -667,8 +667,7 @@ smb_make_node(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
|
||||
|
||||
attr.ia_valid = ATTR_MODE | ATTR_UID | ATTR_GID;
|
||||
attr.ia_mode = mode;
|
||||
attr.ia_uid = current_euid();
|
||||
attr.ia_gid = current_egid();
|
||||
current_euid_egid(&attr.ia_uid, &attr.ia_gid);
|
||||
|
||||
if (!new_valid_dev(dev))
|
||||
return -EINVAL;
|
||||
|
Reference in New Issue
Block a user