]> git.ipfire.org Git - thirdparty/shadow.git/commit
Ensure that getpwent() is used in setpwent(), getpwent(),
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Wed, 16 Apr 2008 21:52:46 +0000 (21:52 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Wed, 16 Apr 2008 21:52:46 +0000 (21:52 +0000)
commit7baffa5e74b9eea72635e644461069dcd478a259
tree5defc52755a2099695ea30ec04583207ae60b613
parent10ebb1448143429e43043a863fe08e2bd514f023
Ensure that getpwent() is used in setpwent(), getpwent(),
endpwend() sequences (ditto for getgrent(), getspent(), and
getsgent()). The only real (minor) issue was in login, which kept
the passwd file open.
* libmisc/entry.c: Remove unneeded setspent() and endspent() (only
  getspnam is called in the middle).
* libmisc/find_new_ids.c: Make sure to close the password and
  group files with endpwent() and endgrent().
* libmisc/pwdcheck.c: Remove unneeded endspent() (only getspnam()
  is called before).
* src/lastlog.c, src/passwd.c, src/groupmod.c, src/faillog.c,
  src/groups.c: Make sure to close
  the password file with endpwent().
* src/login.c: Remove unneeded setpwent() (only xgetpwnam is
  called before).
* src/login.c, src/newgrp.c: Fix typos in comments.
ChangeLog
libmisc/entry.c
libmisc/find_new_ids.c
libmisc/pwdcheck.c
src/faillog.c
src/groupmod.c
src/groups.c
src/lastlog.c
src/login.c
src/newgrp.c
src/passwd.c