]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] selinux: eliminate selinux_task_ctxid
authorStephen Smalley <sds@tycho.nsa.gov>
Tue, 26 Sep 2006 06:31:56 +0000 (23:31 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Sep 2006 15:48:52 +0000 (08:48 -0700)
Eliminate selinux_task_ctxid since it duplicates selinux_task_get_sid.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/selinux.h
kernel/auditsc.c
security/selinux/exports.c

index aad4e390d6a5e2c9ff7f3fb5b84dc8d41f2e2cb1..79e4707ca772cc90f1a07ce31b98ce53fc57ed82 100644 (file)
@@ -69,16 +69,6 @@ int selinux_audit_rule_match(u32 ctxid, u32 field, u32 op,
  */
 void selinux_audit_set_callback(int (*callback)(void));
 
-/**
- *     selinux_task_ctxid - determine a context ID for a process.
- *     @tsk: the task object
- *     @ctxid: ID value returned via this
- *
- *     On return, ctxid will contain an ID for the context.  This value
- *     should only be used opaquely.
- */
-void selinux_task_ctxid(struct task_struct *tsk, u32 *ctxid);
-
 /**
  *     selinux_ctxid_to_string - map a security context ID to a string
  *     @ctxid: security context ID to be converted.
@@ -166,11 +156,6 @@ static inline void selinux_audit_set_callback(int (*callback)(void))
        return;
 }
 
-static inline void selinux_task_ctxid(struct task_struct *tsk, u32 *ctxid)
-{
-       *ctxid = 0;
-}
-
 static inline int selinux_ctxid_to_string(u32 ctxid, char **ctx, u32 *ctxlen)
 {
        *ctx = NULL;
index 1bd8827a0102809606b8ccab55d7db185cd12fb2..331e1701039311ac79fdb1ab4a8ad96dda796a7f 100644 (file)
@@ -385,7 +385,7 @@ static int audit_filter_rules(struct task_struct *tsk,
                           logged upon error */
                        if (f->se_rule) {
                                if (need_sid) {
-                                       selinux_task_ctxid(tsk, &sid);
+                                       selinux_get_task_sid(tsk, &sid);
                                        need_sid = 0;
                                }
                                result = selinux_audit_rule_match(sid, f->type,
index 9d7737db5e51751be1b7f040dacf44ed405ec0db..ee0fb47f81ae0399da35ce8cb7ebf0a1ec5e3c7b 100644 (file)
 #include "security.h"
 #include "objsec.h"
 
-void selinux_task_ctxid(struct task_struct *tsk, u32 *ctxid)
-{
-       struct task_security_struct *tsec = tsk->security;
-       if (selinux_enabled)
-               *ctxid = tsec->sid;
-       else
-               *ctxid = 0;
-}
-
 int selinux_ctxid_to_string(u32 ctxid, char **ctx, u32 *ctxlen)
 {
        if (selinux_enabled)