Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162150912
D53671.id166685.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
947 B
Referenced Files
None
Subscribers
None
D53671.id166685.diff
View Options
diff --git a/usr.sbin/setaudit/setaudit.8 b/usr.sbin/setaudit/setaudit.8
--- a/usr.sbin/setaudit/setaudit.8
+++ b/usr.sbin/setaudit/setaudit.8
@@ -45,7 +45,7 @@
.It Fl 6
Use IPv6.
.It Fl a Ar auid
-Audit user ID.
+Audit user ID or user name.
.It Fl m Ar mask
String representation of an audit mask.
.It Fl s Ar source
diff --git a/usr.sbin/setaudit/setaudit.c b/usr.sbin/setaudit/setaudit.c
--- a/usr.sbin/setaudit/setaudit.c
+++ b/usr.sbin/setaudit/setaudit.c
@@ -58,7 +58,7 @@
auditinfo_addr_t aia;
struct addrinfo *res;
struct passwd *pwd;
- char *aflag, *mflag, *sflag, *r, *prog;
+ char *aflag, *mflag, *sflag, *prog;
int ch, error;
aflag = mflag = sflag = NULL;
@@ -99,8 +99,10 @@
if (aflag) {
pwd = getpwnam(aflag);
if (pwd == NULL) {
+ char *r;
+
aia.ai_auid = strtoul(aflag, &r, 10);
- if (r != NULL)
+ if (*r != '\0')
errx(1, "%s: invalid user", aflag);
} else
aia.ai_auid = pwd->pw_uid;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 11, 8:13 AM (15 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34954017
Default Alt Text
D53671.id166685.diff (947 B)
Attached To
Mode
D53671: setaudit: Fix handling of numeric UIDs
Attached
Detach File
Event Timeline
Log In to Comment