Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 91637 - sandbox segfaults without message when /etc/group is not readable
Summary: sandbox segfaults without message when /etc/group is not readable
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-05 19:10 UTC by Olivier Crete (RETIRED)
Modified: 2005-05-10 00:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Crete (RETIRED) gentoo-dev 2005-05-05 19:10:56 UTC
sandbox just segfaults without giving an error message if /etc/group is not readable (dont ask why it wasnt)... 

ohh and emerge just exits after the fetch stage.. I had to look at dmesg to find out it had segfaulted..

That's using portage version 2.0.51.19 on amd64
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2005-05-10 00:38:28 UTC
Will be in next release (sorry, forgot about this one for the 1.2.6 release).

----
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-src/sandbox/ChangeLog,v
retrieving revision 1.42
diff -u -r1.42 ChangeLog
--- ChangeLog   10 May 2005 07:09:21 -0000      1.42
+++ ChangeLog   10 May 2005 07:37:32 -0000
@@ -2,6 +2,10 @@
 # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
 # $Header: /var/cvsroot/gentoo-src/sandbox/ChangeLog,v 1.42 2005/05/10 07:09:21 azarah Exp $

+  10 May 2005; Martin Schlemmer <azarah@gentoo.org> sandbox_futils.c:
+  Fix typo in code that checks if we got valid group information, causing a
+  segmentation fault, bug #91637.
+
 * sandbox-1.2.6 (2005/05/10)

   10 May 2005; Martin Schlemmer <azarah@gentoo.org> sandbox.c:
Index: sandbox_futils.c
===================================================================
RCS file: /var/cvsroot/gentoo-src/sandbox/sandbox_futils.c,v
retrieving revision 1.5
diff -u -r1.5 sandbox_futils.c
--- sandbox_futils.c    23 Apr 2005 20:44:15 -0000      1.5
+++ sandbox_futils.c    10 May 2005 07:37:32 -0000
@@ -305,7 +305,7 @@
        }
        if (NULL != group) {
                group_struct = getgrnam(group);
-               if (NULL == group) {
+               if (NULL == group_struct) {
                        snprintf(error, sizeof(error), ">>> Could not get grp number: %s", group);
                        perror(error);
                } else {