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

Collapse All | Expand All

(-)sftp-client.c (-2 / +3 lines)
Lines 758-764 Link Here
758
758
759
	/* XXX: should we preserve set[ug]id? */
759
	/* XXX: should we preserve set[ug]id? */
760
	if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS)
760
	if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS)
761
		mode = S_IWRITE | (a->perm & 0777);
761
		mode = a->perm & 0777;
762
	else
762
	else
763
		mode = 0666;
763
		mode = 0666;
764
764
Lines 793-799 Link Here
793
		return(-1);
793
		return(-1);
794
	}
794
	}
795
795
796
	local_fd = open(local_path, O_WRONLY | O_CREAT | O_TRUNC, mode);
796
	local_fd = open(local_path, O_WRONLY | O_CREAT | O_TRUNC, 
797
	    mode | S_IWRITE);
797
	if (local_fd == -1) {
798
	if (local_fd == -1) {
798
		error("Couldn't open local file \"%s\" for writing: %s",
799
		error("Couldn't open local file \"%s\" for writing: %s",
799
		    local_path, strerror(errno));
800
		    local_path, strerror(errno));

Return to bug 426