summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-10-15 21:12:15 +0000
committerUlrich Drepper <drepper@redhat.com>2004-10-15 21:12:15 +0000
commita8a589676cfbc51e4a1b363355c1cdc6d116d847 (patch)
tree026a13d751de7c903da7ff613a5bd597a706265f /nscd
parentb3cce3d5e88675c264b82110386e9712f549194b (diff)
downloadglibc-a8a589676cfbc51e4a1b363355c1cdc6d116d847.tar.gz
glibc-a8a589676cfbc51e4a1b363355c1cdc6d116d847.tar.xz
glibc-a8a589676cfbc51e4a1b363355c1cdc6d116d847.zip
(nscd_init): Non-persistent database files are created with the _PATH_NSCD_XYZ_DB_TMP path.
Diffstat (limited to 'nscd')
-rw-r--r--nscd/connections.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/nscd/connections.c b/nscd/connections.c
index f616dd0508..f22d72e265 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -319,10 +319,7 @@ cannot create read-only descriptor for \"%s\"; no mmap"),
 	      }
 	    else
 	      {
-		size_t slen = strlen (dbs[cnt].db_filename);
-		char fname[slen + 8];
-		strcpy (mempcpy (fname, dbs[cnt].db_filename, slen),
-			".XXXXXX");
+		char fname[] = _PATH_NSCD_XYZ_DB_TMP;
 		fd = mkstemp (fname);
 
 		/* We do not need the file name anymore after we