www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dragan Krnic <Dragan.Kr...@LHSystems.com>
Subject os-hpux/6185: "char *tmpnam(char*)" in htpasswd.c unreliably implemented.
Date Tue, 13 Jun 2000 10:14:06 GMT

>Number:         6185
>Category:       os-hpux
>Synopsis:       "char *tmpnam(char*)" in htpasswd.c unreliably implemented.
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Jun 13 03:20:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Dragan.Krnic@LHSystems.com
>Release:        1.3.12
>Organization:
apache
>Environment:
HP-UX 11.0 with latest patches
aCC 3.13/ANSI-C 11.01.01
>Description:
no core dump. htpasswd outputs
    ./htpasswd: unable to create temporary file
    fopen: No such file or directory

When invoked with NULL argument, the hpux implementation returns NULL mostly.
A non-NULL argument should be supplied instead.
>How-To-Repeat:
by executing
    htpasswd -c /tmp/filename user
on a HP-UX 11.0
>Fix:
add a new line:
    char tmpfilename[32];
in addition to the line: 
    static char *tempfilename;

change the line
    tempfilename = tmpnam(NULL);
into
    tempfilename = tmpnam(tmpfilename);
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> 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!     ]
 
 


Mime
View raw message