fam
[Top] [All Lists]

Possible bug in FAM?

To: fam@xxxxxxxxxxx
Subject: Possible bug in FAM?
From: Joerg Wendland <joergland@xxxxxxxxxx>
Date: Thu, 17 Oct 2002 19:24:35 +0200
Sender: fam-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4i
Hey folks,
I am currently trimming FAM 2.6.9 to compile under G++ 3.2 without
warnings. G++ gripes at the following line (Cred.c++:97):

   primary_group = untrusted.is_valid() ? untrusted.gid() : NOGROUP;

Under Linux/i386 (dunno about others) NOGROUP is defined in asm/params.h
as -1 so G++ correctly sees a possible assignment of a signed int to
an unsigned int (gid_t primary_group). Now primary_group is later
assigned to mygid with is then used in setegid(mygid). Even if
mygid's value stays -1 setegid(-1) simply does nothing and I do not
believe that this is expected. Correct me if I am wrong.

Regards, Joerg

-- 
Joerg "joergland" Wendland
GPG: 51CF8417 FP: 79C0 7671 AFC7 315E 657A  F318 57A3 7FBD 51CF 8417

Attachment: pgplBzgtvlMze.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>