Date: Wed, 4 Sep 1996 17:48:04 -0700 (PDT) From: Paul Traina <pst@jnx.com> To: wpaul@freebsd.org Cc: bugs@freebsd.org Subject: proper entry for /etc/groups override? Message-ID: <199609050048.RAA12235@base.jnx.com>
next in thread | raw e-mail | index | archive | help
Bill,
I'm having problems with YP in /etc/group and I'm wondering what I'm doing
wrong.
With the following program:
------
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <grp.h>
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609050048.RAA12235>
