diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2016-11-10 22:18:27 +0100 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2016-11-14 21:25:07 +0100 |
commit | 420591128cb206201dc444c2d42fb6f299b2ecd0 (patch) | |
tree | 76936f488d1bfdf1b4ad1cab19fbfaeb6e2ed5b5 /security/selinux/hooks.c | |
parent | SELinux: Use GFP_KERNEL for selinux_parse_opts_str(). (diff) | |
download | linux-420591128cb206201dc444c2d42fb6f299b2ecd0.tar.xz linux-420591128cb206201dc444c2d42fb6f299b2ecd0.zip |
selinux: Minor cleanups
Fix the comment for function __inode_security_revalidate, which returns
an integer.
Use the LABEL_* constants consistently for isec->initialized.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index d1b141e33ecb..1c0721708ccc 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -237,6 +237,7 @@ static int inode_alloc_security(struct inode *inode) isec->sid = SECINITSID_UNLABELED; isec->sclass = SECCLASS_FILE; isec->task_sid = sid; + isec->initialized = LABEL_INVALID; inode->i_security = isec; return 0; @@ -247,7 +248,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent /* * Try reloading inode security labels that have been marked as invalid. The * @may_sleep parameter indicates when sleeping and thus reloading labels is - * allowed; when set to false, returns ERR_PTR(-ECHILD) when the label is + * allowed; when set to false, returns -ECHILD when the label is * invalid. The @opt_dentry parameter should be set to a dentry of the inode; * when no dentry is available, set it to NULL instead. */ |