[Bug 1252292] [NEW] lckpwdf creates /etc/.pwd.lock + ulckpwdf fails to remove /etc/.pwd.lock
David Favor
david at davidfavor.com
Mon Nov 18 14:42:13 UTC 2013
Public bug reported:
For the simple program...
#include <stdio.h>
#include <shadow.h>
int main (void) {
int status = lckpwdf();
status = ulckpwdf();
return status;
}
gcc -o simple simple.c
strace ./simple 2>&1 | egrep 'pwd|lckpwdf|ulckpwdf'
open("/etc/.pwd.lock", O_WRONLY|O_CREAT|O_CLOEXEC, 0600) = 3
It appears the macro lckpwdf creates /etc/.pwd.lock + macro ulckpwdf
fails to delete this file.
So running a program like vipw creates both /etc/.pwd.lock + /etc/passwd.lock files or
vigr creates both /etc/.pwd.lock + /etc/group.log and in both cases after vipw or vigr
exit /etc/.pwd.lock remains.
** Affects: shadow (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to shadow in Ubuntu.
https://bugs.launchpad.net/bugs/1252292
Title:
lckpwdf creates /etc/.pwd.lock + ulckpwdf fails to remove
/etc/.pwd.lock
Status in “shadow” package in Ubuntu:
New
Bug description:
For the simple program...
#include <stdio.h>
#include <shadow.h>
int main (void) {
int status = lckpwdf();
status = ulckpwdf();
return status;
}
gcc -o simple simple.c
strace ./simple 2>&1 | egrep 'pwd|lckpwdf|ulckpwdf'
open("/etc/.pwd.lock", O_WRONLY|O_CREAT|O_CLOEXEC, 0600) = 3
It appears the macro lckpwdf creates /etc/.pwd.lock + macro ulckpwdf
fails to delete this file.
So running a program like vipw creates both /etc/.pwd.lock + /etc/passwd.lock files or
vigr creates both /etc/.pwd.lock + /etc/group.log and in both cases after vipw or vigr
exit /etc/.pwd.lock remains.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shadow/+bug/1252292/+subscriptions
More information about the foundations-bugs
mailing list