diff options
Diffstat (limited to 'nscd/connections.c')
-rw-r--r-- | nscd/connections.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nscd/connections.c b/nscd/connections.c index 594a5b8..f616dd0 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -327,9 +327,10 @@ cannot create read-only descriptor for \"%s\"; no mmap"), /* 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); } |