pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/amanda-common Add small patch from PR 36656 t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/315def257337
branches:  trunk
changeset: 348308:315def257337
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sat Jun 11 21:07:27 2016 +0000

description:
Add small patch from PR 36656 to prevent false matches when looking in
fstab.

(It can also potentially prevent true matches and the whole chunk of
code involved should ideally be rewritten sanely, but it's better than
randomly doing entirely the wrong thing.)

diffstat:

 sysutils/amanda-common/distinfo                            |   4 +-
 sysutils/amanda-common/patches/patch-client-src_getfsent.c |  23 +++++++++----
 2 files changed, 18 insertions(+), 9 deletions(-)

diffs (83 lines):

diff -r 34cc74394d70 -r 315def257337 sysutils/amanda-common/distinfo
--- a/sysutils/amanda-common/distinfo   Sat Jun 11 21:06:48 2016 +0000
+++ b/sysutils/amanda-common/distinfo   Sat Jun 11 21:07:27 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.20 2016/02/29 05:50:40 mlelstv Exp $
+$NetBSD: distinfo,v 1.21 2016/06/11 21:07:27 dholland Exp $
 
 SHA1 (amanda-3.3.1.tar.gz) = 22273381f61319e46e1da9d7029ca2b3991eee98
 RMD160 (amanda-3.3.1.tar.gz) = 0d66ad25fd905901a1afd3651bd6c1e00db9af8d
@@ -8,7 +8,7 @@
 SHA1 (patch-amandad-src_Makefile.am) = bdff2c06da0ee6c88237c56568fe20c5cefedd7a
 SHA1 (patch-application-src_Makefile.am) = 3a5f256ab7e2439c2e19c4f75234d3a677707cc2
 SHA1 (patch-client-src_Makefile.am) = 641ef76fd1ea413b416704e1e52e25a93a596442
-SHA1 (patch-client-src_getfsent.c) = 56ce707aa974d91864e7d8099ceae96c50281704
+SHA1 (patch-client-src_getfsent.c) = 903a921b8679ddcff1fdd838ffdce16a6d8da46f
 SHA1 (patch-client-src_sendbackup-dump.c) = aea1aca0bbcdab0c393b012a592cbc5ca458acec
 SHA1 (patch-client-src_sendsize.c) = 32a1627c250b6413e4695a610bba59796c6e7ed6
 SHA1 (patch-common-src_Makefile.in) = 422e4d519d8797e686d62cfeca8cda2e8a4a8bb3
diff -r 34cc74394d70 -r 315def257337 sysutils/amanda-common/patches/patch-client-src_getfsent.c
--- a/sysutils/amanda-common/patches/patch-client-src_getfsent.c        Sat Jun 11 21:06:48 2016 +0000
+++ b/sysutils/amanda-common/patches/patch-client-src_getfsent.c        Sat Jun 11 21:07:27 2016 +0000
@@ -1,9 +1,9 @@
-$NetBSD: patch-client-src_getfsent.c,v 1.1 2016/02/29 05:50:40 mlelstv Exp $
+$NetBSD: patch-client-src_getfsent.c,v 1.2 2016/06/11 21:07:28 dholland Exp $
 
 Support looking up devices by name.
 
---- client-src/getfsent.c.orig 2012-02-21 12:36:41.000000000 +0100
-+++ client-src/getfsent.c      2016-02-28 09:39:42.565217334 +0100
+--- client-src/getfsent.c.orig 2012-02-21 11:36:41.000000000 +0000
++++ client-src/getfsent.c
 @@ -41,6 +41,12 @@
  
  static char *dev2rdev(char *);
@@ -17,7 +17,7 @@
  /*
   * You are in a twisty maze of passages, all alike.
   * Geesh.
-@@ -74,10 +80,20 @@
+@@ -74,10 +80,20 @@ get_fstab_nextentry(
      struct fstab *sys_fsent = getfsent();
      static char *xfsname = NULL, *xmntdir = NULL;
      static char *xfstype = NULL, *xmntopts = NULL;
@@ -38,7 +38,7 @@
      fsent->mntdir  = xmntdir  = newstralloc(xmntdir,  sys_fsent->fs_file);
      fsent->freq    = sys_fsent->fs_freq;
      fsent->passno  = sys_fsent->fs_passno;
-@@ -429,10 +445,15 @@
+@@ -429,10 +445,15 @@ static char *
  dev2rdev(
      char *    name)
  {
@@ -55,7 +55,7 @@
  
    if(stat(name, &st) == 0 && !S_ISBLK(st.st_mode)) {
      /*
-@@ -441,6 +462,10 @@
+@@ -441,6 +462,10 @@ dev2rdev(
      return stralloc(name);
    }
  
@@ -66,7 +66,7 @@
    s = name;
    ch = *s++;
  
-@@ -464,6 +489,7 @@
+@@ -464,6 +489,7 @@ dev2rdev(
      ch = *s++;
    }
    amfree(fname);
@@ -74,3 +74,12 @@
    return stralloc(name);                      /* no match */
  }
  
+@@ -477,6 +503,8 @@ samefile(
+ {
+   int i;
+   for(i = 0; i < 3; ++i) {
++    if (stats[i].st_dev == (dev_t)-1)
++      continue;
+     if (stats[i].st_dev == estat->st_dev &&
+       stats[i].st_ino == estat->st_ino)
+       return 1;



Home | Main Index | Thread Index | Old Index