From 200e3c9c9adfeafe431c7af1aeb7a3dd9d4ac130 Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Mon, 15 Jan 2001 01:56:46 +0000 Subject: 20010115 - (bal) sftp-server.c change to use chmod() if fchmod() does not exist. --- ChangeLog | 3 +++ sftp-server.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 437bada8f..56da470b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +20010115 + - (bal) sftp-server.c change to use chmod() if fchmod() does not exist. + 20010114 - (stevesk) initial work for OpenBSD "support supplementary group in {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) status = SSH2_FX_FAILURE; } else { if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) { +#ifdef HAVE_FCHMOD ret = fchmod(fd, a->perm & 0777); +#else + ret = chmod(name, a->perm & 077); +#endif if (ret == -1) status = errno_to_portable(errno); } -- cgit v1.2.3