Bug 22210

Summary: typeof(passwd->pw_gid) != typeof(group->gr_gid)
Product: Base System Reporter: clefevre <clefevre>
Component: standardsAssignee: freebsd-standards (Nobody) <standards>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description clefevre 2000-10-22 15:20:01 UTC
	the type of the gr_gid member of struct group doesn't match
	the type of the pw_gid member of struct passwd which prevent
	a simple comparison such as passwd->pw_gid == group->gr_gid
	w/o a compiler warning.

How-To-Repeat: 
	cat << EOF > /tmp/c.c
	#include <grp.h>
	#include <pwd.h>
	#include <stdio.h>
	int main ()
	{
		struct passwd *passwd;
		struct group *group;

		passwd = getpwnam("root");
		group = getgrnam("wheel");
		printf ("%d\n", passwd->pw_gid == group->gr_gid);
		return (0);
	}
	EOF
	cc -W -Wall  /tmp/c.c  -o /tmp/c
	/tmp/c.c: In function `main':
	/tmp/c.c:11: warning: comparison between signed and unsigned
Comment 1 Garrett A. Wollman 2000-10-23 00:22:51 UTC
<<On Sun, 22 Oct 2000 16:16:52 +0200 (CEST), Cyrille Lefevre <clefevre@citeweb.net> said:

> 	the type of the gr_gid member of struct group doesn't match
> 	the type of the pw_gid member of struct passwd which prevent
> 	a simple comparison such as passwd->pw_gid == group->gr_gid
> 	w/o a compiler warning.

This will be fixed in my giant POSIX-draft header patch which will hit
the tree some time next month.

-GAWollman
Comment 2 Cyrille Lefevre 2000-10-23 06:35:53 UTC
Garrett Wollman <wollman@khavrinen.lcs.mit.edu> writes:

> <<On Sun, 22 Oct 2000 16:16:52 +0200 (CEST), Cyrille Lefevre <clefevre@citeweb.net> said:
> 
> > 	the type of the gr_gid member of struct group doesn't match
> > 	the type of the pw_gid member of struct passwd which prevent
> > 	a simple comparison such as passwd->pw_gid == group->gr_gid
> > 	w/o a compiler warning.
> 
> This will be fixed in my giant POSIX-draft header patch which will hit
> the tree some time next month.

do you think that FreeBSD will be POSIX compliant in the sense of the
OpenGroup one day ? what I would like to say is, is it possible to
make FreeBSD pass the OpenGroup validation tests ? is this a cost
problem (I guess yes) ?

Cyrille.
--
home: mailto:clefevre@citeweb.net work: mailto:Cyrille.Lefevre@edf.fr
Comment 3 clefevre 2000-11-01 22:20:04 UTC
Garrett Wollman wrote:
> <<On Sun, 22 Oct 2000 16:16:52 +0200 (CEST), Cyrille Lefevre <clefevre@citeweb.net> said:
> 
> > 	the type of the gr_gid member of struct group doesn't match
> > 	the type of the pw_gid member of struct passwd which prevent
> > 	a simple comparison such as passwd->pw_gid == group->gr_gid
> > 	w/o a compiler warning.
> 
> This will be fixed in my giant POSIX-draft header patch which will hit
> the tree some time next month.

I've just found things which may interrest you. those things seems to
be UNIX 98 certification suite located at :

http://www.opengroup.org/testing/downloads.html

specially, VSX-PCTS and System Header Checker.

also, UNIX 98 specifications may be found here :

http://www.opengroup.org/onlinepubs/7908799/

see you.

Cyrille.
--
home: mailto:clefevre@citeweb.net work: mailto:Cyrille.Lefevre@edf.fr
Comment 4 Cyrille Lefevre 2000-11-01 22:20:05 UTC
Garrett Wollman wrote:
> <<On Sun, 22 Oct 2000 16:16:52 +0200 (CEST), Cyrille Lefevre <clefevre@citeweb.net> said:
> 
> > 	the type of the gr_gid member of struct group doesn't match
> > 	the type of the pw_gid member of struct passwd which prevent
> > 	a simple comparison such as passwd->pw_gid == group->gr_gid
> > 	w/o a compiler warning.
> 
> This will be fixed in my giant POSIX-draft header patch which will hit
> the tree some time next month.

I've just found things which may interrest you. those things seems to
be UNIX 98 certification suite located at :

http://www.opengroup.org/testing/downloads.html

specially, VSX-PCTS and System Header Checker.

also, UNIX 98 specifications may be found here :

http://www.opengroup.org/onlinepubs/7908799/

see you.

Cyrille.
--
home: mailto:clefevre@citeweb.net work: mailto:Cyrille.Lefevre@edf.fr
Comment 5 dd freebsd_committer freebsd_triage 2001-06-19 01:27:36 UTC
Responsible Changed
From-To: freebsd-bugs->wollman

Wollman's reminder to close this when he (finally/hopefully) commits his 
POSIX header patch.
Comment 6 Garrett Wollman freebsd_committer freebsd_triage 2002-06-03 19:10:22 UTC
Responsible Changed
From-To: wollman->standards

This is a standards issue, which has now been fixed. 
I'm leaving this PR open as a reminder that the namespace 
pollution in <pwd.h> still needs to be fixed.
Comment 7 Mike Barcroft freebsd_committer freebsd_triage 2002-06-09 20:47:25 UTC
State Changed
From-To: open->closed


I've taken care of the namespace problems.
Comment 8 Alexander Best freebsd_committer freebsd_triage 2010-10-14 16:38:39 UTC
Responsible Changed
From-To: standards->freebsd-standards

Over to maintainer(s).