>Number:         5253
>Category:       other
>Synopsis:       Program htpasswd give error: "unable to create temporary file"
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Thu Nov  4 09:50:01 PST 1999
>Last-Modified:
>Originator:     [EMAIL PROTECTED]
>Organization:
apache
>Release:        1.3.6
>Environment:
HP/UX 11.0
HP/UX ANSI C
>Description:
When using htpasswd it always say
"unable to create temporary file"
>How-To-Repeat:

>Fix:
I fix the problem into htpasswd.c program with changing point:

    tempfilename = tmpnam(NULL);

to

    tempfilename = tmpnam(evitmp);

where evitmp is an array and is  L_tmpnam byte long.

man tmpnam says in HP/UX 11:

           tmpnam()       Always generates a file name using the path-prefix
                          defined as P_tmpdir in the <stdio.h> header file.
                          If s is NULL, tmpnam() leaves its result in an
                          internal static area and returns a pointer to that
                          area.  The next call to tmpnam() destroys the
                          contents of the area.  If s is not NULL, it is
                          assumed to be the address of an array of at least
                          L_tmpnam bytes, where L_tmpnam is a constant
                          defined in <stdio.h>; tmpnam() places its result
                          in that array and returns s.  For multi-thread
                          applications, if s is a NULL pointer, the
                          operation is not performed and a NULL pointer is
                          returned.

So the reason is that HP/UX 11 think that this is "multi-thread" application 
and need other than NULL in parameter.

Greetings Esko Viitanen
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <[EMAIL PROTECTED]> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or      ]
["Re: general/1098:").  If the subject doesn't match this       ]
[pattern, your message will be misfiled and ignored.  The       ]
["apbugs" address is not added to the Cc line of messages from  ]
[the database automatically because of the potential for mail   ]
[loops.  If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request from a  ]
[developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]



Reply via email to