1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-04 23:35:36 -08:00

ls can use tame "stdio rpath getpw". It does uid/gid lookups, using

the 4.4bsd libc caching varients called user_from_uid/group_from_uid,
which are backed by getpw*/getgr* type functions.
ok semarie
This commit is contained in:
deraadt 2015-10-04 16:00:43 +00:00
parent 8b8ebde94e
commit 9978c3c0a0

View File

@ -1,4 +1,4 @@
/* $OpenBSD: ls.c,v 1.41 2015/06/25 02:04:07 uebayasi Exp $ */
/* $OpenBSD: ls.c,v 1.42 2015/10/04 16:00:43 deraadt Exp $ */
/* $NetBSD: ls.c,v 1.18 1996/07/09 09:16:29 mycroft Exp $ */
/*
@ -123,6 +123,9 @@ ls_main(int argc, char *argv[])
termwidth = width;
}
if (tame("stdio rpath getpw", NULL) == -1)
err(1, "tame");
/* Root is -A automatically. */
if (!getuid())
f_listdot = 1;