diff options
author | Steve Grubb <sgrubb@redhat.com> | 2005-05-20 19:22:31 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-05-20 19:22:31 -0400 |
commit | 326e9c8ba6a149f47e020719b23b24a14ba740d6 (patch) | |
tree | 279ace274d6a5e7c696c95f397bfbf5d5d5c347a /kernel | |
parent | 05474106a41f44d16d649bc8c7687fc24ce4370a (diff) |
AUDIT: Fix inconsistent use of loginuid vs. auid, signed vs. unsigned
The attached patch changes all occurrences of loginuid to auid. It also
changes everything to %u that is an unsigned type.
Signed-off-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/audit.c | 7 | ||||
-rw-r--r-- | kernel/auditsc.c | 12 |
2 files changed, 8 insertions, 11 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index 5e72895f4826..f0a003acf621 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -439,12 +439,9 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
439 | if (!ab) | 439 | if (!ab) |
440 | break; /* audit_panic has been called */ | 440 | break; /* audit_panic has been called */ |
441 | audit_log_format(ab, | 441 | audit_log_format(ab, |
442 | "user pid=%d uid=%d length=%d loginuid=%u" | 442 | "user pid=%d uid=%u auid=%u" |
443 | " msg='%.1024s'", | 443 | " msg='%.1024s'", |
444 | pid, uid, | 444 | pid, uid, loginuid, (char *)data); |
445 | (int)(nlh->nlmsg_len | ||
446 | - ((char *)data - (char *)nlh)), | ||
447 | loginuid, (char *)data); | ||
448 | audit_set_pid(ab, pid); | 445 | audit_set_pid(ab, pid); |
449 | audit_log_end(ab); | 446 | audit_log_end(ab); |
450 | break; | 447 | break; |
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 8dc5b2767145..4193811d4fe1 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -688,9 +688,9 @@ static void audit_log_exit(struct audit_context *context) | |||
688 | context->return_code); | 688 | context->return_code); |
689 | audit_log_format(ab, | 689 | audit_log_format(ab, |
690 | " a0=%lx a1=%lx a2=%lx a3=%lx items=%d" | 690 | " a0=%lx a1=%lx a2=%lx a3=%lx items=%d" |
691 | " pid=%d loginuid=%d uid=%d gid=%d" | 691 | " pid=%d auid=%u uid=%u gid=%u" |
692 | " euid=%d suid=%d fsuid=%d" | 692 | " euid=%u suid=%u fsuid=%u" |
693 | " egid=%d sgid=%d fsgid=%d", | 693 | " egid=%u sgid=%u fsgid=%u", |
694 | context->argv[0], | 694 | context->argv[0], |
695 | context->argv[1], | 695 | context->argv[1], |
696 | context->argv[2], | 696 | context->argv[2], |
@@ -717,7 +717,7 @@ static void audit_log_exit(struct audit_context *context) | |||
717 | case AUDIT_IPC: { | 717 | case AUDIT_IPC: { |
718 | struct audit_aux_data_ipcctl *axi = (void *)aux; | 718 | struct audit_aux_data_ipcctl *axi = (void *)aux; |
719 | audit_log_format(ab, | 719 | audit_log_format(ab, |
720 | " qbytes=%lx iuid=%d igid=%d mode=%x", | 720 | " qbytes=%lx iuid=%u igid=%u mode=%x", |
721 | axi->qbytes, axi->uid, axi->gid, axi->mode); | 721 | axi->qbytes, axi->uid, axi->gid, axi->mode); |
722 | break; } | 722 | break; } |
723 | 723 | ||
@@ -761,7 +761,7 @@ static void audit_log_exit(struct audit_context *context) | |||
761 | } | 761 | } |
762 | if (context->names[i].ino != (unsigned long)-1) | 762 | if (context->names[i].ino != (unsigned long)-1) |
763 | audit_log_format(ab, " inode=%lu dev=%02x:%02x mode=%#o" | 763 | audit_log_format(ab, " inode=%lu dev=%02x:%02x mode=%#o" |
764 | " ouid=%d ogid=%d rdev=%02x:%02x", | 764 | " ouid=%u ogid=%u rdev=%02x:%02x", |
765 | context->names[i].ino, | 765 | context->names[i].ino, |
766 | MAJOR(context->names[i].dev), | 766 | MAJOR(context->names[i].dev), |
767 | MINOR(context->names[i].dev), | 767 | MINOR(context->names[i].dev), |
@@ -1063,7 +1063,7 @@ int audit_set_loginuid(struct task_struct *task, uid_t loginuid) | |||
1063 | ab = audit_log_start(NULL, AUDIT_LOGIN); | 1063 | ab = audit_log_start(NULL, AUDIT_LOGIN); |
1064 | if (ab) { | 1064 | if (ab) { |
1065 | audit_log_format(ab, "login pid=%d uid=%u " | 1065 | audit_log_format(ab, "login pid=%d uid=%u " |
1066 | "old loginuid=%u new loginuid=%u", | 1066 | "old auid=%u new auid=%u", |
1067 | task->pid, task->uid, | 1067 | task->pid, task->uid, |
1068 | task->audit_context->loginuid, loginuid); | 1068 | task->audit_context->loginuid, loginuid); |
1069 | audit_log_end(ab); | 1069 | audit_log_end(ab); |