diff options
Diffstat (limited to 'support/support_chroot.c')
-rw-r--r-- | support/support_chroot.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/support/support_chroot.c b/support/support_chroot.c index f3ef551b05..f6fad18f33 100644 --- a/support/support_chroot.c +++ b/support/support_chroot.c @@ -46,10 +46,11 @@ support_chroot_create (struct support_chroot_configuration conf) { struct support_chroot *chroot = xmalloc (sizeof (*chroot)); - chroot->path_chroot = xasprintf ("%s/tst-resolv-res_init-XXXXXX", test_dir); - if (mkdtemp (chroot->path_chroot) == NULL) - FAIL_EXIT1 ("mkdtemp (\"%s\"): %m", chroot->path_chroot); - add_temp_file (chroot->path_chroot); + { + char *template = xasprintf ("%s/tst-resolv-res_init-XXXXXX", test_dir); + chroot->path_chroot = support_create_temp_directory (template); + free (template); + } /* Create the /etc directory in the chroot environment. */ char *path_etc = xasprintf ("%s/etc", chroot->path_chroot); |