diff options
author | Damien Miller <djm@mindrot.org> | 2008-06-29 22:46:35 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2008-06-29 22:46:35 +1000 |
commit | 9e720284fe63aa8e59983b880447ed4ae768387c (patch) | |
tree | 42a27c06c3ffd9bba4dafca6eb617059a85e9bad /sftp-client.c | |
parent | 007132a7c92e603ffb76862cedb28f3165582731 (diff) |
- djm@cvs.openbsd.org 2008/06/26 06:10:09
[sftp-client.c sftp-server.c]
allow the sftp chmod(2)-equivalent operation to set set[ug]id/sticky
bits. Note that this only affects explicit setting of modes (e.g. via
sftp(1)'s chmod command) and not file transfers. (bz#1310)
ok deraadt@ at c2k8
Diffstat (limited to 'sftp-client.c')
-rw-r--r-- | sftp-client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sftp-client.c b/sftp-client.c index 2565a704d..42bf0c813 100644 --- a/sftp-client.c +++ b/sftp-client.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp-client.c,v 1.85 2008/06/12 20:47:04 djm Exp $ */ | 1 | /* $OpenBSD: sftp-client.c,v 1.86 2008/06/26 06:10:09 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> | 3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> |
4 | * | 4 | * |
@@ -920,7 +920,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path, | |||
920 | if (a == NULL) | 920 | if (a == NULL) |
921 | return(-1); | 921 | return(-1); |
922 | 922 | ||
923 | /* XXX: should we preserve set[ug]id? */ | 923 | /* Do not preserve set[ug]id here, as we do not preserve ownership */ |
924 | if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) | 924 | if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) |
925 | mode = a->perm & 0777; | 925 | mode = a->perm & 0777; |
926 | else | 926 | else |