diff options
author | dholland <dholland@pkgsrc.org> | 2016-06-11 21:07:27 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2016-06-11 21:07:27 +0000 |
commit | 1eb1f6d6e1090d78a5132e1c04843c9c997b92d8 (patch) | |
tree | f1f3bc040d9f4908e2952b52aac697ee4170ed12 /sysutils/amanda-common | |
parent | cb2d00ffcd8ad9509ce1da2dffd93163b874efbf (diff) | |
download | pkgsrc-1eb1f6d6e1090d78a5132e1c04843c9c997b92d8.tar.gz |
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 (limited to 'sysutils/amanda-common')
-rw-r--r-- | sysutils/amanda-common/distinfo | 4 | ||||
-rw-r--r-- | sysutils/amanda-common/patches/patch-client-src_getfsent.c | 23 |
2 files changed, 18 insertions, 9 deletions
diff --git a/sysutils/amanda-common/distinfo b/sysutils/amanda-common/distinfo index c650cc61090..7fde8357d7f 100644 --- a/sysutils/amanda-common/distinfo +++ b/sysutils/amanda-common/distinfo @@ -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-Makefile.am) = 005201b7a9b4e875c45362456e100c57fcf700f3 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 --git a/sysutils/amanda-common/patches/patch-client-src_getfsent.c b/sysutils/amanda-common/patches/patch-client-src_getfsent.c index 0356957722b..2019c136972 100644 --- a/sysutils/amanda-common/patches/patch-client-src_getfsent.c +++ b/sysutils/amanda-common/patches/patch-client-src_getfsent.c @@ -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 @@ Support looking up devices by name. /* * 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 @@ Support looking up devices by name. 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 @@ Support looking up devices by name. 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 @@ Support looking up devices by name. s = name; ch = *s++; -@@ -464,6 +489,7 @@ +@@ -464,6 +489,7 @@ dev2rdev( ch = *s++; } amfree(fname); @@ -74,3 +74,12 @@ Support looking up devices by name. 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; |