diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sftp-server.c | 12 |
2 files changed, 15 insertions, 2 deletions
@@ -6,6 +6,9 @@ | |||
6 | - stevesk@cvs.openbsd.org 2001/02/04 08:32:27 | 6 | - stevesk@cvs.openbsd.org 2001/02/04 08:32:27 |
7 | [many files; did this manually to our top-level source dir] | 7 | [many files; did this manually to our top-level source dir] |
8 | unexpand and remove end-of-line whitespace; ok markus@ | 8 | unexpand and remove end-of-line whitespace; ok markus@ |
9 | - stevesk@cvs.openbsd.org 2001/02/04 15:21:19 | ||
10 | [sftp-server.c] | ||
11 | SSH2_FILEXFER_ATTR_UIDGID support; ok markus@ | ||
9 | 12 | ||
10 | 20010104 | 13 | 20010104 |
11 | - (bal) I think this is the last of the bsd-*.h that don't belong. | 14 | - (bal) I think this is the last of the bsd-*.h that don't belong. |
@@ -40,7 +43,7 @@ | |||
40 | - (djm) Makefile.in fixes | 43 | - (djm) Makefile.in fixes |
41 | - (stevesk) add mysignal() wrapper and use it for the protocol 2 | 44 | - (stevesk) add mysignal() wrapper and use it for the protocol 2 |
42 | SIGCHLD handler. | 45 | SIGCHLD handler. |
43 | - (djm) Use setvbuf() instead of setlinebuf(). Suggest from stevek@ | 46 | - (djm) Use setvbuf() instead of setlinebuf(). Suggest from stevesk@ |
44 | 47 | ||
45 | 20010103 | 48 | 20010103 |
46 | - (bal) Cygwin clean up by Corinna Vinschen <vinschen@redhat.com> | 49 | - (bal) Cygwin clean up by Corinna Vinschen <vinschen@redhat.com> |
diff --git a/sftp-server.c b/sftp-server.c index 51026de4e..ade2663e7 100644 --- a/sftp-server.c +++ b/sftp-server.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 | */ | 23 | */ |
24 | #include "includes.h" | 24 | #include "includes.h" |
25 | RCSID("$OpenBSD: sftp-server.c,v 1.15 2001/02/04 11:11:54 djm Exp $"); | 25 | RCSID("$OpenBSD: sftp-server.c,v 1.18 2001/02/04 22:21:19 stevesk Exp $"); |
26 | 26 | ||
27 | #include "buffer.h" | 27 | #include "buffer.h" |
28 | #include "bufaux.h" | 28 | #include "bufaux.h" |
@@ -561,6 +561,11 @@ process_setstat(void) | |||
561 | if (ret == -1) | 561 | if (ret == -1) |
562 | status = errno_to_portable(errno); | 562 | status = errno_to_portable(errno); |
563 | } | 563 | } |
564 | if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) { | ||
565 | ret = chown(name, a->uid, a->gid); | ||
566 | if (ret == -1) | ||
567 | status = errno_to_portable(errno); | ||
568 | } | ||
564 | send_status(id, status); | 569 | send_status(id, status); |
565 | xfree(name); | 570 | xfree(name); |
566 | } | 571 | } |
@@ -601,6 +606,11 @@ process_fsetstat(void) | |||
601 | if (ret == -1) | 606 | if (ret == -1) |
602 | status = errno_to_portable(errno); | 607 | status = errno_to_portable(errno); |
603 | } | 608 | } |
609 | if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) { | ||
610 | ret = fchown(fd, a->uid, a->gid); | ||
611 | if (ret == -1) | ||
612 | status = errno_to_portable(errno); | ||
613 | } | ||
604 | } | 614 | } |
605 | send_status(id, status); | 615 | send_status(id, status); |
606 | } | 616 | } |