1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00
freebsd-ports/security/openssh/files/patch-sftp-server.c
Dirk Meyer d645ac0bfa - add defines for comatibility with older FreeBSD releases 3.x and 2.2.8
SHUT_RD, SHUT_WR, SHUT_RDWR
	INET_ADDRSTRLEN
- add dirname() from FreeBSD 4.5
- use utimes instead of futimes fore FreeBSD < 4.x
2002-03-08 20:51:56 +00:00

26 lines
647 B
C

--- sftp-server.c.orig Wed Feb 13 01:28:13 2002
+++ sftp-server.c Fri Mar 8 21:15:56 2002
@@ -614,6 +614,9 @@
u_int32_t id;
int handle, fd, ret;
int status = SSH2_FX_OK;
+#if defined(__FreeBSD__) && __FreeBSD__ <= 3
+ char *name;
+#endif
id = get_int();
handle = get_handle();
@@ -634,7 +637,12 @@
status = errno_to_portable(errno);
}
if (a->flags & SSH2_FILEXFER_ATTR_ACMODTIME) {
+#if defined(__FreeBSD__) && __FreeBSD__ <= 3
+ name = handle_to_name(handle);
+ ret = utimes(name, attrib_to_tv(a));
+#else
ret = futimes(fd, attrib_to_tv(a));
+#endif
if (ret == -1)
status = errno_to_portable(errno);
}