From owner-freebsd-bugs Wed Sep 4 17:48:52 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA11554 for bugs-outgoing; Wed, 4 Sep 1996 17:48:52 -0700 (PDT) Received: from red.jnx.com (ppp-206-170-2-51.sntc01.pacbell.net [206.170.2.51]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id RAA11547; Wed, 4 Sep 1996 17:48:49 -0700 (PDT) Received: from base.jnx.com (base.jnx.com [208.197.169.238]) by red.jnx.com (8.7.5/8.7.3) with ESMTP id RAA00462; Wed, 4 Sep 1996 17:48:09 -0700 (PDT) Received: (from pst@localhost) by base.jnx.com (8.7.5/8.7.3) id RAA12235; Wed, 4 Sep 1996 17:48:04 -0700 (PDT) Date: Wed, 4 Sep 1996 17:48:04 -0700 (PDT) From: Paul Traina Message-Id: <199609050048.RAA12235@base.jnx.com> To: wpaul@freebsd.org Subject: proper entry for /etc/groups override? Cc: bugs@freebsd.org Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Bill, I'm having problems with YP in /etc/group and I'm wondering what I'm doing wrong. With the following program: ------ #include #include #include #include #include main(int argc, char **argv) { char **g; struct group *gr; gr = getgrgid((gid_t) 0); if (!gr) perror("no gr"); for (g = gr->gr_mem; ; ++g) { if (!*g) { printf(" -- done\n"); exit(0); } printf("%s ", *g); } } ---------- and a YP group entry with: pst@base$ ypmatch wheel group wheel:*:0:root,pst,tli,dennis,dock,pusateri,krishna,shermis and no "wheel" entry in /etc/group, but +::: at the end, I get: pst@base$ ./foo root pst tli dennis dock pusateri krishna shermis -- done which is correct... we match the wheel group out of YP. However, I want to specify that getgr* should get wheel group membership out of YP, not have it work "by default". I read the man page, and I think it wants me to put "+wheel" in my group file. When I do that, I get: pst@base$ ./foo daemon -- done This is very bogus. Daemon is certainly not in the wheel group, and the other stuff is missing. With an /etc/group entry for wheel reading: +wheel::: I get pst@base$ ./foo -- done showing no entries. with +wheel:* the libc function core dumps. :-( Yet another bug.