diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | sftp-server.c | 4 |
2 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,6 @@ | |||
1 | 20010115 | ||
2 | - (bal) sftp-server.c change to use chmod() if fchmod() does not exist. | ||
3 | |||
1 | 20010114 | 4 | 20010114 |
2 | - (stevesk) initial work for OpenBSD "support supplementary group in | 5 | - (stevesk) initial work for OpenBSD "support supplementary group in |
3 | {Allow,Deny}Groups" patch: | 6 | {Allow,Deny}Groups" patch: |
diff --git a/sftp-server.c b/sftp-server.c index 40a535314..e4432ca51 100644 --- a/sftp-server.c +++ b/sftp-server.c | |||
@@ -685,7 +685,11 @@ process_fsetstat(void) | |||
685 | status = SSH2_FX_FAILURE; | 685 | status = SSH2_FX_FAILURE; |
686 | } else { | 686 | } else { |
687 | if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) { | 687 | if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) { |
688 | #ifdef HAVE_FCHMOD | ||
688 | ret = fchmod(fd, a->perm & 0777); | 689 | ret = fchmod(fd, a->perm & 0777); |
690 | #else | ||
691 | ret = chmod(name, a->perm & 077); | ||
692 | #endif | ||
689 | if (ret == -1) | 693 | if (ret == -1) |
690 | status = errno_to_portable(errno); | 694 | status = errno_to_portable(errno); |
691 | } | 695 | } |