[Pkg-shadow-devel] Bug#478771: passwd: shadow libraries ignore stale locks based only on PID
Castor.Fu at 3PAR.com
Wed Apr 30 22:07:40 UTC 2008
When creating or deleting users or groups, the shadow utilities creates
lock files like /etc/group.lock, /etc/shadow.lock, etc.
These lock files contain the PID of the locker, so that if the lock
holder dies without unlocking the file, the lock requestor can break the
lock and take ownership.
One scenario that we've encountered is that if the system is restarted
soon after creating new groups, the attempt to delete the locks is lost.
The low PID then is used upon startup by a long-running daemon, and then
the lock is never freed.
A potential workaround would be to check and see if the mod date is
older than the system uptime. Then one is limited to cases where the
PID has wrapped and collided which is much less likely.
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-5-686-bigmem
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Versions of packages passwd depends on:
ii debianutils 2.17 Miscellaneous utilities
ii libc6 2.3.6.ds1-13etch2 GNU C Library: Shared
ii libpam-modules 0.79-4 Pluggable Authentication
ii libpam0g 0.79-4 Pluggable Authentication
ii libselinux1 1.32-3 SELinux shared libraries
ii login 1:126.96.36.199-7 system login tools
passwd recommends no packages.
-- debconf information:
This email and any attachments thereto may contain private, confidential, and privileged material for the sole use of the intended recipient. Any review, copying, or distribution of this email (or any attachments) by others is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently delete the original and any copies of this email and any attachments thereto.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pkg-shadow-devel