getgrnam(3) busted on RISC Ultrix 3.1

Dirk Grunwald grunwald at foobar.colorado.edu
Tue Sep 26 02:53:41 AEST 1989


The following program illustrates a problem with getgrnam under ultrix 3.1

compile it as ``foo''. If you simply run `foo' (execute getgrnam with a
null string once), it works. If you run `foo bar' (execute the getgrnam twice)
it gets a segmentation fault in getgrnam.

This raises its head in `tar' (I was unpacking gcc 1.36 when it
happened to me.) Unpacking the tar on a Sun didn't raise problems.
Using the Gnu version of TAR also caused the segmentation violation.
This led me to the following test case.

How does one file bug reports electronically?

-----foo.c------
#include <grp.h>
main(argc,argv)
int argc;
char **argv;
{
  struct group *foo;

  foo = getgrnam("");
  if (argc > 1)
    foo = getgrnam("");
}



More information about the Comp.unix.ultrix mailing list