diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-06-27 13:58:44 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-06-27 13:58:44 +0000 |
commit | da78c9e4a2e1689a4d400553bb5f6aa0537c5f49 (patch) | |
tree | 18c823b27ab8bd9a1cd03dcca0ea5348975f3971 /sys/kern/kern_prot.c | |
parent | 3b6551a921beb7f1408f05c3730aa5802bd6e79c (diff) | |
download | FreeBSD-src-da78c9e4a2e1689a4d400553bb5f6aa0537c5f49.zip FreeBSD-src-da78c9e4a2e1689a4d400553bb5f6aa0537c5f49.tar.gz |
Replace AUDIT_ARG() with variable argument macros with a set more more
specific macros for each audit argument type. This makes it easier to
follow call-graphs, especially for automated analysis tools (such as
fxr).
In MFC, we should leave the existing AUDIT_ARG() macros as they may be
used by third-party kernel modules.
Suggested by: brooks
Approved by: re (kib)
Obtained from: TrustedBSD Project
MFC after: 1 week
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r-- | sys/kern/kern_prot.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index d286738..7625414 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -489,7 +489,7 @@ setuid(struct thread *td, struct setuid_args *uap) int error; uid = uap->uid; - AUDIT_ARG(uid, uid); + AUDIT_ARG_UID(uid); newcred = crget(); uip = uifind(uid); PROC_LOCK(p); @@ -600,7 +600,7 @@ seteuid(struct thread *td, struct seteuid_args *uap) int error; euid = uap->euid; - AUDIT_ARG(euid, euid); + AUDIT_ARG_EUID(euid); newcred = crget(); euip = uifind(euid); PROC_LOCK(p); @@ -656,7 +656,7 @@ setgid(struct thread *td, struct setgid_args *uap) int error; gid = uap->gid; - AUDIT_ARG(gid, gid); + AUDIT_ARG_GID(gid); newcred = crget(); PROC_LOCK(p); oldcred = crcopysafe(p, newcred); @@ -754,7 +754,7 @@ setegid(struct thread *td, struct setegid_args *uap) int error; egid = uap->egid; - AUDIT_ARG(egid, egid); + AUDIT_ARG_EGID(egid); newcred = crget(); PROC_LOCK(p); oldcred = crcopysafe(p, newcred); @@ -819,7 +819,7 @@ kern_setgroups(struct thread *td, u_int ngrp, gid_t *groups) if (ngrp > NGROUPS) return (EINVAL); - AUDIT_ARG(groupset, groups, ngrp); + AUDIT_ARG_GROUPSET(groups, ngrp); newcred = crget(); crextend(newcred, ngrp); PROC_LOCK(p); @@ -876,8 +876,8 @@ setreuid(register struct thread *td, struct setreuid_args *uap) euid = uap->euid; ruid = uap->ruid; - AUDIT_ARG(euid, euid); - AUDIT_ARG(ruid, ruid); + AUDIT_ARG_EUID(euid); + AUDIT_ARG_RUID(ruid); newcred = crget(); euip = uifind(euid); ruip = uifind(ruid); @@ -942,8 +942,8 @@ setregid(register struct thread *td, struct setregid_args *uap) egid = uap->egid; rgid = uap->rgid; - AUDIT_ARG(egid, egid); - AUDIT_ARG(rgid, rgid); + AUDIT_ARG_EGID(egid); + AUDIT_ARG_RGID(rgid); newcred = crget(); PROC_LOCK(p); oldcred = crcopysafe(p, newcred); @@ -1009,9 +1009,9 @@ setresuid(register struct thread *td, struct setresuid_args *uap) euid = uap->euid; ruid = uap->ruid; suid = uap->suid; - AUDIT_ARG(euid, euid); - AUDIT_ARG(ruid, ruid); - AUDIT_ARG(suid, suid); + AUDIT_ARG_EUID(euid); + AUDIT_ARG_RUID(ruid); + AUDIT_ARG_SUID(suid); newcred = crget(); euip = uifind(euid); ruip = uifind(ruid); @@ -1087,9 +1087,9 @@ setresgid(register struct thread *td, struct setresgid_args *uap) egid = uap->egid; rgid = uap->rgid; sgid = uap->sgid; - AUDIT_ARG(egid, egid); - AUDIT_ARG(rgid, rgid); - AUDIT_ARG(sgid, sgid); + AUDIT_ARG_EGID(egid); + AUDIT_ARG_RGID(rgid); + AUDIT_ARG_SGID(sgid); newcred = crget(); PROC_LOCK(p); oldcred = crcopysafe(p, newcred); |