Bug 131324 - MAKEDEV segmentation fault
Summary: MAKEDEV segmentation fault
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: MAKEDEV
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-08-31 00:20 UTC by cac
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: 3.9-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-31 15:24:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description cac 2004-08-31 00:20:57 UTC
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):
MAKEDEV-3.8.1-1

How reproducible:
Always

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 15:24:15 UTC
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.