From: Ulrich Drepper Date: Wed, 28 Jan 2009 21:00:13 +0000 (+0000) Subject: * nscd/connections.c (nscd_init): If database file access be X-Git-Tag: upstream/2.30~13869 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=31d322a214386b20bb82c06d0c436bd0f0e80236;p=external%2Fglibc.git * nscd/connections.c (nscd_init): If database file access be opened check whether this is due to permission problems and bail in that case. --- diff --git a/ChangeLog b/ChangeLog index df49905..257d1e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-01-28 Ulrich Drepper + * nscd/connections.c (nscd_init): If database file access be + opened check whether this is due to permission problems and bail + in that case. + [BZ #9741] * nscd/mem.c (gc): Fix assignment of he_data in case malloc is used. Reported by Jun'ichi Nomura . diff --git a/nscd/connections.c b/nscd/connections.c index dd934c1..7e3a406 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 , 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)