aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-05-18 16:01:30 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2006-06-20 05:25:25 -0400
commitd8945bb51a2bb6623cfa36b9ff63594f46d513aa (patch)
treeb369c9b853e90790a04baa70ee66a2ef9e15fd18 /kernel
parente0182909297da8d38a5d473ae7bee3d0324632a1 (diff)
[PATCH] inline more audit helpers
pull checks for ->audit_context into inlined wrappers Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/auditsc.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index fa4bf9625456..05d31ee4f3dd 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -922,11 +922,11 @@ void audit_syscall_exit(int valid, long return_code)
922 * Add a name to the list of audit names for this context. 922 * Add a name to the list of audit names for this context.
923 * Called from fs/namei.c:getname(). 923 * Called from fs/namei.c:getname().
924 */ 924 */
925void audit_getname(const char *name) 925void __audit_getname(const char *name)
926{ 926{
927 struct audit_context *context = current->audit_context; 927 struct audit_context *context = current->audit_context;
928 928
929 if (!context || IS_ERR(name) || !name) 929 if (IS_ERR(name) || !name)
930 return; 930 return;
931 931
932 if (!context->in_syscall) { 932 if (!context->in_syscall) {
@@ -1189,14 +1189,11 @@ uid_t audit_get_loginuid(struct audit_context *ctx)
1189 * 1189 *
1190 * Returns 0 for success or NULL context or < 0 on error. 1190 * Returns 0 for success or NULL context or < 0 on error.
1191 */ 1191 */
1192int audit_ipc_obj(struct kern_ipc_perm *ipcp) 1192int __audit_ipc_obj(struct kern_ipc_perm *ipcp)
1193{ 1193{
1194 struct audit_aux_data_ipcctl *ax; 1194 struct audit_aux_data_ipcctl *ax;
1195 struct audit_context *context = current->audit_context; 1195 struct audit_context *context = current->audit_context;
1196 1196
1197 if (likely(!context))
1198 return 0;
1199
1200 ax = kmalloc(sizeof(*ax), GFP_ATOMIC); 1197 ax = kmalloc(sizeof(*ax), GFP_ATOMIC);
1201 if (!ax) 1198 if (!ax)
1202 return -ENOMEM; 1199 return -ENOMEM;
@@ -1221,14 +1218,11 @@ int audit_ipc_obj(struct kern_ipc_perm *ipcp)
1221 * 1218 *
1222 * Returns 0 for success or NULL context or < 0 on error. 1219 * Returns 0 for success or NULL context or < 0 on error.
1223 */ 1220 */
1224int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) 1221int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode)
1225{ 1222{
1226 struct audit_aux_data_ipcctl *ax; 1223 struct audit_aux_data_ipcctl *ax;
1227 struct audit_context *context = current->audit_context; 1224 struct audit_context *context = current->audit_context;
1228 1225
1229 if (likely(!context))
1230 return 0;
1231
1232 ax = kmalloc(sizeof(*ax), GFP_ATOMIC); 1226 ax = kmalloc(sizeof(*ax), GFP_ATOMIC);
1233 if (!ax) 1227 if (!ax)
1234 return -ENOMEM; 1228 return -ENOMEM;