Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 133116 - segmentation fault inside initgroups() when ldap is configured
segmentation fault inside initgroups() when ldap is configured
Status: CLOSED DUPLICATE of bug 132850
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc (Show other bugs)
ia64 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2004-09-21 15:11 EDT by XC Support
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 14:05:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description XC Support 2004-09-21 15:11:58 EDT
Description of problem:

When you set "group: files ldap" in "/etc/nsswitch.conf" and you have 
a statically build application, a call to "initgroups()" call cause a 
segmentation fault.

Version-Release number of selected component (if applicable):


How reproducible:

Steps to Reproduce:
1. Set "group: files ldap" in "/etc/nsswitch.conf"
2. Use the following reproducer program. The user is "mysql", but you 
can choose another.

#include <stdio.h>
#include <grp.h>
#include <pwd.h>
#include <errno.h>

       struct passwd *pw_ptr;

       char *user = "mysql";

       pw_ptr = getpwnam(user);

       printf("pw_ptr->pw_gid = %d\n", pw_ptr->pw_gid);

       initgroups((char*) user, pw_ptr->pw_gid);

3. Compile with "cc filename.c -static"
4. Run "a.out".

Actual results:

# ./a.out
pw_ptr->pw_gid = 101
Segmentation fault

Expected results:

# ./a.out
pw_ptr->pw_gid = 101

Additional info:

This only happens when compiling with "-static".
Comment 1 XC Support 2004-09-21 15:14:16 EDT

*** This bug has been marked as a duplicate of 132850 ***
Comment 2 Red Hat Bugzilla 2006-02-21 14:05:45 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.