selinux: fix build warning by removing the unused sid variable
Subsystems (2)
PATCH 1/2 selinux: fix build warning by removing the unused sid variable
This patch remove the unused variable sid
This fix the following build warning:security/selinux/hooks.c:2921:6: warning: variable 'sid' set but not used [-Wunused-but-set-variable]
--- security/selinux/hooks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
security/selinux/hooks.c +1 -2
@@ -2918,13 +2918,12 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir, {const struct task_security_struct *tsec =current_security ();struct superblock_security_struct *sbsec; -u32 sid, newsid, clen; +u32 newsid, clen;int rc;char *context; sbsec = dir->i_sb->s_security; - sid = tsec->sid; newsid = tsec->create_sid; rc = selinux_determine_inode_label(current_security(),
Signature · 6 lines
2.13.6 -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 selinux: fix build warning
This patch make selinux_task_prlimit() static since it is not used
anywhere else.
This fix the following build warning:security/selinux/hooks.c:3981:5: warning: no previous prototype for 'selinux_task_prlimit' [-Wmissing-prototypes]
--- security/selinux/hooks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
security/selinux/hooks.c +2 -2
@@ -3977,8 +3977,8 @@ static int selinux_task_getioprio(struct task_struct *p) PROCESS__GETSCHED, NULL); } -int selinux_task_prlimit (const struct cred *cred,const struct cred *tcred, -unsigned int flags) +static int selinux_task_prlimit (const struct cred *cred,const struct cred *tcred, +unsigned int flags) {u32 av =0 ;
Signature · 6 lines
2.13.6 -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · Corentin Labbe
This patch remove the unused variable sid
This fix the following build warning:security/selinux/hooks.c:2921:6: warning: variable 'sid' set but not used [-Wunused-but-set-variable]Signed-off-by Corentin Labbe <[email protected]>
Quoted 22 lines
---
?security/selinux/hooks.c | 3 +--
?1 file changed, 1 insertion(+), 2 deletions(-)security/selinux/hooks.c +0
-0@@ -2918,13 +2918,12 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir, ?{? const struct
task_security_struct*tsec =current_security();
? structsuperblock_security_struct*sbsec;security/selinux/hooks.c +1
-1-u32 sid, newsid, clen; +u32 newsid, clen;? int rc;
? char *context;
?
? sbsec =dir->i_sb->s_security;
?security/selinux/hooks.c +0
-1- sid = tsec->sid;
Quoted 3 lines
? newsid =
tsec->create_sid;
?
? rc = selinux_determine_inode_label(current_security(),
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] selinux: fix build warning
In reply to Corentin LabbeQuoted 7 lines · Corentin Labbe
This patch make
selinux_task_prlimit()static since it is not used anywhere else.
This fix the following build warning:security/selinux/hooks.c:3981:5: warning: no previous prototype for 'selinux_task_prlimit' [-Wmissing-prototypes]Signed-off-by Corentin Labbe <[email protected]>
Quoted 19 lines
---
?security/selinux/hooks.c | 4 ++--
?1 file changed, 2 insertions(+), 2 deletions(-)security/selinux/hooks.c +0
-0@@ -3977,8 +3977,8 @@ static int selinux_task_getioprio(struct task_struct *p) ? ????PROCESS__GETSCHED, NULL); ?}?
-int selinux_task_prlimit(const struct cred *cred, const struct cred *tcred,security/selinux/hooks.c +1
-1- ?unsigned int flags) +static int selinux_task_prlimit(const struct cred *cred, conststruct cred *tcred,
security/selinux/hooks.c +1
-0+ unsigned int flags)
Quoted 3 lines
?{
? u32 av = 0;
?
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Paul Moore
maintainerQuoted 9 lines · Stephen Smalley
Quoted 6 lines · Corentin Labbe
This patch remove the unused variable sid
This fix the following build warning:security/selinux/hooks.c:2921:6: warning: variable 'sid' set but not used [-Wunused-but-set-variable]Signed-off-by Corentin Labbe <[email protected]>Acked-by Stephen Smalley <[email protected]>
Looks good to me too, merged into selinux/next. Thanks.
Signature · 6 lines
paul moore www.paul-moore.com -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] selinux: fix build warning
In reply to Stephen SmalleyQuoted 10 lines · Stephen Smalley
Quoted 7 lines · Corentin Labbe
This patch make
selinux_task_prlimit()static since it is not used anywhere else.
This fix the following build warning:security/selinux/hooks.c:3981:5: warning: no previous prototype for 'selinux_task_prlimit' [-Wmissing-prototypes]Signed-off-by Corentin Labbe <[email protected]>Acked-by Stephen Smalley <[email protected]>
Merged, thanks again.
Signature · 6 lines
paul moore www.paul-moore.com -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html