summaryrefslogtreecommitdiff
path: root/ftp/pure-ftpd
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2009-02-16 11:26:01 +0000
committerRenato Botelho <garga@FreeBSD.org>2009-02-16 11:26:01 +0000
commita22a24b1c82b7b07a186e00af1d5229816c0093b (patch)
tree906da1c266457cf3e52c21fd7e70b71e07293598 /ftp/pure-ftpd
parent- update to security release 9.4.3-P1 (diff)
Fix following problem:
Pure-ftpd supports the "SITE UTIME" command, which allows the client to set the modification time of a file to a particular timestamp, expressed in UTC. However, pure-ftpd passes the UTC timestamp directly to the operating system's utime() function, which is a bug, because utime() requires that the timestamp be in local time instead of UTC. For example for server with MSK localtime: > ---> MDTM cuba2008_1.mpeg.stat > <--- 213 20090106074437 > ---> SITE UTIME cuba2008_1.mpeg.stat 20090106104437 20090106104437 20090106104437 UTC > <--- 250 UTIME OK PR: ports/131645 Submitted by: Yar Odin <yarodin@gmai.com>
Notes
Notes: svn path=/head/; revision=228498
Diffstat (limited to 'ftp/pure-ftpd')
-rw-r--r--ftp/pure-ftpd/Makefile2
-rw-r--r--ftp/pure-ftpd/files/patch-src_ftpd.c17
2 files changed, 13 insertions, 6 deletions
diff --git a/ftp/pure-ftpd/Makefile b/ftp/pure-ftpd/Makefile
index e75acf604650..c571cdf205eb 100644
--- a/ftp/pure-ftpd/Makefile
+++ b/ftp/pure-ftpd/Makefile
@@ -7,7 +7,7 @@
PORTNAME= pure-ftpd
PORTVERSION= 1.0.21
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= ftp ipv6
MASTER_SITES= http://download.pureftpd.org/pub/pure-ftpd/releases/ \
ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/ \
diff --git a/ftp/pure-ftpd/files/patch-src_ftpd.c b/ftp/pure-ftpd/files/patch-src_ftpd.c
index 26919d0a452f..ac00c7b570a5 100644
--- a/ftp/pure-ftpd/files/patch-src_ftpd.c
+++ b/ftp/pure-ftpd/files/patch-src_ftpd.c
@@ -1,6 +1,15 @@
---- src/ftpd.c 2006-02-21 14:14:49.000000000 +0100
-+++ src/ftpd.c 2007-12-20 14:53:56.000000000 +0100
-@@ -3439,14 +3439,14 @@ void dofeat(void)
+--- src/ftpd.c.orig 2006-02-21 16:14:49.000000000 +0300
++++ src/ftpd.c 2009-02-13 17:55:48.000000000 +0300
+@@ -2541,7 +2541,7 @@
+ tm.tm_mon--;
+ tm.tm_year -= 1900;
+ if (tm.tm_mon < 0 || tm.tm_year <= 0 ||
+- (ts = mktime(&tm)) == (time_t) -1) {
++ (ts = timegm(&tm)) == (time_t) -1) {
+ addreply_noformat(501, MSG_TIMESTAMP_FAILURE);
+ return;
+ }
+@@ -3439,14 +3439,14 @@
# define FEAT_UTF8 ""
#endif
@@ -17,5 +26,3 @@
}
#endif
addreply_noformat(0, feat);
-
-