Bug in subroutine putpwent(Ultrix 3.0)

Adri Verhoef ccea3 at rivm.UUCP
Tue Jul 25 02:36:17 AEST 1989


putpwent() doesn't work the way it should.
Negative user-IDs and group-IDs show up as long integers
with the following piece of code:

	while (pwent = getpwent()) {
		fprintf(stderr, "%d\n", (int) pwent->pw_uid);
		putpwent(pwent, stdout);
	}

In this way,

	nobody:Nologin:-2:-2:anonymous NFS user:/:

willl show up as:

	-2
	nobody:Nologin:4294967294:4294967294:anonymous NFS user:/:


Should I:
1) Remove all users with negative IDs (i.e. "nobody") from the password file?
2) Have the negative IDs changed into positive values?
3) Obtain a good and new version of putpwent()?
4) Patch the library (change %d:%d:%u:%u:%s:%s:%s into %s:%s:%d:%d:%s:%s:%s)?
5) [You name it]

This version seems to be:
putpwent.c	4.1	(ULTRIX)	11/23/87
--
Adri Verhoef (rivm!a3 at mcvax.uucp), site administrator of the
National Institute for Public Health and Environmental Protection (RIVM).



More information about the Comp.unix.ultrix mailing list