commit | 200e3c9c9adfeafe431c7af1aeb7a3dd9d4ac130 | [log] [tgz] |
---|---|---|
author | Ben Lindstrom <mouring@eviladmin.org> | Mon Jan 15 01:56:46 2001 +0000 |
committer | Ben Lindstrom <mouring@eviladmin.org> | Mon Jan 15 01:56:46 2001 +0000 |
tree | 62749ce131f561657fcd79ab5cd991fd333cdd1a | |
parent | 7b61cfa1ec06d6ad8026818d1f3c81443cc53b67 [diff] [blame] |
20010115 - (bal) sftp-server.c change to use chmod() if fchmod() does not exist.
diff --git a/sftp-server.c b/sftp-server.c index 40a5353..e4432ca 100644 --- a/sftp-server.c +++ b/sftp-server.c
@@ -685,7 +685,11 @@ 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); }