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:
parent
8b8ebde94e
commit
9978c3c0a0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user