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

Collapse All | Expand All

(-)openssh-5.4p1/ssh-keygen.c.staterr (-1 / +3 lines)
Lines 1829-1835 main(int argc, char **argv) Link Here
1829
	snprintf(dotsshdir, sizeof dotsshdir, "%s/%s", pw->pw_dir, _PATH_SSH_USER_DIR);
1829
	snprintf(dotsshdir, sizeof dotsshdir, "%s/%s", pw->pw_dir, _PATH_SSH_USER_DIR);
1830
	if (strstr(identity_file, dotsshdir) != NULL &&
1830
	if (strstr(identity_file, dotsshdir) != NULL &&
1831
	    stat(dotsshdir, &st) < 0) {
1831
	    stat(dotsshdir, &st) < 0) {
1832
		if (mkdir(dotsshdir, 0700) < 0)
1832
		if (errno == EPERM)
1833
			error("Do not have permisions to stat directory '%s'.", dotsshdir);
1834
		else if (mkdir(dotsshdir, 0700) < 0)
1833
			error("Could not create directory '%s'.", dotsshdir);
1835
			error("Could not create directory '%s'.", dotsshdir);
1834
		else if (!quiet)
1836
		else if (!quiet)
1835
			printf("Created directory '%s'.\n", dotsshdir);
1837
			printf("Created directory '%s'.\n", dotsshdir);

Return to bug 1740