aboutsummaryrefslogtreecommitdiff
path: root/nscd
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-01-28 21:00:13 +0000
committerUlrich Drepper <drepper@redhat.com>2009-01-28 21:00:13 +0000
commit31d322a214386b20bb82c06d0c436bd0f0e80236 (patch)
tree6f2bb22635f16328e86ceb72336c9d32d73cd88d /nscd
parent5627534a81943eb4317651bb8d2daa6d93accd25 (diff)
downloadglibc-31d322a214386b20bb82c06d0c436bd0f0e80236.tar
glibc-31d322a214386b20bb82c06d0c436bd0f0e80236.tar.gz
glibc-31d322a214386b20bb82c06d0c436bd0f0e80236.tar.bz2
glibc-31d322a214386b20bb82c06d0c436bd0f0e80236.zip
* nscd/connections.c (nscd_init): If database file access be
opened check whether this is due to permission problems and bail in that case.
Diffstat (limited to 'nscd')
-rw-r--r--nscd/connections.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nscd/connections.c b/nscd/connections.c
index dd934c1106..7e3a406185 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -1,5 +1,5 @@
/* Inner loops of cache daemon.
- Copyright (C) 1998-2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1998-2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -647,6 +647,9 @@ cannot create read-only descriptor for \"%s\"; no mmap"),
if (fd != -1)
close (fd);
}
+ else if (errno == EACCES)
+ error (EXIT_FAILURE, 0, _("cannot access '%s'"),
+ dbs[cnt].db_filename);
}
if (dbs[cnt].head == NULL)