+20000713
+ - (djm) OpenBSD CVS updates
+ - provos@cvs.openbsd.org 2000/07/13 16:53:22
+ [aux.c readconf.c servconf.c ssh.h]
+ allow multiple whitespace but only one '=' between tokens, bug report from
+ Ralf S. Engelschall <rse@engelschall.com> but different fix. okay deraadt@
+ - provos@cvs.openbsd.org 2000/07/13 17:14:09
+ [clientloop.c]
+ typo; todd@fries.net
+ - provos@cvs.openbsd.org 2000/07/13 17:19:31
+ [scp.c]
+ close can fail on AFS, report error; from Greg Hudson <ghudson@mit.edu>
+ - markus@cvs.openbsd.org 2000/07/14 16:59:46
+ [readconf.c servconf.c]
+ allow leading whitespace. ok niels
+ - djm@cvs.openbsd.org 2000/07/14 22:01:38
+ [ssh-keygen.c ssh.c]
+ Always create ~/.ssh with mode 700; ok Markus
+
20000712
- (djm) Remove -lresolve for Reliant Unix
- (djm) OpenBSD CVS Updates:
- Don't try to retrieve lastlog from wtmp/wtmpx if DISABLE_LASTLOG is
def'd
- Set AIX to use preformatted manpages
-
+
20000610
- (djm) Minor doc tweaks
- (djm) Fix for configure on bash2 from Jim Knoble <jmknoble@jmknoble.cx>
- (andre) New login code
- Remove bsd-login.[ch] and all the OpenBSD-derived code in login.c
- Add loginrec.[ch], logintest.c and autoconf code
-
+
20000531
- Cleanup of auth.c, login.c and fake-*
- Cleanup of auth-pam.c, save and print "account expired" error messages
- Gives useful error message if PRNG initialisation fails
- Reduced ssh startup delay
- Measures cumulative command time rather than the time between reads
- after select()
+ after select()
- 'fixprogs' perl script to eliminate non-working entropy commands, and
- optionally run 'ent' to measure command entropy
+ optionally run 'ent' to measure command entropy
- Applied Tom Bertelson's <tbert@abac.com> AIX authentication fix
- Avoid WCOREDUMP complation errors for systems that lack it
- Avoid SIGCHLD warnings from entropy commands
20000309
- OpenBSD CVS updates to v1.2.3
- [ssh.h atomicio.c]
- - int atomicio -> ssize_t (for alpha). ok deraadt@
- [auth-rsa.c]
- - delay MD5 computation until client sends response, free() early, cleanup.
- [cipher.c]
- - void* -> unsigned char*, ok niels@
- [hostfile.c]
- - remove unused variable 'len'. fix comments.
- - remove unused variable
- [log-client.c log-server.c]
- - rename a cpp symbol, to avoid param.h collision
- [packet.c]
- - missing xfree()
- - getsockname() requires initialized tolen; andy@guildsoftware.com
- - use getpeername() in packet_connection_is_on_socket(), fixes sshd -i;
- from Holger.Trapp@Informatik.TU-Chemnitz.DE
- [pty.c pty.h]
- - register cleanup for pty earlier. move code for pty-owner handling to
- pty.c ok provos@, dugsong@
- [readconf.c]
- - turn off x11-fwd for the client, too.
- [rsa.c]
- - PKCS#1 padding
- [scp.c]
- - allow '.' in usernames; from jedgar@fxp.org
- [servconf.c]
- - typo: ignore_user_known_hosts int->flag; naddy@mips.rhein-neckar.de
- - sync with sshd_config
- [ssh-keygen.c]
- - enable ssh-keygen -l -f ~/.ssh/known_hosts, ok deraadt@
- [ssh.1]
- - Change invalid 'CHAT' loglevel to 'VERBOSE'
- [ssh.c]
- - suppress AAAA query host when '-4' is used; from shin@nd.net.fujitsu.co.jp
- - turn off x11-fwd for the client, too.
- [sshconnect.c]
- - missing xfree()
- - retry rresvport_af(), too. from sumikawa@ebina.hitachi.co.jp.
- - read error vs. "Connection closed by remote host"
- [sshd.8]
- - ie. -> i.e.,
- - do not link to a commercial page..
- - sync with sshd_config
- [sshd.c]
- - no need for poll.h; from bright@wintelcom.net
- - log with level log() not fatal() if peer behaves badly.
- - don't panic if client behaves strange. ok deraadt@
- - make no-port-forwarding for RSA keys deny both -L and -R style fwding
- - delay close() of pty until the pty has been chowned back to root
- - oops, fix comment, too.
- - missing xfree()
- - move XAUTHORITY to subdir. ok dugsong@. fixes debian bug #57907, too.
- (http://cgi.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=57907)
- - register cleanup for pty earlier. move code for pty-owner handling to
+ [ssh.h atomicio.c]
+ - int atomicio -> ssize_t (for alpha). ok deraadt@
+ [auth-rsa.c]
+ - delay MD5 computation until client sends response, free() early, cleanup.
+ [cipher.c]
+ - void* -> unsigned char*, ok niels@
+ [hostfile.c]
+ - remove unused variable 'len'. fix comments.
+ - remove unused variable
+ [log-client.c log-server.c]
+ - rename a cpp symbol, to avoid param.h collision
+ [packet.c]
+ - missing xfree()
+ - getsockname() requires initialized tolen; andy@guildsoftware.com
+ - use getpeername() in packet_connection_is_on_socket(), fixes sshd -i;
+ from Holger.Trapp@Informatik.TU-Chemnitz.DE
+ [pty.c pty.h]
+ - register cleanup for pty earlier. move code for pty-owner handling to
pty.c ok provos@, dugsong@
- - create x11 cookie file
- - fix pr 1113, fclose() -> pclose(), todo: remote popen()
- - version 1.2.3
+ [readconf.c]
+ - turn off x11-fwd for the client, too.
+ [rsa.c]
+ - PKCS#1 padding
+ [scp.c]
+ - allow '.' in usernames; from jedgar@fxp.org
+ [servconf.c]
+ - typo: ignore_user_known_hosts int->flag; naddy@mips.rhein-neckar.de
+ - sync with sshd_config
+ [ssh-keygen.c]
+ - enable ssh-keygen -l -f ~/.ssh/known_hosts, ok deraadt@
+ [ssh.1]
+ - Change invalid 'CHAT' loglevel to 'VERBOSE'
+ [ssh.c]
+ - suppress AAAA query host when '-4' is used; from shin@nd.net.fujitsu.co.jp
+ - turn off x11-fwd for the client, too.
+ [sshconnect.c]
+ - missing xfree()
+ - retry rresvport_af(), too. from sumikawa@ebina.hitachi.co.jp.
+ - read error vs. "Connection closed by remote host"
+ [sshd.8]
+ - ie. -> i.e.,
+ - do not link to a commercial page..
+ - sync with sshd_config
+ [sshd.c]
+ - no need for poll.h; from bright@wintelcom.net
+ - log with level log() not fatal() if peer behaves badly.
+ - don't panic if client behaves strange. ok deraadt@
+ - make no-port-forwarding for RSA keys deny both -L and -R style fwding
+ - delay close() of pty until the pty has been chowned back to root
+ - oops, fix comment, too.
+ - missing xfree()
+ - move XAUTHORITY to subdir. ok dugsong@. fixes debian bug #57907, too.
+ (http://cgi.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=57907)
+ - register cleanup for pty earlier. move code for pty-owner handling to
+ pty.c ok provos@, dugsong@
+ - create x11 cookie file
+ - fix pr 1113, fclose() -> pclose(), todo: remote popen()
+ - version 1.2.3
- Cleaned up
- Removed warning workaround for Linux and devpts filesystems (no longer
required after OpenBSD updates)
modular.
- Revised autoconf support for enabling/disabling askpass support.
- Merged more OpenBSD CVS changes:
- [auth-krb4.c]
- - disconnect if getpeername() fails
- - missing xfree(*client)
- [canohost.c]
- - disconnect if getpeername() fails
- - fix comment: we _do_ disconnect if ip-options are set
- [sshd.c]
- - disconnect if getpeername() fails
- - move checking of remote port to central place
- [auth-rhosts.c] move checking of remote port to central place
- [log-server.c] avoid extra fd per sshd, from millert@
- [readconf.c] print _all_ bad config-options in ssh(1), too
- [readconf.h] print _all_ bad config-options in ssh(1), too
- [ssh.c] print _all_ bad config-options in ssh(1), too
- [sshconnect.c] disconnect if getpeername() fails
+ [auth-krb4.c]
+ - disconnect if getpeername() fails
+ - missing xfree(*client)
+ [canohost.c]
+ - disconnect if getpeername() fails
+ - fix comment: we _do_ disconnect if ip-options are set
+ [sshd.c]
+ - disconnect if getpeername() fails
+ - move checking of remote port to central place
+ [auth-rhosts.c] move checking of remote port to central place
+ [log-server.c] avoid extra fd per sshd, from millert@
+ [readconf.c] print _all_ bad config-options in ssh(1), too
+ [readconf.h] print _all_ bad config-options in ssh(1), too
+ [ssh.c] print _all_ bad config-options in ssh(1), too
+ [sshconnect.c] disconnect if getpeername() fails
- OpenBSD's changes to sshd.c broke the PAM stuff, re-merged it.
- Various small cleanups to bring diff (against OpenBSD) size down.
- Merged more Solaris compability from Marc G. Fournier
#include "includes.h"
-RCSID("$OpenBSD: aux.c,v 1.3 2000/06/18 17:13:41 markus Exp $");
+RCSID("$OpenBSD: aux.c,v 1.4 2000/07/13 22:53:21 provos Exp $");
#include "ssh.h"
if (fcntl(fd, F_SETFL, val) == -1)
error("fcntl(%d, F_SETFL, O_NONBLOCK): %s", fd, strerror(errno));
}
+
+/* Characters considered whitespace in strsep calls. */
+#define WHITESPACE " \t\r\n"
+
+char *
+strdelim(char **s)
+{
+ char *old;
+ int wspace = 0;
+
+ if (*s == NULL)
+ return NULL;
+
+ old = *s;
+
+ *s = strpbrk(*s, WHITESPACE "=");
+ if (*s == NULL)
+ return (old);
+
+ /* Allow only one '=' to be skipped */
+ if (*s[0] == '=')
+ wspace = 1;
+ *s[0] = '\0';
+
+ *s += strspn(*s + 1, WHITESPACE) + 1;
+ if (*s[0] == '=' && !wspace)
+ *s += strspn(*s + 1, WHITESPACE) + 1;
+
+ return (old);
+}
*/
#include "includes.h"
-RCSID("$OpenBSD: clientloop.c,v 1.27 2000/06/20 01:39:40 markus Exp $");
+RCSID("$OpenBSD: clientloop.c,v 1.28 2000/07/13 23:14:08 provos Exp $");
#include "xmalloc.h"
#include "ssh.h"
if (have_pty)
enter_raw_mode();
- /* Check if we should immediately send of on stdin. */
+ /* Check if we should immediately send eof on stdin. */
if (!compat20)
client_check_initial_eof_on_stdin();
*/
#include "includes.h"
-RCSID("$OpenBSD: readconf.c,v 1.41 2000/07/11 19:17:44 deraadt Exp $");
+RCSID("$OpenBSD: readconf.c,v 1.43 2000/07/14 22:59:46 markus Exp $");
#include "ssh.h"
#include "cipher.h"
{ NULL, 0 }
};
-/* Characters considered whitespace in strsep calls. */
-#define WHITESPACE " \t\r\n="
-
-
/*
* Adds a local TCP/IP port forward to options. Never returns if there is an
* error.
int opcode, *intptr, value;
u_short fwd_port, fwd_host_port;
- /* Skip leading whitespace. */
- s = line + strspn(line, WHITESPACE);
- if (!*s || *s == '\n' || *s == '#')
+ s = line;
+ /* Get the keyword. (Each line is supposed to begin with a keyword). */
+ keyword = strdelim(&s);
+ /* Ignore leading whitespace. */
+ if (*keyword == '\0')
+ keyword = strdelim(&s);
+ if (!*keyword || *keyword == '\n' || *keyword == '#')
return 0;
- /* Get the keyword. (Each line is supposed to begin with a keyword). */
- keyword = strsep(&s, WHITESPACE);
opcode = parse_token(keyword, filename, linenum);
switch (opcode) {
case oForwardAgent:
intptr = &options->forward_agent;
parse_flag:
- arg = strsep(&s, WHITESPACE);
+ arg = strdelim(&s);
if (!arg || *arg == '\0')
fatal("%.200s line %d: Missing yes/no argument.", filename, linenum);
value = 0; /* To avoid compiler warning... */
case oStrictHostKeyChecking:
intptr = &options->strict_host_key_checking;
- arg = strsep(&s, WHITESPACE);
+ arg = strdelim(&s);
if (!arg || *arg == '\0')
fatal("%.200s line %d: Missing yes/no argument.",
filename, linenum);
case oIdentityFile:
case oIdentityFile2:
- arg = strsep(&s, WHITESPACE);
+ arg = strdelim(&s);
if (!arg || *arg == '\0')
fatal("%.200s line %d: Missing argument.", filename, linenum);
if (*activep) {
case oUser:
charptr = &options->user;
parse_string:
- arg = strsep(&s, WHITESPACE);
+ arg = strdelim(&s);
if (!arg || *arg == '\0')
fatal("%.200s line %d: Missing argument.", filename, linenum);
if (*activep && *charptr == NULL)
case oProxyCommand:
charptr = &options->proxy_command;
string = xstrdup("");
- while ((arg = strsep(&s, WHITESPACE)) != NULL && *arg != '\0') {
+ while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
string = xrealloc(string, strlen(string) + strlen(arg) + 2);
strcat(string, " ");
strcat(string, arg);
case oPort:
intptr = &options->port;
parse_int:
- arg = strsep(&s, WHITESPACE);
+ arg = strdelim(&s);
if (!arg || *arg == '\0')
fatal("%.200s line %d: Missing argument.", filename, linenum);
if (arg[0] < '0' || arg[0] > '9')
case oCipher:
intptr = &options->cipher;
- arg = strsep(&s, WHITESPACE);
+ arg = strdelim(&s);
if (!arg || *arg == '\0')
fatal("%.200s line %d: Missing argument.", filename, linenum);
value = cipher_number(arg);
break;
case oCiphers:
- arg = strsep(&s, WHITESPACE);
+ arg = strdelim(&s);
if (!arg || *arg == '\0')
fatal("%.200s line %d: Missing argument.", filename, linenum);
if (!ciphers_valid(arg))
case oProtocol:
intptr = &options->protocol;
- arg = strsep(&s, WHITESPACE);
+ arg = strdelim(&s);
if (!arg || *arg == '\0')
fatal("%.200s line %d: Missing argument.", filename, linenum);
value = proto_spec(arg);
case oLogLevel:
intptr = (int *) &options->log_level;
- arg = strsep(&s, WHITESPACE);
+ arg = strdelim(&s);
value = log_level_number(arg);
if (value == (LogLevel) - 1)
fatal("%.200s line %d: unsupported log level '%s'\n",
break;
case oRemoteForward:
- arg = strsep(&s, WHITESPACE);
+ arg = strdelim(&s);
if (!arg || *arg == '\0')
fatal("%.200s line %d: Missing argument.", filename, linenum);
if (arg[0] < '0' || arg[0] > '9')
fatal("%.200s line %d: Badly formatted port number.",
filename, linenum);
fwd_port = atoi(arg);
- arg = strsep(&s, WHITESPACE);
+ arg = strdelim(&s);
if (!arg || *arg == '\0')
fatal("%.200s line %d: Missing second argument.",
filename, linenum);
break;
case oLocalForward:
- arg = strsep(&s, WHITESPACE);
+ arg = strdelim(&s);
if (!arg || *arg == '\0')
fatal("%.200s line %d: Missing argument.", filename, linenum);
if (arg[0] < '0' || arg[0] > '9')
fatal("%.200s line %d: Badly formatted port number.",
filename, linenum);
fwd_port = atoi(arg);
- arg = strsep(&s, WHITESPACE);
+ arg = strdelim(&s);
if (!arg || *arg == '\0')
fatal("%.200s line %d: Missing second argument.",
filename, linenum);
case oHost:
*activep = 0;
- while ((arg = strsep(&s, WHITESPACE)) != NULL && *arg != '\0')
+ while ((arg = strdelim(&s)) != NULL && *arg != '\0')
if (match_pattern(host, arg)) {
debug("Applying options for %.100s", arg);
*activep = 1;
break;
}
- /* Avoid garbage check below, as strsep is done. */
+ /* Avoid garbage check below, as strdelim is done. */
return 0;
case oEscapeChar:
intptr = &options->escape_char;
- arg = strsep(&s, WHITESPACE);
+ arg = strdelim(&s);
if (!arg || *arg == '\0')
fatal("%.200s line %d: Missing argument.", filename, linenum);
if (arg[0] == '^' && arg[2] == 0 &&
}
/* Check that there is no garbage at end of line. */
- if ((arg = strsep(&s, WHITESPACE)) != NULL && *arg != '\0')
+ if ((arg = strdelim(&s)) != NULL && *arg != '\0')
{
fatal("%.200s line %d: garbage at end of line; \"%.200s\".",
filename, linenum, arg);
*/
#include "includes.h"
-RCSID("$OpenBSD: scp.c,v 1.32 2000/06/20 01:39:44 markus Exp $");
+RCSID("$OpenBSD: scp.c,v 1.33 2000/07/13 23:19:31 provos Exp $");
#include "ssh.h"
#include "xmalloc.h"
run_err("%s: set mode: %s",
np, strerror(errno));
}
- (void) close(ofd);
+ if (close(ofd) == -1) {
+ wrerr = YES;
+ wrerrno = errno;
+ }
(void) response();
if (setimes && wrerr == NO) {
setimes = 0;
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: scp.c,v 1.32 2000/06/20 01:39:44 markus Exp $
+ * $OpenBSD: scp.c,v 1.33 2000/07/13 23:19:31 provos Exp $
*/
char *
*/
#include "includes.h"
-RCSID("$OpenBSD: servconf.c,v 1.47 2000/07/10 16:30:25 ho Exp $");
+RCSID("$OpenBSD: servconf.c,v 1.49 2000/07/14 22:59:46 markus Exp $");
#include "ssh.h"
#include "servconf.h"
options->max_startups = 10;
}
-#define WHITESPACE " \t\r\n="
-
/* Keyword tokens. */
typedef enum {
sBadOption, /* == unknown option */
linenum = 0;
while (fgets(line, sizeof(line), f)) {
linenum++;
- cp = line + strspn(line, WHITESPACE);
- if (!*cp || *cp == '#')
+ cp = line;
+ arg = strdelim(&cp);
+ /* Ignore leading whitespace */
+ if (*arg == '\0')
+ arg = strdelim(&cp);
+ if (!*arg || *arg == '#')
continue;
- arg = strsep(&cp, WHITESPACE);
opcode = parse_token(arg, filename, linenum);
switch (opcode) {
case sBadOption:
if (options->num_ports >= MAX_PORTS)
fatal("%s line %d: too many ports.\n",
filename, linenum);
- arg = strsep(&cp, WHITESPACE);
+ arg = strdelim(&cp);
if (!arg || *arg == '\0')
fatal("%s line %d: missing port number.\n",
filename, linenum);
case sServerKeyBits:
intptr = &options->server_key_bits;
parse_int:
- arg = strsep(&cp, WHITESPACE);
+ arg = strdelim(&cp);
if (!arg || *arg == '\0') {
fprintf(stderr, "%s line %d: missing integer value.\n",
filename, linenum);
goto parse_int;
case sListenAddress:
- arg = strsep(&cp, WHITESPACE);
+ arg = strdelim(&cp);
if (!arg || *arg == '\0')
fatal("%s line %d: missing inet addr.\n",
filename, linenum);
charptr = (opcode == sHostKeyFile ) ?
&options->host_key_file : &options->host_dsa_key_file;
parse_filename:
- arg = strsep(&cp, WHITESPACE);
+ arg = strdelim(&cp);
if (!arg || *arg == '\0') {
fprintf(stderr, "%s line %d: missing file name.\n",
filename, linenum);
case sRandomSeedFile:
fprintf(stderr, "%s line %d: \"randomseed\" option is obsolete.\n",
filename, linenum);
- arg = strsep(&cp, WHITESPACE);
+ arg = strdelim(&cp);
break;
case sPermitRootLogin:
intptr = &options->permit_root_login;
- arg = strsep(&cp, WHITESPACE);
+ arg = strdelim(&cp);
if (!arg || *arg == '\0') {
fprintf(stderr, "%s line %d: missing yes/without-password/no argument.\n",
filename, linenum);
case sIgnoreRhosts:
intptr = &options->ignore_rhosts;
parse_flag:
- arg = strsep(&cp, WHITESPACE);
+ arg = strdelim(&cp);
if (!arg || *arg == '\0') {
fprintf(stderr, "%s line %d: missing yes/no argument.\n",
filename, linenum);
case sLogFacility:
intptr = (int *) &options->log_facility;
- arg = strsep(&cp, WHITESPACE);
+ arg = strdelim(&cp);
value = log_facility_number(arg);
if (value == (SyslogFacility) - 1)
fatal("%.200s line %d: unsupported log facility '%s'\n",
case sLogLevel:
intptr = (int *) &options->log_level;
- arg = strsep(&cp, WHITESPACE);
+ arg = strdelim(&cp);
value = log_level_number(arg);
if (value == (LogLevel) - 1)
fatal("%.200s line %d: unsupported log level '%s'\n",
break;
case sAllowUsers:
- while ((arg = strsep(&cp, WHITESPACE)) && *arg != '\0') {
+ while ((arg = strdelim(&cp)) && *arg != '\0') {
if (options->num_allow_users >= MAX_ALLOW_USERS)
fatal("%s line %d: too many allow users.\n",
filename, linenum);
break;
case sDenyUsers:
- while ((arg = strsep(&cp, WHITESPACE)) && *arg != '\0') {
+ while ((arg = strdelim(&cp)) && *arg != '\0') {
if (options->num_deny_users >= MAX_DENY_USERS)
fatal( "%s line %d: too many deny users.\n",
filename, linenum);
break;
case sAllowGroups:
- while ((arg = strsep(&cp, WHITESPACE)) && *arg != '\0') {
+ while ((arg = strdelim(&cp)) && *arg != '\0') {
if (options->num_allow_groups >= MAX_ALLOW_GROUPS)
fatal("%s line %d: too many allow groups.\n",
filename, linenum);
break;
case sDenyGroups:
- while ((arg = strsep(&cp, WHITESPACE)) && *arg != '\0') {
+ while ((arg = strdelim(&cp)) && *arg != '\0') {
if (options->num_deny_groups >= MAX_DENY_GROUPS)
fatal("%s line %d: too many deny groups.\n",
filename, linenum);
break;
case sCiphers:
- arg = strsep(&cp, WHITESPACE);
+ arg = strdelim(&cp);
if (!arg || *arg == '\0')
fatal("%s line %d: Missing argument.", filename, linenum);
if (!ciphers_valid(arg))
case sProtocol:
intptr = &options->protocol;
- arg = strsep(&cp, WHITESPACE);
+ arg = strdelim(&cp);
if (!arg || *arg == '\0')
fatal("%s line %d: Missing argument.", filename, linenum);
value = proto_spec(arg);
fatal("%s line %d: too many subsystems defined.",
filename, linenum);
}
- arg = strsep(&cp, WHITESPACE);
+ arg = strdelim(&cp);
if (!arg || *arg == '\0')
fatal("%s line %d: Missing subsystem name.",
filename, linenum);
fatal("%s line %d: Subsystem '%s' already defined.",
filename, linenum, arg);
options->subsystem_name[options->num_subsystems] = xstrdup(arg);
- arg = strsep(&cp, WHITESPACE);
+ arg = strdelim(&cp);
if (!arg || *arg == '\0')
fatal("%s line %d: Missing subsystem command.",
filename, linenum);
filename, linenum, arg, opcode);
exit(1);
}
- if ((arg = strsep(&cp, WHITESPACE)) != NULL && *arg != '\0') {
+ if ((arg = strdelim(&cp)) != NULL && *arg != '\0') {
fprintf(stderr,
"%s line %d: garbage at end of line; \"%.200s\".\n",
filename, linenum, arg);
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-keygen.c,v 1.28 2000/07/07 03:55:04 todd Exp $");
+RCSID("$OpenBSD: ssh-keygen.c,v 1.29 2000/07/15 04:01:37 djm Exp $");
#include <openssl/evp.h>
#include <openssl/pem.h>
snprintf(dotsshdir, sizeof dotsshdir, "%s/%s", pw->pw_dir, SSH_USER_DIR);
if (strstr(identity_file, dotsshdir) != NULL &&
stat(dotsshdir, &st) < 0) {
- if (mkdir(dotsshdir, 0755) < 0)
+ if (mkdir(dotsshdir, 0700) < 0)
error("Could not create directory '%s'.", dotsshdir);
else if (!quiet)
printf("Created directory '%s'.\n", dotsshdir);
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.56 2000/06/20 01:39:44 markus Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.57 2000/07/15 04:01:37 djm Exp $");
#include <openssl/evp.h>
#include <openssl/dsa.h>
*/
snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, SSH_USER_DIR);
if (stat(buf, &st) < 0)
- if (mkdir(buf, 0755) < 0)
+ if (mkdir(buf, 0700) < 0)
error("Could not create directory '%.200s'.", buf);
/* Check if the connection failed, and try "rsh" if appropriate. */
*
*/
-/* RCSID("$OpenBSD: ssh.h,v 1.47 2000/06/20 01:39:45 markus Exp $"); */
+/* RCSID("$OpenBSD: ssh.h,v 1.48 2000/07/13 22:53:21 provos Exp $"); */
#ifndef SSH_H
#define SSH_H
/* remove newline at end of string */
char *chop(char *s);
+/* return next token in configuration line */
+char *strdelim(char **s);
+
/* set filedescriptor to non-blocking */
void set_nonblock(int fd);