Problems with latest coreutils (6.5)

Robert Bauck Hamar roberth at ifi.uio.no
Tue Nov 21 19:27:42 UTC 2006


*Tom Rindborg:
>Hi,
>
>I have problems with ls in the latest coreutils, it segfaults when 
>doing ls -l in a directory containing a file with an "unknown" uid:

It's gid, actually. Unknown uid should work fine, but not as expected. A 
quick patch (copy-paste from the uid-function):

--- coreutils-6.5/lib/idcache.c	2006-11-07 15:42:11.000000000 +0100
+++ coreutils-6.5/lib/idcache.c.new	2006-11-21 20:11:00.000000000 +0100
@@ -142,7 +142,7 @@
        return tail->name;
  
    grent = getgrgid (gid);
-  name = grent ? grent->gr_name : NULL;
+  name = grent ? grent->gr_name : "";
    tail = xmalloc (offsetof (struct userid, name) + strlen (name) + 1);
    tail->id.g = gid;
    strcpy (tail->name, name);

-- 
Robert Bauck Hamar
Der er to regler for suksess:
1. Fortell aldri alt du vet.
    – Roger H. Lincoln
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.crux.nu/pipermail/crux/attachments/20061121/20ce5468/attachment.asc>


More information about the CRUX mailing list