View | Details | Raw Unified | Return to bug 1615 | Differences between
and this patch

Collapse All | Expand All

(-)openssh-5.2p1/ssh.c.pathmax (-4 / +5 lines)
Lines 49-54 Link Here
49
#include <sys/resource.h>
49
#include <sys/resource.h>
50
#include <sys/ioctl.h>
50
#include <sys/ioctl.h>
51
#include <sys/socket.h>
51
#include <sys/socket.h>
52
#include <sys/param.h>
52
53
53
#include <ctype.h>
54
#include <ctype.h>
54
#include <errno.h>
55
#include <errno.h>
Lines 209-215 int Link Here
209
main(int ac, char **av)
210
main(int ac, char **av)
210
{
211
{
211
	int i, opt, exit_status, use_syslog;
212
	int i, opt, exit_status, use_syslog;
212
	char *p, *cp, *line, buf[256];
213
	char *p, *cp, *line, buf[PATH_MAX];
213
	struct stat st;
214
	struct stat st;
214
	struct passwd *pw;
215
	struct passwd *pw;
215
	int dummy, timeout_ms;
216
	int dummy, timeout_ms;
Lines 624-631 main(int ac, char **av) Link Here
624
			fatal("Can't open user config file %.100s: "
625
			fatal("Can't open user config file %.100s: "
625
			    "%.100s", config, strerror(errno));
626
			    "%.100s", config, strerror(errno));
626
	} else {
627
	} else {
627
		snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir,
628
		snprintf(buf, sizeof buf, "%s%s%s", pw->pw_dir,
628
		    _PATH_SSH_USER_CONFFILE);
629
		    strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_CONFFILE);
629
		(void)read_config_file(buf, host, &options, 1);
630
		(void)read_config_file(buf, host, &options, 1);
630
631
631
		/* Read systemwide configuration file after use config. */
632
		/* Read systemwide configuration file after use config. */
Lines 787-793 main(int ac, char **av) Link Here
787
	 * Now that we are back to our own permissions, create ~/.ssh
788
	 * Now that we are back to our own permissions, create ~/.ssh
788
	 * directory if it doesn't already exist.
789
	 * directory if it doesn't already exist.
789
	 */
790
	 */
790
	snprintf(buf, sizeof buf, "%.100s%s%.100s", pw->pw_dir,
791
	snprintf(buf, sizeof buf, "%s%s%s", pw->pw_dir,
791
	    strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR);
792
	    strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR);
792
	if (stat(buf, &st) < 0)
793
	if (stat(buf, &st) < 0)
793
		if (mkdir(buf, 0700) < 0)
794
		if (mkdir(buf, 0700) < 0)

Return to bug 1615