diff options
author | Damien Miller <djm@mindrot.org> | 2000-05-02 09:23:45 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-05-02 09:23:45 +1000 |
commit | 6f83b8e34d3dc8227d7cf39989c5966abde2305e (patch) | |
tree | d5f01eb7883f7b87ab4d6479ae1c3714f3d0dca0 /servconf.c | |
parent | 63560f9bfc460329b966b17561313d5fa7328726 (diff) | |
download | openssh-git-6f83b8e34d3dc8227d7cf39989c5966abde2305e.tar.gz |
- OpenBSD CVS update
[channels.c]
- init all fds, close all fds.
[sshconnect2.c]
- check whether file exists before asking for passphrase
[servconf.c servconf.h sshd.8 sshd.c]
- PidFile, pr 1210
[channels.c]
- EINTR
[channels.c]
- unbreak, ok niels@
[sshd.c]
- unlink pid file, ok niels@
[auth2.c]
- Add missing #ifdefs; ok - markus
Diffstat (limited to 'servconf.c')
-rw-r--r-- | servconf.c | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$Id: servconf.c,v 1.13 2000/04/29 13:57:11 damien Exp $"); +RCSID("$Id: servconf.c,v 1.14 2000/05/01 23:23:45 damien Exp $"); #include "ssh.h" #include "servconf.h" @@ -33,6 +33,7 @@ initialize_server_options(ServerOptions *options) options->listen_addrs = NULL; options->host_key_file = NULL; options->dsa_key_file = NULL; + options->pid_file = NULL; options->server_key_bits = -1; options->login_grace_time = -1; options->key_regeneration_time = -1; @@ -84,6 +85,8 @@ fill_default_server_options(ServerOptions *options) options->host_key_file = HOST_KEY_FILE; if (options->dsa_key_file == NULL) options->dsa_key_file = DSA_KEY_FILE; + if (options->pid_file == NULL) + options->pid_file = SSH_DAEMON_PID_FILE; if (options->server_key_bits == -1) options->server_key_bits = 768; if (options->login_grace_time == -1) @@ -167,7 +170,7 @@ typedef enum { sPrintMotd, sIgnoreRhosts, sX11Forwarding, sX11DisplayOffset, sStrictModes, sEmptyPasswd, sRandomSeedFile, sKeepAlives, sCheckMail, sUseLogin, sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, - sIgnoreUserKnownHosts, sDSAKeyFile, sCiphers, sProtocol + sIgnoreUserKnownHosts, sDSAKeyFile, sCiphers, sProtocol, sPidFile } ServerOpCodes; /* Textual representation of the tokens. */ @@ -178,6 +181,7 @@ static struct { { "port", sPort }, { "hostkey", sHostKeyFile }, { "dsakey", sDSAKeyFile }, + { "pidfile", sPidFile }, { "serverkeybits", sServerKeyBits }, { "logingracetime", sLoginGraceTime }, { "keyregenerationinterval", sKeyRegenerationTime }, @@ -355,7 +359,19 @@ parse_int: cp = strtok(NULL, WHITESPACE); if (!cp) { fprintf(stderr, "%s line %d: missing file name.\n", - filename, linenum); + filename, linenum); + exit(1); + } + if (*charptr == NULL) + *charptr = tilde_expand_filename(cp, getuid()); + break; + + case sPidFile: + charptr = &options->pid_file; + cp = strtok(NULL, WHITESPACE); + if (!cp) { + fprintf(stderr, "%s line %d: missing file name.\n", + filename, linenum); exit(1); } if (*charptr == NULL) |