Bugzilla – Attachment 190 Details for
Bug 426
sftp adds write permission when doing get -p
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix permissions on download
sftp-write.diff (text/plain), 820 bytes, created by
Damien Miller
on 2003-01-03 15:12:16 AEDT
(
hide
)
Description:
Fix permissions on download
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2003-01-03 15:12:16 AEDT
Size:
820 bytes
patch
obsolete
>? autom4te-2.53.cache >Index: sftp-client.c >=================================================================== >RCS file: /var/cvs/openssh/sftp-client.c,v >retrieving revision 1.40 >diff -u -r1.40 sftp-client.c >--- sftp-client.c 23 Dec 2002 02:06:20 -0000 1.40 >+++ sftp-client.c 3 Jan 2003 04:09:23 -0000 >@@ -758,7 +758,7 @@ > > /* XXX: should we preserve set[ug]id? */ > if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) >- mode = S_IWRITE | (a->perm & 0777); >+ mode = a->perm & 0777; > else > mode = 0666; > >@@ -793,7 +793,8 @@ > 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) { > error("Couldn't open local file \"%s\" for writing: %s", > local_path, strerror(errno));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 426
:
165
|
166
| 190