Bug 21038 - useradd does not unlock the group file on exit
Summary: useradd does not unlock the group file on exit
Status: CLOSED DUPLICATE of bug 126709
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: shadow-utils   
(Show other bugs)
Version: 6.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Eido Inoue
QA Contact: Dale Lovelace
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-11-17 21:50 UTC by Jonathan Briggs
Modified: 2007-04-18 16:29 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 18:47:49 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Jonathan Briggs 2000-11-17 21:50:49 UTC
Redhat made a modification to the useradd program that locks the group file
in the open_files function.  However, the close_files function only unlocks
the group file if a change was made.  This leads to a lock file being left
in /etc/group.lock whenever a user is added and a default group specified
with the -g option.

Having this lock file hanging around doesn't seem to cause any problems --
most of the time!  After a reboot or a long uptime, the PID in the lock
file can be reused by another process and when this happens, the useradd
program cannot lock the group file.  If the new process is a daemon, the
useradd program can NEVER lock the group file.

Suggested change: Always unlock the group file on exit.

Comment 1 Martin Kutter 2004-02-24 14:56:17 UTC
On RH9, useradd does not unlock passwd.

Comment 2 Rik van Riel 2004-09-26 20:39:10 UTC
This duplicate order is strange, but the other bug has the fix ;)

*** This bug has been marked as a duplicate of 126709 ***

Comment 3 Red Hat Bugzilla 2006-02-21 18:47:49 UTC
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.