RPM Community Forums

Mailing List Message of <rpm-devel>

Re: GID-0 disliked by "rpm -V"?

From: Ralf S. Engelschall <rse+rpm-devel@rpm5.org>
Date: Mon 05 Jan 2009 - 18:43:37 CET
Message-ID: <20090105174337.GA5179@engelschall.com>
On Sun, Jan 04, 2009, Jeff Johnson wrote:

> On Jan 4, 2009, at 11:07 AM, Ralf S. Engelschall wrote:
> <snipped, will study>
>>
>> So, I think we have a problem in veryfying GID-0 based files or
>> directories...
>
> I suspect the problem is with "wheel" -> 0 gid mapping, not with the
> gid 0 verification per-se. Its kinda hard to screw an integer comparison
> subtly (but I've managed that too on occaisions, sigh).
>
> See if priming (as in compiling into rpm) the gname cache
> in rpmio/ugid.c whith group "wheel" fixes:
>
> --- rpmio/ugid.c-ORIG	2009-01-04 12:39:17.000000000 -0500
> +++ rpmio/ugid.c	2009-01-04 12:39:56.000000000 -0500
> @@ -72,6 +72,9 @@
>      } else if (strcmp(thisGname, "root") == 0) {
>  	*gid = 0;
>  	return 0;
> +    } else if (strcmp(thisGname, "wheel") == 0) {
> +	*gid = 0;
> +	return 0;
>      }
>
>      thisGnameLen = strlen(thisGname);
>
> Otherwise I'll dig out the flaw.

Ok, I've applied your patch and tested even on the particular
installation (to avoid that my test case is wrong) and unfortunately the
patch has not caused any difference:

| # /usr/opkg/bin/openpkg rpm -V sasl
| ......G.    /usr/opkg/var/sasl/log

So, unfortunately the bug seems to be somewhere else...

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com
Received on Mon Jan 5 18:44:55 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.