diff options
| author | Casey Schaufler <casey@schaufler-ca.com> | 2011-09-29 21:21:01 -0400 |
|---|---|---|
| committer | Casey Schaufler <cschaufler@cschaufler-intel.(none)> | 2011-10-12 17:26:07 -0400 |
| commit | ce8a432197d9892689eb4896f690b9fe6b3de598 (patch) | |
| tree | 09dff875df15be3a36f3e0dcb760d0064d4da935 /security | |
| parent | 531f1d453ed8a8acee4015bd64e7bcc2eab939e4 (diff) | |
Smack: Clean up comments
There are a number of comments in the Smack code that
are either malformed or include code. This patch cleans
them up.
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'security')
| -rw-r--r-- | security/smack/smack.h | 5 | ||||
| -rw-r--r-- | security/smack/smack_lsm.c | 10 | ||||
| -rw-r--r-- | security/smack/smackfs.c | 7 |
3 files changed, 10 insertions, 12 deletions
diff --git a/security/smack/smack.h b/security/smack/smack.h index 174d3be9aaee..9da2b2dfdefb 100644 --- a/security/smack/smack.h +++ b/security/smack/smack.h | |||
| @@ -156,7 +156,6 @@ struct smack_known { | |||
| 156 | 156 | ||
| 157 | /* | 157 | /* |
| 158 | * smackfs magic number | 158 | * smackfs magic number |
| 159 | * smackfs macic number | ||
| 160 | */ | 159 | */ |
| 161 | #define SMACK_MAGIC 0x43415d53 /* "SMAC" */ | 160 | #define SMACK_MAGIC 0x43415d53 /* "SMAC" */ |
| 162 | 161 | ||
| @@ -182,9 +181,9 @@ struct smack_known { | |||
| 182 | #define MAY_NOT 0 | 181 | #define MAY_NOT 0 |
| 183 | 182 | ||
| 184 | /* | 183 | /* |
| 185 | * Number of access types used by Smack (rwxa) | 184 | * Number of access types used by Smack (rwxat) |
| 186 | */ | 185 | */ |
| 187 | #define SMK_NUM_ACCESS_TYPE 4 | 186 | #define SMK_NUM_ACCESS_TYPE 5 |
| 188 | 187 | ||
| 189 | /* | 188 | /* |
| 190 | * Smack audit data; is empty if CONFIG_AUDIT not set | 189 | * Smack audit data; is empty if CONFIG_AUDIT not set |
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 2e71c3f445fc..6a8226541327 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c | |||
| @@ -441,6 +441,12 @@ static int smack_sb_umount(struct vfsmount *mnt, int flags) | |||
| 441 | * BPRM hooks | 441 | * BPRM hooks |
| 442 | */ | 442 | */ |
| 443 | 443 | ||
| 444 | /** | ||
| 445 | * smack_bprm_set_creds - set creds for exec | ||
| 446 | * @bprm: the exec information | ||
| 447 | * | ||
| 448 | * Returns 0 if it gets a blob, -ENOMEM otherwise | ||
| 449 | */ | ||
| 444 | static int smack_bprm_set_creds(struct linux_binprm *bprm) | 450 | static int smack_bprm_set_creds(struct linux_binprm *bprm) |
| 445 | { | 451 | { |
| 446 | struct task_smack *tsp = bprm->cred->security; | 452 | struct task_smack *tsp = bprm->cred->security; |
| @@ -844,7 +850,7 @@ static void smack_inode_post_setxattr(struct dentry *dentry, const char *name, | |||
| 844 | return; | 850 | return; |
| 845 | } | 851 | } |
| 846 | 852 | ||
| 847 | /* | 853 | /** |
| 848 | * smack_inode_getxattr - Smack check on getxattr | 854 | * smack_inode_getxattr - Smack check on getxattr |
| 849 | * @dentry: the object | 855 | * @dentry: the object |
| 850 | * @name: unused | 856 | * @name: unused |
| @@ -861,7 +867,7 @@ static int smack_inode_getxattr(struct dentry *dentry, const char *name) | |||
| 861 | return smk_curacc(smk_of_inode(dentry->d_inode), MAY_READ, &ad); | 867 | return smk_curacc(smk_of_inode(dentry->d_inode), MAY_READ, &ad); |
| 862 | } | 868 | } |
| 863 | 869 | ||
| 864 | /* | 870 | /** |
| 865 | * smack_inode_removexattr - Smack check on removexattr | 871 | * smack_inode_removexattr - Smack check on removexattr |
| 866 | * @dentry: the object | 872 | * @dentry: the object |
| 867 | * @name: name of the attribute | 873 | * @name: name of the attribute |
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index 76e520be1b5d..54f6e18dea2f 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c | |||
| @@ -104,9 +104,6 @@ const char *smack_cipso_option = SMACK_CIPSO_OPTION; | |||
| 104 | 104 | ||
| 105 | 105 | ||
| 106 | #define SEQ_READ_FINISHED ((loff_t)-1) | 106 | #define SEQ_READ_FINISHED ((loff_t)-1) |
| 107 | /* | ||
| 108 | #define SEQ_READ_FINISHED 1 | ||
| 109 | */ | ||
| 110 | 107 | ||
| 111 | /* | 108 | /* |
| 112 | * Values for parsing cipso rules | 109 | * Values for parsing cipso rules |
| @@ -475,10 +472,6 @@ static ssize_t smk_write_load(struct file *file, const char __user *buf, | |||
| 475 | if (!capable(CAP_MAC_ADMIN)) | 472 | if (!capable(CAP_MAC_ADMIN)) |
| 476 | return -EPERM; | 473 | return -EPERM; |
| 477 | 474 | ||
| 478 | /* | ||
| 479 | return smk_write_load_list(file, buf, count, ppos, &smack_rule_list, | ||
| 480 | &smack_list_lock); | ||
| 481 | */ | ||
| 482 | return smk_write_load_list(file, buf, count, ppos, NULL, NULL); | 475 | return smk_write_load_list(file, buf, count, ppos, NULL, NULL); |
| 483 | } | 476 | } |
| 484 | 477 | ||
