[Pkg-shadow-devel] Bug#242407: vipw race condition
Alexander Gattin
Alexander Gattin <arg@online.com.ua>, 242407@bugs.debian.org
Thu, 14 Apr 2005 01:35:36 +0300
--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
tags confirmed patch
thanks
Hi!
Please, Tomasz, look into this bugreport:
http://bugs.debian.org/242407
I checked it -- the race is really there.
I think the fix is trivial, the patch against your CVS
version is attached (I have already compiled/checked
it on my system). If I didn't miss something obvious,
evrything is fine with the proposed change.
--
WBR,
xrgtn
--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="vipw.diff"
--- vipw.c.orig 2005-04-14 01:20:38.000000000 +0300
+++ vipw.c 2005-04-14 01:20:54.000000000 +0300
@@ -93,10 +93,10 @@
{
int err = errno;
- if (filelocked)
- (*unlock) ();
if (createedit)
unlink (fileeditname);
+ if (filelocked)
+ (*unlock) ();
if (msg)
fprintf (stderr, "%s: %s", progname, msg);
if (syserr)
--7JfCtLOvnd9MIVvH--