summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-07-03 13:40:44 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-07-03 13:40:44 +1000
commite53270481c279cb50cf31bc83dc6c91835f9a524 (patch)
treebad2409e6ceed58fd67c06974791da391911b2d4 /sshd.c
parent200d0a7bf58f5ef3679d2bab1824ac4fcc5a088f (diff)
- djm@cvs.openbsd.org 2003/06/28 07:48:10
[sshd.c] report pidfile creation errors, based on patch from Roumen Petrov; ok markus@
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sshd.c b/sshd.c
index b8f360841..b4cdc724a 100644
--- a/sshd.c
+++ b/sshd.c
@@ -42,7 +42,7 @@
42 */ 42 */
43 43
44#include "includes.h" 44#include "includes.h"
45RCSID("$OpenBSD: sshd.c,v 1.269 2003/06/24 08:23:46 markus Exp $"); 45RCSID("$OpenBSD: sshd.c,v 1.270 2003/06/28 07:48:10 djm Exp $");
46 46
47#include <openssl/dh.h> 47#include <openssl/dh.h>
48#include <openssl/bn.h> 48#include <openssl/bn.h>
@@ -1217,7 +1217,10 @@ main(int ac, char **av)
1217 * overwrite any old pid in the file. 1217 * overwrite any old pid in the file.
1218 */ 1218 */
1219 f = fopen(options.pid_file, "wb"); 1219 f = fopen(options.pid_file, "wb");
1220 if (f) { 1220 if (f == NULL) {
1221 error("Couldn't create pid file \"%s\": %s",
1222 options.pid_file, strerror(errno));
1223 } else {
1221 fprintf(f, "%ld\n", (long) getpid()); 1224 fprintf(f, "%ld\n", (long) getpid());
1222 fclose(f); 1225 fclose(f);
1223 } 1226 }