(nscd_init): Non-persistent database files are created with the _PATH_NSCD_XYZ_DB_TMP...
authorUlrich Drepper <drepper@redhat.com>
Fri, 15 Oct 2004 21:12:15 +0000 (21:12 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 15 Oct 2004 21:12:15 +0000 (21:12 +0000)
nscd/connections.c

index f616dd0..f22d72e 100644 (file)
@@ -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