[PATCH] temp file not removed in nscd
Jerome Borsboom
j.borsboom@erasmusmc.nl
Thu Oct 14 16:18:00 GMT 2004
When using nscd without the persistent database and without sharing, the
temporary file is not removed on exit. This is due to the unlink operation
being guarded by the sharing conditional. The path below corrects this.
Jerome
--- glibc-cvs/nscd/connections.c 2004-10-04 18:38:27.000000000 +0200
+++ glibc-cvs.new/nscd/connections.c 2004-10-14 17:23:45.088154024 +0200
@@ -327,9 +327,10 @@
/* We do not need the file name anymore after we
opened another file descriptor in read-only mode. */
- if (fd != -1 && dbs[cnt].shared)
+ if (fd != -1)
{
- ro_fd = open (fname, O_RDONLY);
+ if (dbs[cnt].shared)
+ ro_fd = open (fname, O_RDONLY);
unlink (fname);
}
More information about the Libc-alpha
mailing list