- djm@cvs.openbsd.org 2003/06/28 07:48:10

[sshd.c]
     report pidfile creation errors, based on patch from Roumen Petrov; ok markus@
This commit is contained in:
Darren Tucker 2003-07-03 13:40:44 +10:00
parent 200d0a7bf5
commit e53270481c
2 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,10 @@
20030703
- (dtucker) OpenBSD CVS Sync
- djm@cvs.openbsd.org 2003/06/28 07:48:10
[sshd.c]
report pidfile creation errors, based on patch from Roumen Petrov;
ok markus@
20030630
- (djm) Search for support functions necessary to build our
getrrsetbyname() replacement. Patch from Roumen Petrov
@ -617,4 +624,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
$Id: ChangeLog,v 1.2835 2003/06/30 09:21:36 djm Exp $
$Id: ChangeLog,v 1.2836 2003/07/03 03:40:44 dtucker Exp $

7
sshd.c
View File

@ -42,7 +42,7 @@
*/
#include "includes.h"
RCSID("$OpenBSD: sshd.c,v 1.269 2003/06/24 08:23:46 markus Exp $");
RCSID("$OpenBSD: sshd.c,v 1.270 2003/06/28 07:48:10 djm Exp $");
#include <openssl/dh.h>
#include <openssl/bn.h>
@ -1217,7 +1217,10 @@ main(int ac, char **av)
* overwrite any old pid in the file.
*/
f = fopen(options.pid_file, "wb");
if (f) {
if (f == NULL) {
error("Couldn't create pid file \"%s\": %s",
options.pid_file, strerror(errno));
} else {
fprintf(f, "%ld\n", (long) getpid());
fclose(f);
}