summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-07-03 05:40:44 +0200
committerDarren Tucker <dtucker@zip.com.au>2003-07-03 05:40:44 +0200
commite53270481c279cb50cf31bc83dc6c91835f9a524 (patch)
treebad2409e6ceed58fd67c06974791da391911b2d4
parent - (djm) Search for support functions necessary to build our (diff)
downloadopenssh-e53270481c279cb50cf31bc83dc6c91835f9a524.tar.xz
openssh-e53270481c279cb50cf31bc83dc6c91835f9a524.zip
- djm@cvs.openbsd.org 2003/06/28 07:48:10
[sshd.c] report pidfile creation errors, based on patch from Roumen Petrov; ok markus@
-rw-r--r--ChangeLog9
-rw-r--r--sshd.c7
2 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index f40631cf8..130989988 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 $
diff --git a/sshd.c b/sshd.c
index b8f360841..b4cdc724a 100644
--- a/sshd.c
+++ b/sshd.c
@@ -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);
}