Bug 39713 - mktemp -d won't work on glibc21 system
mktemp -d won't work on glibc21 system
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: mktemp (Show other bugs)
1.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Ngo Than
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-05-08 16:00 EDT by Need Real Name
Modified: 2007-04-18 12:33 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-05-08 16:00:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-05-08 16:00:39 EDT
Description of Problem:
Name: mktemp Version: 1.5 Release: 9
mktemp-1.5-9 had a patch for "mktemp -d" on glibc-2.1 system,
but it doesn't work.

Here's a problem. 
"mktemp -d" returns "testing.XXAAR6wj", but the directory created
by "mktemp -d"is "testing.XXXXXXXX". 

[sagami@sandra testing]$ ls
dir_for_testing_mktemp_d/
[sagami@sandra testing]$ ls
dir_for_testing_mktemp_d/
[sagami@sandra testing]$ mktemp -d testing.XXXXXXXX
testing.XXAAR6wj
[sagami@sandra testing]$ ls
dir_for_testing_mktemp_d/  testing.XXXXXXXX/


Additional Information:

A patch below will solve the problem.
I think you just want to modify
mktemp-1.5-glibc21_compat.patch applied in mktemp-1.5-9.
Best regards.

--- mktemp.c.lisa       Wed May  9 04:31:32 2001
+++ mktemp.c    Wed May  9 04:32:45 2001
@@ -91,7 +91,7 @@
         if (mktemp(temp) == NULL) {
             return NULL;
         }
-        ret = mkdir(template, 0700);
+        ret = mkdir(temp, 0700);
         /* success, return the name of the new directory */
         if (ret == 0) {
Comment 1 Ngo Than 2001-05-08 16:29:29 EDT
It's fixed in mktemp-1.5-11. Thanks

Note You need to log in before you can comment on or make changes to this bug.