Bug 131645 - [UPDATE] ftp/pure-ftpd 1.0.21_2 to portrevision 3 - fix UTIME bug
Summary: [UPDATE] ftp/pure-ftpd 1.0.21_2 to portrevision 3 - fix UTIME bug
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Renato Botelho
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-13 15:30 UTC by Yarodin
Modified: 2009-02-16 11:30 UTC (History)
0 users

See Also:


Attachments
file.diff (1.29 KB, patch)
2009-02-13 15:30 UTC, Yarodin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yarodin 2009-02-13 15:30:02 UTC
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

http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg570090.html
http://www.smartftp.com/support/kb/pureftpd-utime-bug-f2615.html

Fix: Patch attached with submission follows:
How-To-Repeat: How to apply:
1) Put patch-mod_geoip.txt to /usr/ports/www/
2) cd /usr/ports/www/ && patch -E -p <patch-mod_geoip.txt && find /usr/ports/www/mod_geoip/ -type f -name "*.orig" -exec rm -f {} \;
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2009-02-13 15:30:13 UTC
Responsible Changed
From-To: freebsd-ports-bugs->garga

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Renato Botelho freebsd_committer freebsd_triage 2009-02-16 11:26:22 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2009-02-16 11:26:30 UTC
garga       2009-02-16 11:26:01 UTC

  FreeBSD ports repository

  Modified files:
    ftp/pure-ftpd        Makefile 
    ftp/pure-ftpd/files  patch-src_ftpd.c 
  Log:
  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>
  
  Revision  Changes    Path
  1.61      +1 -1      ports/ftp/pure-ftpd/Makefile
  1.2       +12 -5     ports/ftp/pure-ftpd/files/patch-src_ftpd.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"