about summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
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