summaryrefslogtreecommitdiffstats
path: root/sftp-client.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-06-29 14:46:35 +0200
committerDamien Miller <djm@mindrot.org>2008-06-29 14:46:35 +0200
commit9e720284fe63aa8e59983b880447ed4ae768387c (patch)
tree42a27c06c3ffd9bba4dafca6eb617059a85e9bad /sftp-client.c
parent - otto@cvs.openbsd.org 2008/06/25 11:13:43 (diff)
downloadopenssh-9e720284fe63aa8e59983b880447ed4ae768387c.tar.xz
openssh-9e720284fe63aa8e59983b880447ed4ae768387c.zip
- 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.c4
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 @@
-/* $OpenBSD: sftp-client.c,v 1.85 2008/06/12 20:47:04 djm Exp $ */
+/* $OpenBSD: sftp-client.c,v 1.86 2008/06/26 06:10:09 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -920,7 +920,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
if (a == NULL)
return(-1);
- /* XXX: should we preserve set[ug]id? */
+ /* Do not preserve set[ug]id here, as we do not preserve ownership */
if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS)
mode = a->perm & 0777;
else