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

Collapse All | Expand All

(-)ssh.c (-5 / +8 lines)
Lines 841-851 main(int ac, char **av) Link Here
841
	 * Now that we are back to our own permissions, create ~/.ssh
841
	 * Now that we are back to our own permissions, create ~/.ssh
842
	 * directory if it doesn't already exist.
842
	 * directory if it doesn't already exist.
843
	 */
843
	 */
844
	r = snprintf(buf, sizeof buf, "%s%s%s", pw->pw_dir,
844
	if (config == NULL) {
845
	    strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR);
845
		r = snprintf(buf, sizeof buf, "%s%s%s", pw->pw_dir,
846
	if (r > 0 && (size_t)r < sizeof(buf) && stat(buf, &st) < 0)
846
		    strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR);
847
		if (mkdir(buf, 0700) < 0)
847
		if (r > 0 && (size_t)r < sizeof(buf) && stat(buf, &st) < 0)
848
			error("Could not create directory '%.200s'.", buf);
848
			if (mkdir(buf, 0700) < 0)
849
				error("Could not create directory '%.200s'.",
850
				    buf);
851
	}
849
852
850
	/* load options.identity_files */
853
	/* load options.identity_files */
851
	load_public_identity_files();
854
	load_public_identity_files();

Return to bug 1942