Hello, t...@.
pwd_mkdb copies one file to another in cp() function. It opens two
file descriptors with open(2),
but it does not closes them with close(2).
Index: pwd_mkdb.c
===================================================================
RCS file: /OpenBSD/src/usr.sbin/pwd_mkdb/pwd_mkdb.c,v
retrieving revision 1.42
diff -u -r1.42 pwd_mkdb.c
--- pwd_mkdb.c 27 Oct 2009 23:59:54 -0000 1.42
+++ pwd_mkdb.c 7 Jan 2010 21:39:01 -0000
@@ -394,6 +394,8 @@
errno = sverrno;
error(buf);
}
+ close(to_fd);
+ close(from_fd);
}
void