aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/auditsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r--kernel/auditsc.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index e4551659ad79..fa4bf9625456 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -648,8 +648,8 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts
648 case AUDIT_IPC: { 648 case AUDIT_IPC: {
649 struct audit_aux_data_ipcctl *axi = (void *)aux; 649 struct audit_aux_data_ipcctl *axi = (void *)aux;
650 audit_log_format(ab, 650 audit_log_format(ab,
651 " qbytes=%lx iuid=%u igid=%u mode=%x", 651 "ouid=%u ogid=%u mode=%x",
652 axi->qbytes, axi->uid, axi->gid, axi->mode); 652 axi->uid, axi->gid, axi->mode);
653 if (axi->osid != 0) { 653 if (axi->osid != 0) {
654 char *ctx = NULL; 654 char *ctx = NULL;
655 u32 len; 655 u32 len;
@@ -667,21 +667,10 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts
667 case AUDIT_IPC_SET_PERM: { 667 case AUDIT_IPC_SET_PERM: {
668 struct audit_aux_data_ipcctl *axi = (void *)aux; 668 struct audit_aux_data_ipcctl *axi = (void *)aux;
669 audit_log_format(ab, 669 audit_log_format(ab,
670 " new qbytes=%lx new iuid=%u new igid=%u new mode=%x", 670 "qbytes=%lx ouid=%u ogid=%u mode=%x",
671 axi->qbytes, axi->uid, axi->gid, axi->mode); 671 axi->qbytes, axi->uid, axi->gid, axi->mode);
672 if (axi->osid != 0) {
673 char *ctx = NULL;
674 u32 len;
675 if (selinux_ctxid_to_string(
676 axi->osid, &ctx, &len)) {
677 audit_log_format(ab, " osid=%u",
678 axi->osid);
679 call_panic = 1;
680 } else
681 audit_log_format(ab, " obj=%s", ctx);
682 kfree(ctx);
683 }
684 break; } 672 break; }
673
685 case AUDIT_EXECVE: { 674 case AUDIT_EXECVE: {
686 struct audit_aux_data_execve *axi = (void *)aux; 675 struct audit_aux_data_execve *axi = (void *)aux;
687 int i; 676 int i;
@@ -1232,7 +1221,7 @@ int audit_ipc_obj(struct kern_ipc_perm *ipcp)
1232 * 1221 *
1233 * Returns 0 for success or NULL context or < 0 on error. 1222 * Returns 0 for success or NULL context or < 0 on error.
1234 */ 1223 */
1235int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode, struct kern_ipc_perm *ipcp) 1224int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode)
1236{ 1225{
1237 struct audit_aux_data_ipcctl *ax; 1226 struct audit_aux_data_ipcctl *ax;
1238 struct audit_context *context = current->audit_context; 1227 struct audit_context *context = current->audit_context;
@@ -1248,7 +1237,6 @@ int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode,
1248 ax->uid = uid; 1237 ax->uid = uid;
1249 ax->gid = gid; 1238 ax->gid = gid;
1250 ax->mode = mode; 1239 ax->mode = mode;
1251 selinux_get_ipc_sid(ipcp, &ax->osid);
1252 1240
1253 ax->d.type = AUDIT_IPC_SET_PERM; 1241 ax->d.type = AUDIT_IPC_SET_PERM;
1254 ax->d.next = context->aux; 1242 ax->d.next = context->aux;