Bug 131324 - MAKEDEV segmentation fault
MAKEDEV segmentation fault
Product: Fedora
Classification: Fedora
Component: MAKEDEV (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2004-08-30 20:20 EDT by cac
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 3.9-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-31 11:24:15 EDT
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 cac 2004-08-30 20:20:57 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040625

Description of problem:
MAKEDEV crashes when creating links.

For example:

[root@rsh /dev]# ./MAKEDEV sound
Segmentation fault (core dumped)

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

How reproducible:

Steps to Reproduce:
1. cd /dev
2. ./MAKEDEV sound


Actual Results:  Segmentation fault

Expected Results:  No segmentation fault

Additional info:

MAKEDEV is incorrectly attempting to lookup uid/gid with getpwnam when
processing a link entry from the makedev.d configuation files.

Link entries are created with the symlink call (cf MAKEDEV.c, line
358),  and are created with the processes uid/gid.

getpwnam is called to translate user and group names in the makedev.d
configuration files to uid/gid numbers, but link entries in the files
do not specify names as they are irrelevent. The situation is handled
corrently for 'alias' entries. MAKEDEV.c, lines 215-216:

    /* Determine the IDs of the owner and her group, if we'll need
them. */
            if ((flags & MANIFEST) || (entry->type == ALIAS) ||
(entry->type == LINK)) {

Adding " || (entry-type == LINK)" to the above line fixes the problem.

        if ((flags & MANIFEST) || (entry->type == ALIAS) ||
(entry->type == LINK)) {
Comment 1 Nalin Dahyabhai 2004-08-31 11:24:15 EDT
Please retry with 3.9, and reopen if you find that this still happens
(I'm fairly certain it's been fixed).  Thanks!

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