Fix YP user and group support in getent(1).
authordoug <doug@openbsd.org>
Sat, 10 Oct 2015 21:50:05 +0000 (21:50 +0000)
committerdoug <doug@openbsd.org>
Sat, 10 Oct 2015 21:50:05 +0000 (21:50 +0000)
These should have been "stdio getpw" before, but they worked for non-YP
environments.  With YP, it won't work without "getpw".

Reported by semarie@ and confirmed as a problem by miod@.

ok deraadt@

usr.bin/getent/getent.c

index aa60ee1..3b2f30d 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: getent.c,v 1.11 2015/10/10 14:33:02 deraadt Exp $     */
+/*     $OpenBSD: getent.c,v 1.12 2015/10/10 21:50:05 doug Exp $        */
 /*     $NetBSD: getent.c,v 1.7 2005/08/24 14:31:02 ginsbach Exp $      */
 
 /*-
@@ -79,9 +79,9 @@ static struct getentdb {
        const char      *pledge;
 } databases[] = {
        {       "ethers",       ethers,         "stdio rpath"   },
-       {       "group",        group,          "stdio rpath"   },
+       {       "group",        group,          "stdio getpw"   },
        {       "hosts",        hosts,          "stdio dns"     },
-       {       "passwd",       passwd,         "stdio rpath"   },
+       {       "passwd",       passwd,         "stdio getpw"   },
        {       "protocols",    protocols,      "stdio rpath"   },
        {       "rpc",          rpc,            "stdio rpath"   },
        {       "services",     services,       "stdio rpath"   },