Bug 662 - passwd will run while vipw is running
Summary: passwd will run while vipw is running
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: passwd
Version: 5.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1998-12-31 21:55 UTC by fairlite
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-04-01 06:07:38 UTC

Attachments (Terms of Use)

Description fairlite 1998-12-31 21:55:37 UTC
On RedHat 5.1, if you run vipw, and someone concurrently
runs passwd, passwd will run and modify /etc/passwd even
though /etc/ptmp exists.

This condition would result in a loss of the password
change (or multiple changes) that occurred while vipw was
in operation.

I spoke with "oot" on LinuxNET and he verified the bug,
which apparently also exists in 5.2.  He asked me to report
this bug here.

Comment 1 Preston Brown 1999-03-22 19:00:59 UTC

Do you think we should add a quick check to passwd to look for the
lockfile, and exit if it exists?

Comment 2 Michael K. Johnson 1999-03-23 01:06:59 UTC
glibc vs. vipw locking difference passed on to Cristian to resolve

Comment 3 Cristian Gafton 1999-04-01 06:07:59 UTC
vipw can not lock the passwd file for an extended period of time. The
locking mechanism has an algorithm that will make it avoid deadlocks
from runaway processes (basically wait at most 10 sec before ignoring
the lock and acquiring it for yourself)

vipw will lock the database when it is updating it, checking that the
timestamp was not modified in the meantime.

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