You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Barry James <ba...@ftdetrck-ccmail.army.mil> on 1999/02/22 23:29:45 UTC

os-hpux/3945: htpasswd uses tmpnam which causes problem on HPUX

>Number:         3945
>Category:       os-hpux
>Synopsis:       htpasswd uses tmpnam which causes problem on HPUX
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Feb 22 14:30:00 PST 1999
>Last-Modified:
>Originator:     barry_james@ftdetrck-ccmail.army.mil
>Organization:
apache
>Release:        1.3.1
>Environment:
HP-UX B.11.00
gcc 2.8.1
>Description:
htpasswd.c calls tmpnam(NULL) which is okay if not compiled with multithreading
but causes a problem if compiled with -lpthread (Message is "Could not open temp
file".).  Changing tmpnam(NULL) to tempnam(NULL, NULL) appears to correct the
problem.
>How-To-Repeat:
Compile with -lpthread and run htpasswd against an existing entry
>Fix:
Suggested fix - use tempnam(NULL, NULL) instead of tmpnam(NULL)
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[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!         ]