version 1.37, 2002/11/21 23:03:51 |
version 1.38, 2003/01/06 23:51:22 |
|
|
|
|
/* XXX: should we preserve set[ug]id? */ |
/* XXX: should we preserve set[ug]id? */ |
if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) |
if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) |
mode = S_IWRITE | (a->perm & 0777); |
mode = a->perm & 0777; |
else |
else |
mode = 0666; |
mode = 0666; |
|
|
|
|
return(-1); |
return(-1); |
} |
} |
|
|
local_fd = open(local_path, O_WRONLY | O_CREAT | O_TRUNC, mode); |
local_fd = open(local_path, O_WRONLY | O_CREAT | O_TRUNC, |
|
mode | S_IWRITE); |
if (local_fd == -1) { |
if (local_fd == -1) { |
error("Couldn't open local file \"%s\" for writing: %s", |
error("Couldn't open local file \"%s\" for writing: %s", |
local_path, strerror(errno)); |
local_path, strerror(errno)); |