Package: proftpd-dfsg
Severity: wishlist
Tags: patch

Hi!

ProFTPd 1.3.3 ships with a new module, mod_sftp, that adds the ability
to provide a SFTP/SCP server using all other ProFTPd features (logins,
quota, and others).

As I was eager to give it a try, I have somehow worked on upgrading the
current package to 1.3.3.  Attached you will find the result as a diff
of the Debian directory.

Changes made:
  - build new modules mod_exec, mod_sftp, mod_sftp_pam, mod_sftp_sql,
    mod_shaper and mod_sql_passwd;
  - refresh autotools.dpatch, odbc.dpatch, 3204.dpatch;
  - drop obsolete mod_xfer.c.dpatch and CVE-2009-3736.dpatch.

The later was fixed in the upstream commit that is visible here:
  
http://proftp.cvs.sourceforge.net/viewvc/proftp/proftpd/lib/libltdl/ltdl.c?r1=1.3&r2=1.4

Please note that I have not made thorough checks and I can only confirm
that the resulting package was able to provide standard FTP and SFTP to
restricted accounts stored in a MySQL database, with quota being
updated as it should.

Hope that'll be an help in getting a newer package in Debian.

Cheers,
-- 
Jérémy Bobbio - Administrateur système et réseau
Mezcalito - http://www.mezcalito.fr
17 boulevard Agutte Sembat - 38000 Grenoble
04 76 01 03 91
diff -Nur ../proftpd-dfsg-1.3.2e/debian/changelog debian/changelog
--- ../proftpd-dfsg-1.3.2e/debian/changelog	2010-04-08 16:16:24.000000000 +0200
+++ debian/changelog	2010-04-09 11:36:29.000000000 +0200
@@ -1,3 +1,13 @@
+proftpd-dfsg (1.3.3-1) UNRELEASED; urgency=low
+
+  * New upstream release:
+    - build new modules mod_exec, mod_sftp, mod_sftp_pam, mod_sftp_sql,
+      mod_shaper and mod_sql_passwd;
+    - refresh autotools.dpatch, odbc.dpatch, 3204.dpatch;
+    - drop obsolete mod_xfer.c.dpatch and CVE-2009-3736.dpatch.
+
+ -- Jérémy Bobbio <jer...@mezcalito.fr>  Fri, 09 Apr 2010 09:20:56 +0200
+
 proftpd-dfsg (1.3.2e-4) unstable; urgency=low
 
   * Fixed inetd_check() in init file. Thanks Mats Erik Andersson.
diff -Nur ../proftpd-dfsg-1.3.2e/debian/control debian/control
--- ../proftpd-dfsg-1.3.2e/debian/control	2010-04-08 16:16:24.000000000 +0200
+++ debian/control	2010-04-09 14:44:11.000000000 +0200
@@ -14,7 +14,7 @@
  ucf (>= 0.30), debianutils (>= 1.21.0), libpam-runtime (>= 0.76-13.1),  sed (>= 4.1.5), update-inetd
 Conflicts: ftp-server, proftpd (<< 1.3.2)
 Replaces: proftpd (<< 1.3.2)
-Provides: ftp-server, proftpd, proftpd-abi-1.3.2e
+Provides: ftp-server, proftpd, proftpd-abi-1.3.3
 Suggests: proftpd-doc, openssl, proftpd-mod-mysql, proftpd-mod-pgsql, proftpd-mod-ldap, proftpd-mod-odbc, proftpd-mod-sqlite, openbsd-inetd | inet-superserver
 Description: Versatile, virtual-hosting FTP daemon - binaries
  ProFTPd is a powerful replacement for wu-ftpd. This File Transfer Protocol
diff -Nur ../proftpd-dfsg-1.3.2e/debian/patches/00list debian/patches/00list
--- ../proftpd-dfsg-1.3.2e/debian/patches/00list	2010-04-08 16:16:24.000000000 +0200
+++ debian/patches/00list	2010-04-09 10:02:46.000000000 +0200
@@ -1,7 +1,6 @@
 autotools
 change_pam_name
 xferstats.holger-preiss
-mod_xfer.c
 ftpasswd.cracklib.location
 quotatab_modules
 mod_sql_mysql.c
@@ -10,5 +9,4 @@
 mod_cap
 odbc
 3204
-CVE-2009-3736
 mod_vroot
diff -Nur ../proftpd-dfsg-1.3.2e/debian/patches/3204.dpatch debian/patches/3204.dpatch
--- ../proftpd-dfsg-1.3.2e/debian/patches/3204.dpatch	2010-04-08 16:16:24.000000000 +0200
+++ debian/patches/3204.dpatch	2010-04-09 09:50:12.000000000 +0200
@@ -6,26 +6,30 @@
 
 @DPATCH@
 diff -urNad trunk~/src/prxs.in trunk/src/prxs.in
---- trunk~/src/prxs.in	2009-07-17 10:52:29.000000000 +0200
-+++ trunk/src/prxs.in	2009-07-17 10:52:48.000000000 +0200
-@@ -51,8 +51,13 @@
- my $shell = q(@SHELL@);
+--- trunk~/src/prxs	2010-02-24 19:02:36.000000000 +0100
++++ trunk/src/prxs	2010-04-09 09:20:55.000000000 +0200
+@@ -30,14 +30,14 @@
+ my $prog = basename($0);
+ 
+ my $compiler = q(gcc);
+-my $cflags = q( -DLINUX -O2 -Wall -DPR_SHARED_MODULE);
++my $cflags = q( -DLINUX -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_OPENSSL -DUSE_LDAP_TLS  -Wall -DPR_SHARED_MODULE);
+ my $cppflags = q();
+-my $ltdl_ldflags = q();
+-my $sbindir = q(/usr/local/sbin);
+-my $includedir = q(/usr/local/include);
++my $ltdl_ldflags = q(-avoid-version -export-dynamic -module);
++my $sbindir = q(/usr/sbin);
++my $includedir = q(/usr/include);
+ my $installer = q(/usr/bin/install -c);
+ my $install_strip = q(-s);
+-my $libexecdir = q(/usr/local/libexec);
++my $libexecdir = q(/usr/lib/proftpd);
+ my $libtool = 'libtool';
  
- my $opts = {};
--GetOptions($opts, 'c|compile', 'i|install', 'd|clean', 'name=s', 'D=s@',
--  'I=s@', 'L=s@', 'l=s@', 'W=s@');
-+GetOptions($opts, 'c|compile', 'i|install', 'd|clean', 'h|help', 'name=s',
-+  'D=s@', 'I=s@', 'L=s@', 'l=s@', 'W=s@');
-+
-+if ($opts->{h}) {
-+  usage();
-+  exit 0;
-+}
- 
- # Make sure we can query proftpd to find out its list of installed modules.
- # Unless we see mod_dso listed, there's no point in compiling a shared
-@@ -127,6 +132,36 @@
-     $ldflags .= " -L$libdir";
+ if (!defined($ENV{LIBTOOL})) {
+@@ -163,6 +163,36 @@
+     }
    }
  
 +  # Scan through the .c files, looking for the $Libraries$ hint that
@@ -61,18 +65,9 @@
    my $libs = "";
    foreach my $lib (@{ $opts->{l} }) {
      $libs .= " -l$lib";
-@@ -140,7 +175,7 @@
- 
- if (defined($opts->{i})) {
-   my $cmds = [];
--  push(@$cmds, "$shell $libtool --mode=install $installer $install_strip $mod_name.la $libexecdir");
-+  push(@$cmds, "$shell $libtool --mode=install $installer $install_strip $mod_name.la $ENV{DESTDIR}$libexecdir");
+@@ -286,3 +316,53 @@
  
-   run_cmds($cmds);
- 
-@@ -200,3 +235,53 @@
-     }
-   }
+ EOU
  }
 +
 +sub usage {
diff -Nur ../proftpd-dfsg-1.3.2e/debian/patches/CVE-2009-3736.dpatch debian/patches/CVE-2009-3736.dpatch
--- ../proftpd-dfsg-1.3.2e/debian/patches/CVE-2009-3736.dpatch	2010-04-08 16:16:24.000000000 +0200
+++ debian/patches/CVE-2009-3736.dpatch	1970-01-01 01:00:00.000000000 +0100
@@ -1,98 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## CVE-2009-3736.dpatch by Francesco Paolo Lovergine <fran...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
-...@dpatch@
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' trunk~/lib/libltdl/ltdl.c trunk/lib/libltdl/ltdl.c
---- trunk~/lib/libltdl/ltdl.c	2009-02-14 09:21:21.000000000 +0100
-+++ trunk/lib/libltdl/ltdl.c	2010-02-23 13:45:23.000000000 +0100
-@@ -2162,7 +2162,8 @@
- static	int	try_dlopen	      LT_PARAMS((lt_dlhandle *handle,
- 						 const char *filename));
- static	int	tryall_dlopen	      LT_PARAMS((lt_dlhandle *handle,
--						 const char *filename));
-+						 const char *filename,
-+						 const char * useloader));
- static	int	unload_deplibs	      LT_PARAMS((lt_dlhandle handle));
- static	int	lt_argz_insert	      LT_PARAMS((char **pargz,
- 						 size_t *pargz_len,
-@@ -2348,9 +2349,10 @@
- }
- 
- static int
--tryall_dlopen (handle, filename)
-+tryall_dlopen (handle, filename, useloader)
-      lt_dlhandle *handle;
-      const char *filename;
-+	 const char *useloader;
- {
-   lt_dlhandle	 cur;
-   lt_dlloader   *loader;
-@@ -2417,6 +2419,11 @@
- 
-   while (loader)
-     {
-+      if (useloader && strcmp(loader->loader_name, useloader))
-+	    {
-+	      loader = loader->next;
-+	      continue;
-+	    }
-       lt_user_data data = loader->dlloader_data;
- 
-       cur->module = loader->module_open (data, filename);
-@@ -2486,7 +2493,7 @@
-       error += tryall_dlopen_module (handle,
- 				     (const char *) 0, prefix, filename);
-     }
--  else if (tryall_dlopen (handle, filename) != 0)
-+  else if (tryall_dlopen (handle, filename, NULL) != 0)
-     {
-       ++error;
-     }
-@@ -2507,7 +2514,7 @@
-   /* Try to open the old library first; if it was dlpreopened,
-      we want the preopened version of it, even if a dlopenable
-      module is available.  */
--  if (old_name && tryall_dlopen (handle, old_name) == 0)
-+  if (old_name && tryall_dlopen (handle, old_name, "dlpreload") == 0)
-     {
-       return 0;
-     }
-@@ -2771,7 +2778,7 @@
- 
-   /* Try to dlopen the file, but do not continue searching in any
-      case.  */
--  if (tryall_dlopen (handle, filename) != 0)
-+  if (tryall_dlopen (handle, filename, NULL) != 0)
-     *handle = 0;
- 
-   return 1;
-@@ -3056,7 +3063,7 @@
-       /* lt_dlclose()ing yourself is very bad!  Disallow it.  */
-       LT_DLSET_FLAG (*phandle, LT_DLRESIDENT_FLAG);
- 
--      if (tryall_dlopen (&newhandle, 0) != 0)
-+      if (tryall_dlopen (&newhandle, 0, NULL) != 0)
- 	{
- 	  LT_DLFREE (*phandle);
- 	  return 1;
-@@ -3178,7 +3185,7 @@
- 	    }
- #endif
- 	}
--      if (!file)
-+    else
- 	{
- 	  file = fopen (filename, LT_READTEXT_MODE);
- 	}
-@@ -3362,7 +3369,7 @@
- #endif
- 		   )))
- 	{
--          if (tryall_dlopen (&newhandle, filename) != 0)
-+          if (tryall_dlopen (&newhandle, filename, NULL) != 0)
-             {
-               newhandle = NULL;
-             }
diff -Nur ../proftpd-dfsg-1.3.2e/debian/patches/autotools.dpatch debian/patches/autotools.dpatch
--- ../proftpd-dfsg-1.3.2e/debian/patches/autotools.dpatch	2010-04-08 16:16:24.000000000 +0200
+++ debian/patches/autotools.dpatch	2010-04-09 09:43:20.000000000 +0200
@@ -9,7 +9,7 @@
 diff -urNad trunk~/Makefile.in trunk/Makefile.in
 --- trunk~/Makefile.in	2007-10-09 23:44:52.000000000 +0200
 +++ trunk/Makefile.in	2007-10-10 00:02:02.000000000 +0200
-@@ -168,17 +168,17 @@
+@@ -195,10 +195,10 @@
  
  
  # autoheader might not change config.h.in, so touch a stamp file.
@@ -24,12 +24,3 @@
  
  config.h: stamp-h
  stamp-h: config.h.in config.status
- 	./config.status
- 
--${srcdir}/configure: configure.in
--	cd ${srcdir} && autoconf
-+#${srcdir}/configure: configure.ac
-+#	cd ${srcdir} && autoconf
- 
- Make.rules: Make.rules.in config.status
- 	./config.status
diff -Nur ../proftpd-dfsg-1.3.2e/debian/patches/mod_xfer.c.dpatch debian/patches/mod_xfer.c.dpatch
--- ../proftpd-dfsg-1.3.2e/debian/patches/mod_xfer.c.dpatch	2010-04-08 16:16:24.000000000 +0200
+++ debian/patches/mod_xfer.c.dpatch	1970-01-01 01:00:00.000000000 +0100
@@ -1,26 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## mod_xfer.c.dpatch by Francesco Paolo Lovergine <fran...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
-...@dpatch@
-diff -urNad trunk~/modules/mod_xfer.c trunk/modules/mod_xfer.c
---- trunk~/modules/mod_xfer.c	2007-10-09 23:45:03.000000000 +0200
-+++ trunk/modules/mod_xfer.c	2007-10-10 00:09:12.000000000 +0200
-@@ -1703,10 +1703,12 @@
- 
-   fmode = file_mode(dir);
- 
-+  if(!fmode) {
-+      pr_response_add_err(R_550,"%s: %s",cmd->arg,strerror(errno));
-+      return PR_ERROR(cmd);
-+  }
-+ 
-   if (!S_ISREG(fmode)) {
--    if (!fmode)
--      pr_response_add_err(R_550, "%s: %s", cmd->arg, strerror(errno));
--    else
-       pr_response_add_err(R_550, _("%s: Not a regular file"), cmd->arg);
-     return PR_ERROR(cmd);
-   }
diff -Nur ../proftpd-dfsg-1.3.2e/debian/patches/odbc.dpatch debian/patches/odbc.dpatch
--- ../proftpd-dfsg-1.3.2e/debian/patches/odbc.dpatch	2010-04-08 16:16:24.000000000 +0200
+++ debian/patches/odbc.dpatch	2010-04-09 09:46:47.000000000 +0200
@@ -13,7 +13,7 @@
 @@ -22,6 +22,7 @@
   * the source code for OpenSSL in the source distribution.
   *
-  * $Id: mod_sql_odbc.c,v 1.7.2.1 2009/06/30 16:44:20 castaglia Exp $
+  * $Id: mod_sql_odbc.c,v 1.11 2009/10/02 21:22:56 castaglia Exp $
 + * $Libraries: -lodbc $
   */
  
diff -Nur ../proftpd-dfsg-1.3.2e/debian/proftpd-basic.install debian/proftpd-basic.install
--- ../proftpd-dfsg-1.3.2e/debian/proftpd-basic.install	2010-04-08 16:16:24.000000000 +0200
+++ debian/proftpd-basic.install	2010-04-09 10:52:49.000000000 +0200
@@ -6,24 +6,29 @@
 etc/proftpd
 usr/lib/proftpd/mod_ban.so
 usr/lib/proftpd/mod_ctrls_admin.so
+usr/lib/proftpd/mod_dynmasq.so
+usr/lib/proftpd/mod_exec.so
 usr/lib/proftpd/mod_facl.so
 usr/lib/proftpd/mod_ifsession.so
 usr/lib/proftpd/mod_load.so
-usr/lib/proftpd/mod_dynmasq.so
-usr/lib/proftpd/mod_quotatab_file.so
 usr/lib/proftpd/mod_quotatab.so
+usr/lib/proftpd/mod_quotatab_file.so
 usr/lib/proftpd/mod_quotatab_radius.so
 usr/lib/proftpd/mod_quotatab_sql.so
 usr/lib/proftpd/mod_radius.so
 usr/lib/proftpd/mod_ratio.so
 usr/lib/proftpd/mod_rewrite.so
+usr/lib/proftpd/mod_sftp.so
+usr/lib/proftpd/mod_sftp_pam.so
+usr/lib/proftpd/mod_shaper.so
 usr/lib/proftpd/mod_site_misc.so
 usr/lib/proftpd/mod_sql.so
+usr/lib/proftpd/mod_sql_passwd.so
 usr/lib/proftpd/mod_tls.so
+usr/lib/proftpd/mod_unique_id.so
+usr/lib/proftpd/mod_vroot.so
+usr/lib/proftpd/mod_wrap.so
 usr/lib/proftpd/mod_wrap2.so
 usr/lib/proftpd/mod_wrap2_file.so
 usr/lib/proftpd/mod_wrap2_sql.so
-usr/lib/proftpd/mod_wrap.so
-usr/lib/proftpd/mod_unique_id.so
-usr/lib/proftpd/mod_vroot.so
 usr/share/locale/*
diff -Nur ../proftpd-dfsg-1.3.2e/debian/rules debian/rules
--- ../proftpd-dfsg-1.3.2e/debian/rules	2010-04-08 16:16:24.000000000 +0200
+++ debian/rules	2010-04-09 10:51:16.000000000 +0200
@@ -35,7 +35,9 @@
 # Note: use --localstatedir=/var/run/proftpd for > 1.3.2
 DSOMODS1 = mod_unique_id:mod_site_misc:mod_load:mod_ban:mod_quotatab:mod_sql:mod_sql_mysql:mod_sql_postgres:mod_sql_sqlite:mod_sql_odbc:mod_dynmasq:
 DSOMODS2 = mod_quotatab_sql:mod_ldap:mod_quotatab_ldap:mod_ratio:mod_tls:mod_rewrite:mod_radius:mod_wrap:mod_wrap2:mod_wrap2_file:
-DSOMODS3 = mod_wrap2_sql:mod_quotatab_file:mod_quotatab_radius:mod_facl:mod_ctrls_admin:mod_vroot:mod_ifsession
+DSOMODS3 = mod_wrap2_sql:mod_quotatab_file:mod_quotatab_radius:mod_facl:mod_ctrls_admin:mod_vroot:mod_ifsession:
+DSOMODS4 = mod_exec:mod_sftp:mod_sftp_pam:mod_sftp_sql:mod_shaper:mod_sql_passwd
+
 CONF_ARGS := --prefix=/usr \
 	     --with-includes=$(shell pg_config --includedir):$(shell mysql_config --include|sed -e 's/-I//') \
 	     --mandir=/usr/share/man --sysconfdir=/etc/$(NAME) --localstatedir=/var/run --libexecdir=/usr/lib/$(NAME) \
@@ -83,7 +85,7 @@
 		mv ./config.guess ./config.guess.original && \
 		cp -f /usr/share/misc/config.guess ./config.guess
 	
-	./configure $(CONF_ARGS) --with-shared=$(DSOMODS1)$(DSOMODS2)$(DSOMODS3)
+	./configure $(CONF_ARGS) --with-shared=$(DSOMODS1)$(DSOMODS2)$(DSOMODS3)$(DSOMODS4)
 	
 	touch $@
 

Attachment: signature.asc
Description: PGP signature

Reply via email to