[SCM] proftpd-dfsg branch, squeeze, updated. debian/1.3.3a-6-11-gd3ad62c

Francesco Paolo Lovergine frankie at debian.org
Tue Jan 8 12:55:33 UTC 2013


The following commit has been merged in the squeeze branch:
commit 737b3f101b07ef6c395f2f3938cdcb76af49b2f6
Author: Francesco Paolo Lovergine <frankie at debian.org>
Date:   Tue Jan 8 12:55:27 2013 +0100

    Fixed patch 3841 for pr_fsio_lchown() use.

diff --git a/debian/changelog b/debian/changelog
index f92e065..55a969a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+proftpd-dfsg (1.3.3a-6squeeze6) stable-security; urgency=low
+
+  * Fixed patch 3841 to include the new pr_fsio_lchown() function 
+    to correctly backport changes.
+
+ -- Francesco Paolo Lovergine <frankie at debian.org>  Tue, 08 Jan 2013 12:54:23 +0100
+
 proftpd-dfsg (1.3.3a-6squeeze5) stable-security; urgency=low
 
   * [SECURITY] 3841.dpatch. This patch fixes a possible race condition in the
diff --git a/debian/patches/3841.dpatch b/debian/patches/3841.dpatch
index 40bb24f..8b76905 100755
--- a/debian/patches/3841.dpatch
+++ b/debian/patches/3841.dpatch
@@ -6,8 +6,8 @@
 
 @DPATCH@
 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' proftpd-dfsg~/contrib/mod_sftp/fxp.c proftpd-dfsg/contrib/mod_sftp/fxp.c
---- proftpd-dfsg~/contrib/mod_sftp/fxp.c	2013-01-08 10:30:08.000000000 +0100
-+++ proftpd-dfsg/contrib/mod_sftp/fxp.c	2013-01-08 10:38:43.000000000 +0100
+--- proftpd-dfsg~/contrib/mod_sftp/fxp.c	2013-01-08 12:34:48.000000000 +0100
++++ proftpd-dfsg/contrib/mod_sftp/fxp.c	2013-01-08 12:45:43.000000000 +0100
 @@ -5341,6 +5341,7 @@
    uint32_t attr_flags, buflen, bufsz, status_code;
    struct fxp_packet *resp;
@@ -27,8 +27,8 @@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch'
      int xerrno = errno;
  
 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' proftpd-dfsg~/contrib/mod_sftp/scp.c proftpd-dfsg/contrib/mod_sftp/scp.c
---- proftpd-dfsg~/contrib/mod_sftp/scp.c	2013-01-08 10:26:35.000000000 +0100
-+++ proftpd-dfsg/contrib/mod_sftp/scp.c	2013-01-08 10:31:24.000000000 +0100
+--- proftpd-dfsg~/contrib/mod_sftp/scp.c	2013-01-08 12:34:48.000000000 +0100
++++ proftpd-dfsg/contrib/mod_sftp/scp.c	2013-01-08 12:45:43.000000000 +0100
 @@ -711,7 +711,7 @@
        if (xerrno == ENOENT) {
          pr_trace_msg(trace_channel, 5, "creating directory '%s'", sp->filename);
@@ -39,9 +39,17 @@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch'
  
            (void) pr_log_writefile(sftp_logfd, MOD_SFTP_VERSION,
 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' proftpd-dfsg~/include/fsio.h proftpd-dfsg/include/fsio.h
---- proftpd-dfsg~/include/fsio.h	2013-01-08 10:26:35.000000000 +0100
-+++ proftpd-dfsg/include/fsio.h	2013-01-08 10:31:24.000000000 +0100
-@@ -249,6 +249,7 @@
+--- proftpd-dfsg~/include/fsio.h	2013-01-08 12:34:48.000000000 +0100
++++ proftpd-dfsg/include/fsio.h	2013-01-08 12:53:50.000000000 +0100
+@@ -129,6 +129,7 @@
+   int (*fchmod)(pr_fh_t *, int, mode_t);
+   int (*chown)(pr_fs_t *, const char *, uid_t, gid_t);
+   int (*fchown)(pr_fh_t *, int, uid_t, gid_t);
++  int (*lchown)(pr_fs_t *, const char *, uid_t, gid_t);
+   int (*access)(pr_fs_t *, const char *, int, uid_t, gid_t, array_header *);
+   int (*faccess)(pr_fh_t *, int, uid_t, gid_t, array_header *);
+   int (*utimes)(pr_fs_t *, const char *, struct timeval *);
+@@ -249,6 +250,7 @@
  int pr_fsio_rmdir(const char *);
  int pr_fsio_rename(const char *, const char *);
  int pr_fsio_rename_canon(const char *, const char *);
@@ -49,9 +57,17 @@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch'
  int pr_fsio_unlink(const char *);
  int pr_fsio_unlink_canon(const char *);
  pr_fh_t *pr_fsio_open(const char *, int);
+@@ -270,6 +272,7 @@
+ int pr_fsio_chmod_canon(const char *, mode_t);
+ int pr_fsio_chown(const char *, uid_t, gid_t);
+ int pr_fsio_fchown(pr_fh_t *, uid_t, gid_t);
++int pr_fsio_lchown(const char *, uid_t, gid_t);
+ int pr_fsio_chown_canon(const char *, uid_t, gid_t);
+ int pr_fsio_chroot(const char *);
+ int pr_fsio_access(const char *, int, uid_t, gid_t, array_header *);
 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' proftpd-dfsg~/modules/mod_core.c proftpd-dfsg/modules/mod_core.c
---- proftpd-dfsg~/modules/mod_core.c	2013-01-08 10:26:36.000000000 +0100
-+++ proftpd-dfsg/modules/mod_core.c	2013-01-08 10:40:34.000000000 +0100
+--- proftpd-dfsg~/modules/mod_core.c	2013-01-08 12:34:48.000000000 +0100
++++ proftpd-dfsg/modules/mod_core.c	2013-01-08 12:45:43.000000000 +0100
 @@ -4048,7 +4048,8 @@
      return PR_ERROR(cmd);
    }
@@ -135,8 +151,8 @@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch'
      quote_dir(cmd, dir));
  
 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' proftpd-dfsg~/src/fsio.c proftpd-dfsg/src/fsio.c
---- proftpd-dfsg~/src/fsio.c	2013-01-08 10:26:36.000000000 +0100
-+++ proftpd-dfsg/src/fsio.c	2013-01-08 10:31:24.000000000 +0100
+--- proftpd-dfsg~/src/fsio.c	2013-01-08 12:34:48.000000000 +0100
++++ proftpd-dfsg/src/fsio.c	2013-01-08 12:50:19.000000000 +0100
 @@ -29,6 +29,7 @@
   */
  
@@ -145,7 +161,18 @@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch'
  
  #ifdef HAVE_REGEX_H
  # include <regex.h>
-@@ -2477,6 +2478,170 @@
+@@ -179,6 +180,10 @@
+   return fchown(fd, uid, gid);
+ }
+ 
++static int sys_lchown(pr_fs_t *fs, const char *path, uid_t uid, gid_t gid) {
++  return lchown(path, uid, gid);
++}
++
+ /* We provide our own equivalent of access(2) here, rather than using
+  * access(2) directly, because access(2) uses the real IDs, rather than
+  * the effective IDs, of the process.
+@@ -2477,6 +2482,170 @@
    return res;
  }
  
@@ -316,3 +343,37 @@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch'
  int pr_fsio_rmdir(const char *path) {
    int res;
    pr_fs_t *fs;
+@@ -3335,6 +3504,33 @@
+ 
+   return res;
+ }
++
++int pr_fsio_lchown(const char *name, uid_t uid, gid_t gid) {
++  int res;
++  pr_fs_t *fs;
++
++  fs = lookup_file_fs(name, NULL, FSIO_FILE_CHOWN);
++  if (fs == NULL) {
++    return -1;
++  }
++
++  /* Find the first non-NULL custom lchown handler.  If there are none,
++   * use the system chown.
++   */
++  while (fs && fs->fs_next && !fs->lchown) {
++    fs = fs->fs_next;
++  }
++
++  pr_trace_msg(trace_channel, 8, "using %s lchown() for path '%s'",
++    fs->fs_name, name);
++  res = (fs->lchown)(fs, name, uid, gid);
++
++  if (res == 0) {
++    pr_fs_clear_cache();
++  }
++
++  return res;
++}
+ 
+ int pr_fsio_access(const char *path, int mode, uid_t uid, gid_t gid,
+     array_header *suppl_gids) {

-- 
ProFTPD core package



More information about the Pkg-proftpd-maintainers mailing list