Bug 39713 - mktemp -d won't work on glibc21 system
Summary: mktemp -d won't work on glibc21 system
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: mktemp
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-05-08 20:00 UTC by Need Real Name
Modified: 2007-04-18 16:33 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-05-08 20:00:43 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2001-05-08 20:00:39 UTC
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 20:29:29 UTC
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.