aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/find.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-03-12 14:21:33 -0500
committerRob Landley <rob@landley.net>2015-03-12 14:21:33 -0500
commitbe4048dd2509f2b9e968a4d03c06050d847971d3 (patch)
tree298af9767d25d5922c23a4752e03fc7251e4f697 /toys/posix/find.c
parent9ff639cef3c2f73ce876c6cab4c4f517e512bf13 (diff)
downloadtoybox-be4048dd2509f2b9e968a4d03c06050d847971d3.tar.gz
Make find accept numeric uid/gid, and simplify makedevs using the new infrastructure.
Diffstat (limited to 'toys/posix/find.c')
-rw-r--r--toys/posix/find.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/posix/find.c b/toys/posix/find.c
index 6c45a212..3607874a 100644
--- a/toys/posix/find.c
+++ b/toys/posix/find.c
@@ -371,8 +371,8 @@ static int do_find(struct dirtree *new)
udl = xmalloc(sizeof(*udl));
dlist_add_nomalloc(&TT.argdata, (void *)udl);
- if (*s == 'u') udl->u.uid = xgetpwnam(ss[1])->pw_uid;
- else if (*s == 'g') udl->u.gid = xgetgrnam(ss[1])->gr_gid;
+ if (*s == 'u') udl->u.uid = xgetpwnamid(ss[1])->pw_uid;
+ else if (*s == 'g') udl->u.gid = xgetgrnamid(ss[1])->gr_gid;
else {
struct stat st;