diff options
Diffstat (limited to 'security/rdigest')
-rw-r--r-- | security/rdigest/Makefile | 2 | ||||
-rw-r--r-- | security/rdigest/files/patch-aa | 16 | ||||
-rw-r--r-- | security/rdigest/files/patch-ab | 39 | ||||
-rw-r--r-- | security/rdigest/files/patch-ac | 16 | ||||
-rw-r--r-- | security/rdigest/pkg-descr | 47 |
5 files changed, 49 insertions, 71 deletions
diff --git a/security/rdigest/Makefile b/security/rdigest/Makefile index db37b159733a..bba61eded707 100644 --- a/security/rdigest/Makefile +++ b/security/rdigest/Makefile @@ -9,6 +9,8 @@ PORTNAME= rdigest COMMENT= Recursive message digest wrapper utility +DISTNAME= digest-${PORTVERSION} + DESCR= ${.CURDIR}/pkg-descr CONFLICTS= # none diff --git a/security/rdigest/files/patch-aa b/security/rdigest/files/patch-aa index 8320f06d514c..cb5a6e1f303a 100644 --- a/security/rdigest/files/patch-aa +++ b/security/rdigest/files/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.1.1.1 2003/07/24 05:21:05 atatat Exp $ +$NetBSD: patch-aa,v 1.2 2005/03/28 20:52:55 agc Exp $ ---- Makefile.in.orig 2002-12-20 23:06:12.000000000 -0500 -+++ Makefile.in -@@ -56,7 +56,7 @@ missing mkinstalldirs regress.sh +--- Makefile.in.orig 2005-03-28 21:39:38.000000000 +0100 ++++ Makefile.in 2005-03-28 21:41:02.000000000 +0100 +@@ -57,7 +57,7 @@ .c.o: $(COMPILE) -c $< -o $@ @@ -11,7 +11,7 @@ $NetBSD: patch-aa,v 1.1.1.1 2003/07/24 05:21:05 atatat Exp $ digest-types.h: bits ./bits digest-types.h -@@ -64,10 +64,10 @@ digest-types.h: bits +@@ -65,10 +65,10 @@ bits: bits.o $(LINK) $(bits_OBJS) $(LIBS) @@ -24,8 +24,8 @@ $NetBSD: patch-aa,v 1.1.1.1 2003/07/24 05:21:05 atatat Exp $ @SHELL@ $(srcdir)/regress.sh digest.o: digest-types.h -@@ -81,7 +81,7 @@ sha1.o: digest-types.h - sha1hl.o: digest-types.h +@@ -84,7 +84,7 @@ + whirlpool.o: digest-types.h clean: - rm -f *.o digest bits digest-types.h @@ -33,7 +33,7 @@ $NetBSD: patch-aa,v 1.1.1.1 2003/07/24 05:21:05 atatat Exp $ distclean: clean rm -f Makefile config.h -@@ -90,18 +90,18 @@ distclean: clean +@@ -93,18 +93,18 @@ maintainer-clean: distclean rm -f configure config.h.in diff --git a/security/rdigest/files/patch-ab b/security/rdigest/files/patch-ab index c25703f69882..3098b1d69af0 100644 --- a/security/rdigest/files/patch-ab +++ b/security/rdigest/files/patch-ab @@ -1,14 +1,20 @@ -$NetBSD: patch-ab,v 1.1.1.1 2003/07/24 05:21:07 atatat Exp $ +$NetBSD: patch-ab,v 1.3 2005/03/31 05:02:24 atatat Exp $ ---- digest.1.orig 2002-02-16 15:24:32.000000000 -0500 +--- digest.1.orig 2005-03-30 23:40:39.000000000 -0500 +++ digest.1 -@@ -31,21 +31,29 @@ - .\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +@@ -2,5 +2,5 @@ .\" .\" --.Dd February 28, 2001 +-.\" Copyright (c) 2001 Alistair G. Crooks. All rights reserved. ++.\" Copyright (c) 2001-2005 Alistair G. Crooks. All rights reserved. + .\" + .\" Redistribution and use in source and binary forms, with or without +@@ -32,12 +32,13 @@ + .\" + .\" +-.Dd March 23, 2005 -.Dt DIGEST 1 -+.Dd July 24, 2003 ++.Dd March 31, 2005 +.Dt RDIGEST 1 .Os .Sh NAME @@ -21,7 +27,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2003/07/24 05:21:07 atatat Exp $ +.Op Fl x Ar directory .Ar algorithm .Op file ... - .Sh DESCRIPTION +@@ -45,6 +46,13 @@ The .Nm -utility calculates message digests of files or, @@ -36,42 +42,37 @@ $NetBSD: patch-ab,v 1.1.1.1 2003/07/24 05:21:07 atatat Exp $ +.Pp The list of possible algorithms is: .Bl -tag -width Ds - .It md5 -@@ -81,11 +89,32 @@ algorithm implementations, which are loc +@@ -89,4 +97,23 @@ algorithm implementations, which are loc C library, and was designed to be scalable as new message digest algorithms are developed. - .Pp +The checksum for a directory is implemented as the hash over a list of +one or two hashes for each of the items in the tree. +.Bl -bullet +.It +For a file, the string -+.Li Dq f \& ++.Dq f \& +along with the path make up the data for one hash, and the contents of +the file is used for the second hash. +.It +For a symbolic link, the string -+.Li Dq l \& ++.Dq l \& +along with the path to the symbolic link make up the data for one +hash, and the target of the symbolic link is used for the second hash. +.It +For a directory, the string -+.Li Dq d \& ++.Dq d \& +along with the path make up the data for one hash. +There is no second hash for a directory. +.El -+.Pp + .Pp The - .Nm - utility exits 0 on success, and >0 if an error occurs. +@@ -95,4 +122,5 @@ utility exits 0 on success, and \*[Gt]0 .Sh SEE ALSO .Xr cksum 1 , +.Xr digest 1 , .Xr md5 3 , .Xr rmd160 3 , - .Xr sha1 3 -@@ -93,9 +122,13 @@ utility exits 0 on success, and >0 if an - The +@@ -102,8 +130,12 @@ The .Nm utility first appeared in -.Nx 1.6 . diff --git a/security/rdigest/files/patch-ac b/security/rdigest/files/patch-ac index a3bf6e32e2fa..bf6ee0d604a2 100644 --- a/security/rdigest/files/patch-ac +++ b/security/rdigest/files/patch-ac @@ -1,6 +1,6 @@ -$NetBSD: patch-ac,v 1.1.1.1 2003/07/24 05:21:07 atatat Exp $ +$NetBSD: patch-ac,v 1.2 2005/01/21 02:18:23 tv Exp $ ---- digest.c.orig 2003-07-23 20:27:09.000000000 -0400 +--- digest.c.orig 2005-01-20 21:10:03.000000000 -0500 +++ digest.c @@ -43,9 +43,14 @@ __RCSID("$NetBSD: digest.c,v 1.8 2003/07 #endif @@ -17,7 +17,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2003/07/24 05:21:07 atatat Exp $ #ifdef HAVE_LOCALE_H #include <locale.h> #endif -@@ -147,21 +152,172 @@ digest_file(char *fn, alg_t *alg) +@@ -147,21 +152,178 @@ digest_file(char *fn, alg_t *alg) return (rc); } @@ -26,7 +26,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2003/07/24 05:21:07 atatat Exp $ + const char *p; +}; + -+LIST_HEAD(, excl) excl = LIST_HEAD_INITIALIZER(excl); ++LIST_HEAD(, excl) excl; + +static void +exclude(const char *p) @@ -43,7 +43,11 @@ $NetBSD: patch-ac,v 1.1.1.1 2003/07/24 05:21:07 atatat Exp $ +{ + struct excl *e; + ++#ifdef LIST_FOREACH + LIST_FOREACH(e, &excl, n) ++#else ++ for (e = excl.lh_first; e; e = e->n.le_next) ++#endif + if (strcmp(e->p, p) == 0) + return (1); + @@ -175,6 +179,8 @@ $NetBSD: patch-ac,v 1.1.1.1 2003/07/24 05:21:07 atatat Exp $ int rval; int i; + struct stat st; ++ ++ LIST_INIT(&excl); #ifdef HAVE_SETLOCALE (void) setlocale(LC_ALL, ""); @@ -191,7 +197,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2003/07/24 05:21:07 atatat Exp $ } } argc -= optind; -@@ -186,7 +342,9 @@ main(int argc, char **argv) +@@ -186,7 +348,9 @@ main(int argc, char **argv) } } else { for (i = 0 ; i < argc ; i++) { diff --git a/security/rdigest/pkg-descr b/security/rdigest/pkg-descr index 24faa4026c06..f31cf690b862 100644 --- a/security/rdigest/pkg-descr +++ b/security/rdigest/pkg-descr @@ -1,8 +1,6 @@ -This utility is a wrapper for the md5(3), sha1(3) and rmd160(3) -routines. - -It is remarkably similar to the digest package, except that it -can recursively checksum directory trees. +This utility is a wrapper for the md5(3), sha1(3), rmd160(3), and +tiger hash routines. It is remarkably similar to the digest package, +except that it can recursively checksum directory trees. While a simple checksum on a tar file is usually satisfactory, once said archive has been extracted, it is virtually impossible to @@ -11,37 +9,8 @@ checksum. To be specific, changes in timestamps and ownership, and changes in file ordering within directories can affect the checksum of the archive, while not really impacting the actual code at all. -The algorithm used to checksum a directory in this implementation is -as follows: - - cd into directory - initialize MASTER_HASH - walk directory tree, sorting all entries - foreach entry - if it is a directory: - skip it if it is named "RCS", "CVS", or "SCCS" - initialize SLAVE_HASH - add the string "d " into SLAVE_HASH - add the pathname of the directory into SLAVE_HASH - finish SLAVE_HASH - fold the hexified SLAVE_HASH result into MASTER_HASH - if it is a file: - initialize SLAVE_HASH - add the string "f " into SLAVE_HASH - add the pathname of the file into SLAVE_HASH - finish SLAVE_HASH - fold the hexified SLAVE_HASH result into MASTER_HASH - initialize SLAVE_HASH - add the contents of the file into SLAVE_HASH - finish SLAVE_HASH - fold the hexified SLAVE_HASH result into MASTER_HASH - if it is a symbolic link - initialize SLAVE_HASH - add the string "l " into SLAVE_HASH - add the pathname of the link into SLAVE_HASH - finish SLAVE_HASH - fold the hexified SLAVE_HASH result into MASTER_HASH - initialize SLAVE_HASH - add the contents of the link into SLAVE_HASH - finish SLAVE_HASH - fold the hexified SLAVE_HASH result into MASTER_HASH +The algorithm used to checksum a directory in this implementation +is considers only the files' pathnames, the files' types (ie, +directory vs. file vs. symbolic link), and their contents (for +the latter two). It is described in greater detail in the man +page. |