RPM Community Forums

Mailing List Message of <rpm-devel>

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

From: Jeff Johnson <n3npq@mac.com>
Date: Sun 04 Jan 2009 - 18:41:37 CET
Message-id: <6155049F-152F-4FE8-8EE7-1EFC9AF59EF9@mac.com>

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.

73 de Jeff

  • application/pkcs7-signature attachment: smime.p7s
Received on Sun Jan 4 18:41:43 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.