Bug 21038 - useradd does not unlock the group file on exit
useradd does not unlock the group file on exit
Status: CLOSED DUPLICATE of bug 126709
Product: Red Hat Linux
Classification: Retired
Component: shadow-utils (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Eido Inoue
Dale Lovelace
Depends On:
  Show dependency treegraph
Reported: 2000-11-17 16:50 EST by Jonathan Briggs
Modified: 2007-04-18 12:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 13:47:49 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 Jonathan Briggs 2000-11-17 16:50:49 EST
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 09:56:17 EST
On RH9, useradd does not unlock passwd.
Comment 2 Rik van Riel 2004-09-26 16:39:10 EDT
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 13:47:49 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.