Skip to contentSkip to conversation

Make IPC mode consistent

PATCH In review Steve Grubb 2 participants 2 messages May 29, 2007 – Jul 17, 2007 Audit

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make IPC mode consistent

Hi,

The mode fields for IPC records are not consistent. Some are hex, others are octal. This patch makes them all octal.

kernel/auditsc.c +2 -2
diff -urp linux-2.6.18.i686.orig/kernel/auditsc.c linux-2.6.18.i686/kernel/auditsc.c
@@ -941,7 +941,7 @@ static void audit_log_exit(struct audit_
 		case AUDIT_IPC: {
 			struct audit_aux_data_ipcctl *axi = (void *)aux;
 			audit_log_format(ab, 
-				 "ouid=%u ogid=%u mode=%x",
+				 "ouid=%u ogid=%u mode=%#o",
 				 axi->uid, axi->gid, axi->mode);
 			if (axi->osid != 0) {
 				char *ctx = NULL;
@@ -960,7 +960,7 @@ static void audit_log_exit(struct audit_
 		case AUDIT_IPC_SET_PERM: {
 			struct audit_aux_data_ipcctl *axi = (void *)aux;
 			audit_log_format(ab,
-				"qbytes=%lx ouid=%u ogid=%u mode=%x",
+				"qbytes=%lx ouid=%u ogid=%u mode=%#o",
 				axi->qbytes, axi->uid, axi->gid, axi->mode);
 			break; }
 
#1 lore raw

Steve,

Quoted 6 lines · Steve Grubb

Hi,

The mode fields for IPC records are not consistent. Some are hex, others are octal. This patch makes them all octal.

Did this patch got through? There is a Novell BZ (#280257 - unfortunatelly not public at this time) waiting for this to get upstream.

Thanks,

Klaus

Quoted 23 lines

diff -urp linux-2.6.18.i686.orig/kernel/auditsc.c
linux-2.6.18.i686/kernel/auditsc.c
--- linux-2.6.18.i686.orig/kernel/auditsc.c 2007-05-29 10:27:13.000000000
-0400
+++ linux-2.6.18.i686/kernel/auditsc.c 2007-05-29 10:33:07.000000000 -0400

kernel/auditsc.c +2 -2
@@ -941,7 +941,7 @@ static void audit_log_exit(struct audit_
 case AUDIT_IPC: {
 struct audit_aux_data_ipcctl *axi = (void *)aux;
 audit_log_format(ab,
-                              "ouid=%u ogid=%u mode=%x",
+                              "ouid=%u ogid=%u mode=%#o",
 axi->uid, axi->gid, axi->mode);
 if (axi->osid != 0) {
 char *ctx = NULL;
@@ -960,7 +960,7 @@ static void audit_log_exit(struct audit_
 case AUDIT_IPC_SET_PERM: {
 struct audit_aux_data_ipcctl *axi = (void *)aux;
 audit_log_format(ab,
-                             "qbytes=%lx ouid=%u ogid=%u mode=%x",
+                             "qbytes=%lx ouid=%u ogid=%u mode=%#o",
 axi->qbytes, axi->uid, axi->gid, axi->mode);
 break; }
Signature · 1 line
.:klaus h kiwi <[email protected]>:.