Skip to contentSkip to conversation

SELinux: drop secondary_ops->sysctl

PATCH Applied Eric Paris 3 participants 3 messages Apr 29, 2009 SELinux security module

lore
Share & tools
lore

Eric Paris

author
#0 lore raw

PATCH 1/1 SELinux: drop secondary_ops->sysctl

We are still calling secondary_ops->sysctl even though the capabilities module does not define a sysctl operation.

---

 security/selinux/hooks.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
security/selinux/hooks.c +0 -4
index 796c16f..9af6624 100644
@@ -2050,10 +2050,6 @@ static int selinux_sysctl(ctl_table *table, int op)
 	u32 tsid, sid;
 	int rc;
 
-	rc = secondary_ops->sysctl(table, op);
-	if (rc)
-		return rc;
-
 	sid = current_sid();
 
 	rc = selinux_sysctl_get_sid(table, (op == 0001) ?

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Eric Paris

We are still calling secondary_ops->sysctl even though the capabilities module does not define a sysctl operation.

And repeating what I said back in January when the other calls to secondary_ops were removed:

At that point secondary_ops would only be used by selinux_init() to save the original security_ops pointer for use by selinux_disable() to restore the original pointer, which ideally would be handled by the security framework instead (possibly by restoring a limited unregister_security() that resets to the default_security_ops).

Quoted 20 lines

---

 security/selinux/hooks.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
security/selinux/hooks.c +0 -4
index 796c16f..9af6624 100644
@@ -2050,10 +2050,6 @@ static int selinux_sysctl(ctl_table *table, int op)
 	u32 tsid, sid;
 	int rc;
 
-	rc = secondary_ops->sysctl(table, op);
-	if (rc)
-		return rc;
-
 	sid = current_sid();
 
 	rc = selinux_sysctl_get_sid(table, (op == 0001) ?
Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
Applied
#2 lore raw
Quoted 7 lines · Stephen Smalley
Quoted 4 lines · Eric Paris

We are still calling secondary_ops->sysctl even though the capabilities module does not define a sysctl operation.

Applied.

Quoted 9 lines

And repeating what I said back in January when the other calls to secondary_ops were removed:

At that point secondary_ops would only be used by selinux_init() to save the original security_ops pointer for use by selinux_disable() to restore the original pointer, which ideally would be handled by the security framework instead (possibly by restoring a limited unregister_security() that resets to the default_security_ops).

It's listed in the TODO list:

http://selinuxproject.org/page/Kernel_Development

Signature · 7 lines
James Morris
<[email protected]>

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.