selinux: remove set but not used variable 'sidtab'
security/selinux/ss/services.c: In function security_port_sid:
security/selinux/ss/services.c:2346:17: warning: variable sidtab set but not used [-Wunused-but-set-variable]
security/selinux/ss/services.c: In function security_ib_endport_sid:
security/selinux/ss/services.c:2435:17: warning: variable sidtab set but not used [-Wunused-but-set-variable]
security/selinux/ss/services.c: In function security_netif_sid:
security/selinux/ss/services.c:2480:17: warning: variable sidtab set but not used [-Wunused-but-set-variable]
security/selinux/ss/services.c: In function security_fs_use:
security/selinux/ss/services.c:2831:17: warning: variable sidtab set but not used [-Wunused-but-set-variable]
Since commit 66f8e2f03c
("selinux: sidtab reverse lookup hash table")
'sidtab' is not used any more, so remove it.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
Родитель
15b590a81f
Коммит
f126853402
|
@ -2349,14 +2349,12 @@ int security_port_sid(struct selinux_state *state,
|
|||
u8 protocol, u16 port, u32 *out_sid)
|
||||
{
|
||||
struct policydb *policydb;
|
||||
struct sidtab *sidtab;
|
||||
struct ocontext *c;
|
||||
int rc = 0;
|
||||
|
||||
read_lock(&state->ss->policy_rwlock);
|
||||
|
||||
policydb = &state->ss->policydb;
|
||||
sidtab = state->ss->sidtab;
|
||||
|
||||
c = policydb->ocontexts[OCON_PORT];
|
||||
while (c) {
|
||||
|
@ -2438,14 +2436,12 @@ int security_ib_endport_sid(struct selinux_state *state,
|
|||
const char *dev_name, u8 port_num, u32 *out_sid)
|
||||
{
|
||||
struct policydb *policydb;
|
||||
struct sidtab *sidtab;
|
||||
struct ocontext *c;
|
||||
int rc = 0;
|
||||
|
||||
read_lock(&state->ss->policy_rwlock);
|
||||
|
||||
policydb = &state->ss->policydb;
|
||||
sidtab = state->ss->sidtab;
|
||||
|
||||
c = policydb->ocontexts[OCON_IBENDPORT];
|
||||
while (c) {
|
||||
|
@ -2483,14 +2479,12 @@ int security_netif_sid(struct selinux_state *state,
|
|||
char *name, u32 *if_sid)
|
||||
{
|
||||
struct policydb *policydb;
|
||||
struct sidtab *sidtab;
|
||||
int rc = 0;
|
||||
struct ocontext *c;
|
||||
|
||||
read_lock(&state->ss->policy_rwlock);
|
||||
|
||||
policydb = &state->ss->policydb;
|
||||
sidtab = state->ss->sidtab;
|
||||
|
||||
c = policydb->ocontexts[OCON_NETIF];
|
||||
while (c) {
|
||||
|
@ -2834,7 +2828,6 @@ int security_genfs_sid(struct selinux_state *state,
|
|||
int security_fs_use(struct selinux_state *state, struct super_block *sb)
|
||||
{
|
||||
struct policydb *policydb;
|
||||
struct sidtab *sidtab;
|
||||
int rc = 0;
|
||||
struct ocontext *c;
|
||||
struct superblock_security_struct *sbsec = sb->s_security;
|
||||
|
@ -2843,7 +2836,6 @@ int security_fs_use(struct selinux_state *state, struct super_block *sb)
|
|||
read_lock(&state->ss->policy_rwlock);
|
||||
|
||||
policydb = &state->ss->policydb;
|
||||
sidtab = state->ss->sidtab;
|
||||
|
||||
c = policydb->ocontexts[OCON_FSUSE];
|
||||
while (c) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче