diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-04 16:00:44 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-04 16:00:44 +0000 |
commit | 1db8f19710e1b681870a20722be505c7a30ada77 (patch) | |
tree | f107817ec4f5f97fe4121d8d179f50311173dcf9 /bin/ls/ls.c | |
parent | 7c79878258f8d406cde571045850cb95a1192a5f (diff) |
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
Diffstat (limited to 'bin/ls/ls.c')
-rw-r--r-- | bin/ls/ls.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/ls/ls.c b/bin/ls/ls.c index c4ef6592652..112edce9c6f 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -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; |