[sftp-server.c]
     SSH2_FILEXFER_ATTR_UIDGID support; ok markus@
This commit is contained in:
Kevin Steves 2001-02-05 13:24:35 +00:00
Родитель ef4eea9bad
Коммит 8e74393416
2 изменённых файлов: 15 добавлений и 2 удалений

Просмотреть файл

@ -6,6 +6,9 @@
- stevesk@cvs.openbsd.org 2001/02/04 08:32:27
[many files; did this manually to our top-level source dir]
unexpand and remove end-of-line whitespace; ok markus@
- stevesk@cvs.openbsd.org 2001/02/04 15:21:19
[sftp-server.c]
SSH2_FILEXFER_ATTR_UIDGID support; ok markus@
20010104
- (bal) I think this is the last of the bsd-*.h that don't belong.
@ -40,7 +43,7 @@
- (djm) Makefile.in fixes
- (stevesk) add mysignal() wrapper and use it for the protocol 2
SIGCHLD handler.
- (djm) Use setvbuf() instead of setlinebuf(). Suggest from stevek@
- (djm) Use setvbuf() instead of setlinebuf(). Suggest from stevesk@
20010103
- (bal) Cygwin clean up by Corinna Vinschen <vinschen@redhat.com>

Просмотреть файл

@ -22,7 +22,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "includes.h"
RCSID("$OpenBSD: sftp-server.c,v 1.15 2001/02/04 11:11:54 djm Exp $");
RCSID("$OpenBSD: sftp-server.c,v 1.18 2001/02/04 22:21:19 stevesk Exp $");
#include "buffer.h"
#include "bufaux.h"
@ -561,6 +561,11 @@ process_setstat(void)
if (ret == -1)
status = errno_to_portable(errno);
}
if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) {
ret = chown(name, a->uid, a->gid);
if (ret == -1)
status = errno_to_portable(errno);
}
send_status(id, status);
xfree(name);
}
@ -601,6 +606,11 @@ process_fsetstat(void)
if (ret == -1)
status = errno_to_portable(errno);
}
if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) {
ret = fchown(fd, a->uid, a->gid);
if (ret == -1)
status = errno_to_portable(errno);
}
}
send_status(id, status);
}