aboutsummaryrefslogtreecommitdiff
path: root/sysutils/radmind
diff options
context:
space:
mode:
authorThomas Zander <riggs@FreeBSD.org>2014-07-12 09:31:02 +0000
committerThomas Zander <riggs@FreeBSD.org>2014-07-12 09:31:02 +0000
commit79c08ab7c54152025d78974d8c962d0e7a2217df (patch)
tree2639005826cf8a7dfb7ed3fb124c9f5c11bd2e5d /sysutils/radmind
parent16d061e03f8e5a6b33107cd94e315a79f9aa03a5 (diff)
downloadports-79c08ab7c54152025d78974d8c962d0e7a2217df.tar.gz
ports-79c08ab7c54152025d78974d8c962d0e7a2217df.zip
Notes
Diffstat (limited to 'sysutils/radmind')
-rw-r--r--sysutils/radmind/Makefile49
-rw-r--r--sysutils/radmind/files/patch-.gitignore4
-rw-r--r--sysutils/radmind/files/patch-.gitmodules6
-rw-r--r--sysutils/radmind/files/patch-Makefile.in52
-rw-r--r--sysutils/radmind/files/patch-README6
-rw-r--r--sysutils/radmind/files/patch-aclocal.m425
-rw-r--r--sysutils/radmind/files/patch-argcargv.c13
-rw-r--r--sysutils/radmind/files/patch-command.c230
-rw-r--r--sysutils/radmind/files/patch-command.h8
-rw-r--r--sysutils/radmind/files/patch-configure.ac21
-rw-r--r--sysutils/radmind/files/patch-contrib__specialist82
-rw-r--r--sysutils/radmind/files/patch-fsdiff.c251
-rw-r--r--sysutils/radmind/files/patch-ktcheck.c20
-rw-r--r--sysutils/radmind/files/patch-lapply.c4
-rw-r--r--sysutils/radmind/files/patch-largefile.h18
-rw-r--r--sysutils/radmind/files/patch-lcksum.c35
-rw-r--r--sysutils/radmind/files/patch-man__lcreate.14
-rw-r--r--sysutils/radmind/files/patch-man__rash.14
-rw-r--r--sysutils/radmind/files/patch-mkdirs.c4
-rw-r--r--sysutils/radmind/files/patch-ra.sh4
-rw-r--r--sysutils/radmind/files/patch-t2pkg.c4
-rw-r--r--sysutils/radmind/files/patch-transcript.c133
-rw-r--r--sysutils/radmind/files/patch-transcript.h17
-rw-r--r--sysutils/radmind/files/patch-update.c19
-rw-r--r--sysutils/radmind/pkg-descr4
-rw-r--r--sysutils/radmind/pkg-plist62
26 files changed, 1009 insertions, 70 deletions
diff --git a/sysutils/radmind/Makefile b/sysutils/radmind/Makefile
index 33406918b120..446df8cb4c1c 100644
--- a/sysutils/radmind/Makefile
+++ b/sysutils/radmind/Makefile
@@ -3,7 +3,7 @@
PORTNAME= radmind
PORTVERSION= 1.14.1
-PORTREVISION= 2012032001
+PORTREVISION= 2014052201
CATEGORIES= sysutils
MASTER_SITES= SF
MASTER_SITE_SUBDIR=${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
@@ -11,6 +11,11 @@ MASTER_SITE_SUBDIR=${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
MAINTAINER= mikeg@bsd-box.net
COMMENT= Utility for administering filesystem changes
+LICENSE= Michigan
+LICENSE_NAME= University of Michigan License
+LICENSE_FILE= ${WRKSRC}/COPYRIGHT
+LICENSE_PERMS= ${_LICENSE_PERMS_DEFAULT}
+
USE_OPENSSL= yes
USE_RC_SUBR= radmind
MAKE_JOBS_UNSAFE= yes
@@ -24,38 +29,36 @@ GROUPS= ${RADMINUSER}
RADMIND_BASE_DIR?= /var/radmind
SUB_LIST= RADMIND_BASE_DIR=${RADMIND_BASE_DIR} RADMINUSER=${RADMINUSER}
-PLIST_SUB= RADMIND_BASE_DIR=${RADMIND_BASE_DIR} RADMINUSER=${RADMINUSER}
+PLIST_SUB= RADMIND_BASE_DIR=${RADMIND_BASE_DIR:S@/@@} RADMINUSER=${RADMINUSER}
SUB_FILES+= pkg-install pkg-message
-MAN1= fsdiff.1 ktcheck.1 lapply.1 lcksum.1 lcreate.1 lfdiff.1 \
- lmerge.1 lsort.1 twhich.1 rash.1 repo.1
-MAN5= applefile.5
-MAN8= radmind.8
DOCS= COPYRIGHT README SPEC
-OPTIONS_DEFINE= IGNORE_TIMESTAMPS DOCS
+OPTIONS_DEFINE= DOCS
IGNORE_TIMESTAMPS_DESC= Add '-t' option to fsdiff
-NO_STAGE= yes
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MIGNORE_TIMESTAMPS}
-EXTRA_PATCHES+= ${FILESDIR}/optpatch-ignore_timestamps
-.endif
-
post-install:
-# Ugly hack to remove generated man pages
+ # Ugly hack to remove generated man pages
${RM} -rf ${WRKSRC}/tmp
-.if ${PORT_OPTIONS:MDOCS}
- ${MKDIR} ${DOCSDIR}
- cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
-.endif
- ${CP} ${FILESDIR}/config.sample ${RADMIND_BASE_DIR}/config.sample
- @if [ ! -f ${RADMIND_BASE_DIR}/config ]; then \
- ${CP} -p ${RADMIND_BASE_DIR}/config.sample ${RADMIND_BASE_DIR}/config ; \
- fi
- @${CHOWN} -R ${RADMINUSER}:${RADMINUSER} ${RADMIND_BASE_DIR}
- @${CAT} ${PKGMESSAGE}
+ # Port's Docs (Copyright & wire protocol info)
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
+
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/cert
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/client
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/command
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/file
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/postapply
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/preapply
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/special
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/tmp
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/tmp/file
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/tmp/transcript
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/transcript
+ ${CP} ${FILESDIR}/config.sample ${STAGEDIR}${RADMIND_BASE_DIR}/config.sample
.include <bsd.port.mk>
diff --git a/sysutils/radmind/files/patch-.gitignore b/sysutils/radmind/files/patch-.gitignore
index 81241bb8a606..dc3c52a3298d 100644
--- a/sysutils/radmind/files/patch-.gitignore
+++ b/sysutils/radmind/files/patch-.gitignore
@@ -1,5 +1,5 @@
---- ./.gitignore.orig 2010-12-12 22:42:49.000000000 -0500
-+++ ./.gitignore 2012-03-20 14:37:54.000000000 -0400
+--- ./.gitignore.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./.gitignore 2014-06-29 12:15:04.241543320 +0200
@@ -10,12 +10,8 @@
config.log
config.status
diff --git a/sysutils/radmind/files/patch-.gitmodules b/sysutils/radmind/files/patch-.gitmodules
new file mode 100644
index 000000000000..b39b3aa3b97b
--- /dev/null
+++ b/sysutils/radmind/files/patch-.gitmodules
@@ -0,0 +1,6 @@
+--- ./.gitmodules.orig 2014-06-29 12:15:04.241543320 +0200
++++ ./.gitmodules 2014-06-29 12:15:04.242543988 +0200
+@@ -0,0 +1,3 @@
++[submodule "libsnet"]
++ path = libsnet
++ url = git://libsnet.git.sourceforge.net/gitroot/libsnet/libsnet
diff --git a/sysutils/radmind/files/patch-Makefile.in b/sysutils/radmind/files/patch-Makefile.in
index 4b2b317a4266..32e5fab4f8a1 100644
--- a/sysutils/radmind/files/patch-Makefile.in
+++ b/sysutils/radmind/files/patch-Makefile.in
@@ -1,5 +1,5 @@
---- ./Makefile.in.orig 2010-12-12 22:43:49.000000000 -0500
-+++ ./Makefile.in 2012-03-20 14:37:54.000000000 -0400
+--- Makefile.in.orig 2010-12-13 04:43:49.000000000 +0100
++++ Makefile.in 2014-06-29 13:32:18.069225436 +0200
@@ -204,37 +204,37 @@
radmind : libsnet/libsnet.la ${RADMIND_OBJ} Makefile
${CC} ${CFLAGS} -o radmind ${RADMIND_OBJ} ${LDFLAGS}
@@ -48,3 +48,51 @@
${CC} ${CFLAGS} -o lsort ${LSORT_OBJ} ${LDFLAGS}
FRC :
+@@ -259,7 +259,7 @@
+ (cd .. && tar cvfz ${DISTDIR}.tar.gz ${DISTDIR})
+
+ rash : FRC
+- -mkdir tmp
++ -mkdir -p tmp
+ sed -e 's@_RADMIND_HOST@${RADMIND_HOST}@g' \
+ -e 's@_RADMIND_AUTHLEVEL@${RADMIND_AUTHLEVEL}@g' \
+ -e 's@_RADMIND_PREAPPLY@${PREAPPLYDIR}@g' \
+@@ -273,8 +273,7 @@
+ ${srcdir}/ra.sh > tmp/ra.sh;
+
+ man : FRC
+- -mkdir tmp
+- -mkdir tmp/man
++ -mkdir -p tmp/man
+ pwd
+ for i in ${MANTARGETS}; do \
+ sed -e 's@_RADMIND_PATH@${RADMINDDIR}@g' \
+@@ -290,23 +289,22 @@
+ install : all man rash
+ -mkdir -p ${DESTDIR}/${exec_prefix}
+ -mkdir -p ${DESTDIR}/${SBINDIR}
+- ${INSTALL} -m 0755 -c radmind ${DESTDIR}/${SBINDIR}/
++ ${INSTALL} -s -m 0755 -c radmind ${DESTDIR}/${SBINDIR}/
+ -mkdir -p ${DESTDIR}/${BINDIR}
+ for i in ${BINTARGETS}; do \
+- ${INSTALL} -m 0755 -c $$i ${DESTDIR}/${BINDIR}/; \
++ ${INSTALL} -s -m 0755 -c $$i ${DESTDIR}/${BINDIR}/; \
+ done
+ ${INSTALL} -m 0755 -c tmp/ra.sh ${DESTDIR}/${BINDIR}/
+ -mkdir -p ${DESTDIR}/${prefix}
+- -mkdir -p ${DESTDIR}/${MANDIR}
+- -mkdir ${DESTDIR}/${MANDIR}/man1
++ -mkdir -p ${DESTDIR}/${MANDIR}/man1
+ for i in ${MAN1TARGETS}; do \
+ ${INSTALL} -m 0644 -c tmp/man/$$i ${DESTDIR}/${MANDIR}/man1/; \
+ done
+- -mkdir ${DESTDIR}/${MANDIR}/man5
++ -mkdir -p ${DESTDIR}/${MANDIR}/man5
+ for i in ${MAN5TARGETS}; do \
+ ${INSTALL} -m 0644 -c tmp/man/$$i ${DESTDIR}/${MANDIR}/man5/; \
+ done
+- -mkdir ${DESTDIR}/${MANDIR}/man8
++ -mkdir -p ${DESTDIR}/${MANDIR}/man8
+ for i in ${MAN8TARGETS}; do \
+ ${INSTALL} -m 0644 -c tmp/man/$$i ${DESTDIR}/${MANDIR}/man8/; \
+ done
diff --git a/sysutils/radmind/files/patch-README b/sysutils/radmind/files/patch-README
index 5c47af2589dd..be42076b72b6 100644
--- a/sysutils/radmind/files/patch-README
+++ b/sysutils/radmind/files/patch-README
@@ -1,5 +1,5 @@
---- ./README.orig 2010-12-12 22:42:49.000000000 -0500
-+++ ./README 2012-03-20 14:37:54.000000000 -0400
+--- ./README.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./README 2014-06-29 12:15:04.242543988 +0200
@@ -72,25 +72,25 @@
% "env CPPFLAGS=-I/usr/kerberos/include ./configure"
@@ -19,7 +19,7 @@
-cvs -d :pserver:anonymous@radmind.cvs.sourceforge.net:/cvsroot/radmind \
- checkout radmind
-+ git clone git://radmind.git.sourceforge.net/gitroot/gradmind
++ git clone git://radmind.git.sourceforge.net/gitroot/radmind/radmind
2) Move into the new radmind directory:
diff --git a/sysutils/radmind/files/patch-aclocal.m4 b/sysutils/radmind/files/patch-aclocal.m4
index c6d78dc7a296..276ea1b3d370 100644
--- a/sysutils/radmind/files/patch-aclocal.m4
+++ b/sysutils/radmind/files/patch-aclocal.m4
@@ -1,5 +1,5 @@
---- ./aclocal.m4.orig 2010-12-12 22:42:49.000000000 -0500
-+++ ./aclocal.m4 2012-03-20 14:37:54.000000000 -0400
+--- ./aclocal.m4.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./aclocal.m4 2014-06-29 12:15:04.242543988 +0200
@@ -105,16 +105,11 @@
arches="-arch i386 -arch ppc"
;;
@@ -19,3 +19,24 @@
;;
*)
+@@ -129,3 +124,20 @@
+ fi
+ ])
+
++AC_DEFUN([MACOSX_MUTE_DEPRECATION_WARNINGS],
++[
++ dnl Lion deprecates a system-provided OpenSSL. Build output
++ dnl is cluttered with useless deprecation warnings.
++
++ AS_IF([test x"$CC" = x"gcc"], [
++ case "${host_os}" in
++ darwin11*)
++ AC_MSG_NOTICE([muting deprecation warnings from compiler])
++ OPTOPTS="$OPTOPTS -Wno-deprecated-declarations"
++ ;;
++
++ *)
++ ;;
++ esac
++ ])
++])
diff --git a/sysutils/radmind/files/patch-argcargv.c b/sysutils/radmind/files/patch-argcargv.c
new file mode 100644
index 000000000000..fd7ea5e8f9f5
--- /dev/null
+++ b/sysutils/radmind/files/patch-argcargv.c
@@ -0,0 +1,13 @@
+--- ./argcargv.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./argcargv.c 2014-06-29 12:15:04.243544285 +0200
+@@ -48,7 +48,9 @@
+
+ if ( acav == NULL ) {
+ if ( acavg == NULL ) {
+- acavg = acav_alloc();
++ if (( acavg = acav_alloc()) == NULL ) {
++ return( -1 );
++ }
+ }
+ acav = acavg;
+ }
diff --git a/sysutils/radmind/files/patch-command.c b/sysutils/radmind/files/patch-command.c
new file mode 100644
index 000000000000..d98cf68b5424
--- /dev/null
+++ b/sysutils/radmind/files/patch-command.c
@@ -0,0 +1,230 @@
+--- ./command.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./command.c 2014-06-29 12:15:04.244544161 +0200
+@@ -477,38 +477,90 @@
+
+ /* looks for special file info in transcripts */
+ char **
+-special_t( char *transcript, char *epath )
++special_t( char *sp_path, char *remote_path )
+ {
+- FILE *fs;
+- int ac, len;
+- char **av;
++ FILE *fs = NULL;
++ int i, ac, len, ln;
++ char **av = NULL;
++ char *paths[ 4 ] = { NULL };
++ char *p;
++ char sp_t[ MAXPATHLEN ];
+ static char line[ MAXPATHLEN ];
+
+- if (( fs = fopen( transcript, "r" )) == NULL ) {
+- return( NULL );
+- }
++ /*
++ * in order, we look for special file transcript lines in the
++ * following locations:
++ *
++ * - A transcript in the same directory and with the same name
++ * as the special file, but with a ".T" extension.
++ *
++ * - A transcript named "<remote_id>.T" in the same directory as
++ * the client's special file directory root.
++ *
++ * - /var/radmind/transcript/special.T
++ *
++ * if no matching transcript line is found, default metadata is
++ * returned to the client (type: f; mode: 0444; owner: 0; group: 0).
++ */
++ paths[ 0 ] = sp_path;
++ paths[ 1 ] = special_dir;
++ paths[ 2 ] = "transcript/special.T";
++ paths[ 3 ] = NULL;
+
+- while ( fgets( line, MAXPATHLEN, fs ) != NULL ) {
+- len = strlen( line );
+- if (( line[ len - 1 ] ) != '\n' ) {
+- syslog( LOG_ERR, "special_t: %s: line too long", transcript );
+- break;
++ for ( i = 0; paths[ i ] != NULL; i++ ) {
++ if (( p = strrchr( paths[ i ], '.' )) != NULL
++ && strcmp( p, ".T" ) == 0 ) {
++ if ( strlen( paths[ i ] ) >= MAXPATHLEN ) {
++ syslog( LOG_WARNING, "special_t: path \"%s\" too long",
++ paths[ i ] );
++ continue;
++ }
++ strcpy( sp_t, paths[ i ] );
++ } else if ( snprintf( sp_t, MAXPATHLEN, "%s.T",
++ paths[ i ] ) >= MAXPATHLEN ) {
++ syslog( LOG_WARNING, "special_t: path \"%s.T\" too long", sp_path );
++ continue;
+ }
+
+- if (( ac = argcargv( line, &av )) != 8 ) {
++ if (( fs = fopen( sp_t, "r" )) == NULL ) {
+ continue;
+ }
+- if (( *av[ 0 ] != 'f' ) && ( *av[ 0 ] != 'a' )) {
+- continue;
++
++ ln = 0;
++ while ( fgets( line, MAXPATHLEN, fs ) != NULL ) {
++ ln++;
++ len = strlen( line );
++ if (( line[ len - 1 ] ) != '\n' ) {
++ syslog( LOG_ERR, "special_t: %s: line %d too long", sp_t, ln );
++ break;
++ }
++
++ /* only files and applefiles allowed */
++ if ( strncmp( line, "f ", strlen( "f " )) != 0 &&
++ strncmp( line, "a ", strlen( "a " )) != 0 ) {
++ continue;
++ }
++ if (( ac = argcargv( line, &av )) != 8 ) {
++ syslog( LOG_WARNING, "special_t: %s: line %d: "
++ "bad transcript line", sp_t, ln );
++ continue;
++ }
++
++ if ( strcmp( av[ 1 ], remote_path ) == 0 ) {
++ (void)fclose( fs );
++ return( av );
++ }
+ }
+
+- if ( strcmp( av[ 1 ], epath ) == 0 ) {
+- (void)fclose( fs );
+- return( av );
++ if ( fclose( fs ) != 0 ) {
++ syslog( LOG_WARNING, "special_t: fclose %s: %m", sp_t );
+ }
++ fs = NULL;
+ }
+-
+- (void)fclose( fs );
++ if ( fs != NULL ) {
++ (void)fclose( fs );
++ }
++
+ return( NULL );
+ }
+
+@@ -624,11 +676,11 @@
+ switch ( key ) {
+ case K_COMMAND:
+ if ( ac == 2 ) {
+- snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
++ snet_writef( sn, RADMIND_STAT_FMT,
+ "f", "command", DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
+ st.st_mtime, st.st_size, cksum_b64 );
+ } else {
+- snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
++ snet_writef( sn, RADMIND_STAT_FMT,
+ "f", av[ 2 ], DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
+ st.st_mtime, st.st_size, cksum_b64 );
+ }
+@@ -636,61 +688,33 @@
+
+
+ case K_TRANSCRIPT:
+- snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
++ snet_writef( sn, RADMIND_STAT_FMT,
+ "f", av[ 2 ],
+ DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
+ st.st_mtime, st.st_size, cksum_b64 );
+ return( 0 );
+
+ case K_SPECIAL:
+- /* status on a special file comes from 1 of three cases:
+- * 1. A transcript in the special file directory
+- * 2. A transcript in the Transcript dir with .T appended
+- * 3. No transcript is found, and constants are returned
+- */
+-
+- /* look for transcript containing the information */
+- if ( ( strlen( path ) + 2 ) > MAXPATHLEN ) {
+- syslog( LOG_WARNING,
+- "f_stat: transcript path longer than MAXPATHLEN" );
+-
+- /* return constants */
+- snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
+- "f", av[ 2 ],
+- DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
+- st.st_mtime, st.st_size, cksum_b64 );
+- return( 0 );
+- }
+-
+- /* if allowable, check for transcript in the special file directory */
+-
+- strcat( path, ".T" );
+-
+- /* store value of av[ 2 ], because argcargv will be called
++ /*
++ * store value of av[ 2 ], because argcargv will be called
+ * from special_t(), and that will blow away the current values
+- * for av[ 2 ]
+- *
+- * Could just use new argvargc API... XXX Notice how we never free
+- * env_file...
++ * for av[ 2 ].
+ */
+-
+ if (( enc_file = strdup( av[ 2 ] )) == NULL ) {
+ syslog( LOG_ERR, "f_stat: strdup: %s %m", av[ 2 ] );
+ return( -1 );
+ }
+
+ if (( av = special_t( path, enc_file )) == NULL ) {
+- if (( av = special_t( "transcript/special.T", enc_file ))
+- == NULL ) {
+- snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
+- "f", enc_file,
+- DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
+- st.st_mtime, st.st_size, cksum_b64 );
+- free( enc_file );
+- return( 0 );
+- }
++ /* no special transcript match found, return defaults. */
++ snet_writef( sn, RADMIND_STAT_FMT,
++ "f", enc_file,
++ DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
++ st.st_mtime, st.st_size, cksum_b64 );
++ free( enc_file );
++ return( 0 );
+ }
+- snet_writef( sn, "%s %s %s %s %s %d %" PRIofft "d %s\r\n",
++ snet_writef( sn, RADMIND_STAT_FMT,
+ av[ 0 ], enc_file,
+ av[ 2 ], av[ 3 ], av[ 4 ],
+ st.st_mtime, st.st_size, cksum_b64 );
+@@ -1261,8 +1285,7 @@
+ continue;
+ }
+ if ( strcmp( av[ 0 ], "@include" ) == 0 ) {
+- depth++;
+- if ( depth > RADMIND_MAX_INCLUDE_DEPTH ) {
++ if ( depth >= RADMIND_MAX_INCLUDE_DEPTH ) {
+ syslog( LOG_ERR, "%s: line %d: include %s exceeds max depth",
+ path_config, linenum, av[ 1 ] );
+ goto command_k_done;
+@@ -1277,7 +1300,7 @@
+ continue;
+ }
+ }
+- if ( command_k( av[ 1 ], depth ) != 0 ) {
++ if ( command_k( av[ 1 ], depth + 1 ) != 0 ) {
+ continue;
+ }
+
+@@ -1325,7 +1348,8 @@
+
+ /* If we get here, the host that connected is not in the config
+ file. So screw him. */
+- syslog( LOG_ERR, "host not in config file: %s", remote_host );
++ syslog( LOG_ERR, "host %s not in config file %s",
++ remote_host, path_config );
+
+ command_k_done:
+ snet_close( sn );
diff --git a/sysutils/radmind/files/patch-command.h b/sysutils/radmind/files/patch-command.h
new file mode 100644
index 000000000000..88ce7e14c1cc
--- /dev/null
+++ b/sysutils/radmind/files/patch-command.h
@@ -0,0 +1,8 @@
+--- ./command.h.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./command.h 2014-06-29 12:15:04.244544161 +0200
+@@ -13,3 +13,5 @@
+ char *c_name;
+ int (*c_func)( SNET *, int, char *[] );
+ };
++
++#define RADMIND_STAT_FMT "%s %s %o %d %d %" PRItimet "d %" PRIofft "d %s\r\n"
diff --git a/sysutils/radmind/files/patch-configure.ac b/sysutils/radmind/files/patch-configure.ac
index a470974df3b4..bb95251d4c33 100644
--- a/sysutils/radmind/files/patch-configure.ac
+++ b/sysutils/radmind/files/patch-configure.ac
@@ -1,12 +1,17 @@
---- ./configure.ac.orig 2010-12-12 22:43:38.000000000 -0500
-+++ ./configure.ac 2012-03-20 14:37:54.000000000 -0400
-@@ -45,24 +45,29 @@
+--- ./configure.ac.orig 2010-12-13 04:43:38.000000000 +0100
++++ ./configure.ac 2014-06-29 12:15:04.244544161 +0200
+@@ -44,25 +44,36 @@
+
# Check sizes
AC_CHECK_SIZEOF(off_t)
-
++AC_CHECK_SIZEOF(time_t)
++
+# check early to make any required changes to environment for following tests.
+CHECK_UNIVERSAL_BINARIES
+
++# mute Mac OS X's helpful notices that using dylib OpenSSL
++MACOSX_MUTE_DEPRECATION_WARNINGS
+
# Checks for libraries.
AC_CHECK_LIB(c, inet_aton, libc_inet_aton=yes)
if test x$libc_inet_aton != xyes; then
@@ -14,8 +19,10 @@
fi
-AC_CHECK_LIB(c, lchown)
-AC_CHECK_LIB(c, lchmod)
-+AC_CHECK_LIB(c, lchown, [AC_DEFINE(HAVE_LCHOWN)], [])
-+AC_CHECK_LIB(c, lchmod, [AC_DEFINE(HAVE_LCHMOD)], [])
++if test x$host_vendor = xapply; then
++ AC_CHECK_LIB(c, lchown, [AC_DEFINE(HAVE_LCHOWN)], [])
++ AC_CHECK_LIB(c, lchmod, [AC_DEFINE(HAVE_LCHMOD)], [])
++fi
AC_CHECK_LIB(nsl, gethostbyaddr)
AC_CHECK_LIB([socket], [socket])
AC_CHECK_LIB([ssl], [SSL_accept], , [CHECK_SSL])
@@ -34,7 +41,7 @@
AC_CHECK_LIB([pam], [pam_start],
[
AC_CHECK_HEADERS(pam/pam_appl.h, , [AC_CHECK_HEADERS(security/pam_appl.h)])
-@@ -75,7 +80,6 @@
+@@ -75,7 +86,6 @@
AC_CHECK_LIB(dns_sd, DNSServiceRegister)
CHECK_ZLIB
diff --git a/sysutils/radmind/files/patch-contrib__specialist b/sysutils/radmind/files/patch-contrib__specialist
new file mode 100644
index 000000000000..f882db8aec0d
--- /dev/null
+++ b/sysutils/radmind/files/patch-contrib__specialist
@@ -0,0 +1,82 @@
+--- ./contrib/specialist.orig 2014-06-29 12:15:04.244544161 +0200
++++ ./contrib/specialist 2014-06-29 12:15:04.245544128 +0200
+@@ -0,0 +1,79 @@
++#! /bin/sh
++
++# specialist: assist creation of special files.
++
++PATH=/bin:/usr/bin:/usr/local/bin; export PATH
++
++SCRIPT=`basename "$0"`
++INPUT_FORMAT=${INPUT_FORMAT:=path}
++
++usage() {
++ echo "usage: ${SCRIPT} [ -T ]" 1>&2
++ exit 1
++}
++
++die() {
++ msg=$*
++
++ echo "${msg}" 1>&2
++ exit 2
++}
++
++# create a special transcript line for the given path.
++specialize() {
++ local path="$1"
++
++ [ -n "${path}" -a -f "${path}" ] || die "Invalid path: ${path}"
++
++ fsdiff -1 -c sha1 "${path}"
++ return $?
++}
++
++specialize_transcript() {
++ local path=""
++ status=0
++
++ while read type path remainder; do
++ if [ x"${type}" != x"f" ]; then
++ continue
++ fi
++
++ specialize "${path}"
++ done
++}
++
++specialize_paths() {
++ local path=""
++ status=0
++
++ while read path; do
++ specialize "${path}"
++ if [ $? -ne 0 ]; then
++ status=1
++ fi
++ done
++
++ return "${status}"
++}
++
++while getopts T opt; do
++ case $opt in
++ T)
++ INPUT_FORMAT="transcript"
++ ;;
++
++ *)
++ usage
++ ;;
++
++ esac
++done
++shift $((OPTIND - 1))
++
++if [ x"${INPUT_FORMAT}" = x"transcript" ]; then
++ specialize_transcript
++else
++ specialize_paths
++fi
++
++exit $?
diff --git a/sysutils/radmind/files/patch-fsdiff.c b/sysutils/radmind/files/patch-fsdiff.c
new file mode 100644
index 000000000000..f880c974f205
--- /dev/null
+++ b/sysutils/radmind/files/patch-fsdiff.c
@@ -0,0 +1,251 @@
+--- ./fsdiff.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./fsdiff.c 2014-06-29 12:15:04.245544128 +0200
+@@ -249,6 +249,144 @@
+ return;
+ }
+
++ static char *
++canonicalized_path( char *path )
++{
++ int len;
++ static char cpath[ MAXPATHLEN ];
++
++ if ( path == NULL ) {
++ return( NULL );
++ }
++
++ len = strlen( path );
++ if ( len >= sizeof( cpath )) {
++ fprintf( stderr, "fsdiff: path too long: %s\n", path );
++ exit( 2 );
++ }
++ strcpy( cpath, path );
++
++ /* Clip trailing '/' */
++ if (( len > 1 ) && ( cpath[ len - 1 ] == '/' )) {
++ cpath[ len - 1 ] = '\0';
++ len--;
++ }
++
++ /*
++ * If prefix doesn't contain a directory, canonicalize it by prepending a
++ * "./". This allow paths to be dynamically converted between relative and
++ * absolute paths without breaking sort order.
++ */
++ switch( cpath[ 0 ] ) {
++ case '/':
++ break;
++
++ case '.':
++ /* Don't rewrite '.' or paths starting with './' */
++ if ( len == 1 || cpath[ 1 ] == '/' ) {
++ break;
++ }
++
++ default:
++ if ( len + 2 >= sizeof( cpath )) {
++ fprintf( stderr, "fsdiff: path too long: ./%s\n", cpath );
++ exit( 2 );
++ }
++ memmove( cpath + 2, cpath, len );
++ cpath[ 0 ] = '.'; cpath[ 1 ] = '/';
++
++ break;
++ }
++
++ /*
++ * Determine if called with relative or absolute pathing. Path is relative
++ * if it's just '.' or starts with './'. File names that start with a '.'
++ * are absolute.
++ */
++ if ( cpath[ 0 ] == '.' ) {
++ if ( len == 1 ) {
++ tran_format = T_RELATIVE;
++ } else if ( cpath[ 1 ] == '/' ) {
++ tran_format = T_RELATIVE;
++ } else {
++ tran_format = T_ABSOLUTE;
++ }
++ } else {
++ tran_format = T_ABSOLUTE;
++ }
++
++ return( cpath );
++}
++
++ static void
++fsdiff( char *path, char *kfile, int start, int finish, int pdel )
++{
++ struct applefileinfo afinfo;
++ struct stat st;
++ char type;
++ char lpath[ MAXPATHLEN ];
++ int len;
++
++ if (( dotfd = open( ".", O_RDONLY, 0 )) < 0 ) {
++ perror( "OOPS!" );
++ exit( 2 );
++ }
++
++ if ( skip && strcmp( path, "-" ) == 0 ) {
++ /* leave excludes in place */
++ skip = skip & ~T_SKIP_EXCLUDES;
++
++ path_prefix = "/";
++ transcript_init( kfile, K_CLIENT );
++
++ /* run -1 against every line we get from stdin */
++ while ( fgets( lpath, sizeof( lpath ), stdin ) != NULL ) {
++ len = strlen( lpath );
++ if ( lpath[ len - 1 ] != '\n' ) {
++ fprintf( stderr, "fsdiff: fgets: line too long\n" );
++ exit( 2 );
++ }
++ lpath[ len - 1 ] = '\0';
++ path = canonicalized_path( lpath );
++
++ if ( radstat( path, &st, &type, &afinfo ) != 0 ) {
++ if ( errno != ENOENT ) {
++ perror( lpath );
++ exit( 2 );
++ }
++
++ fprintf( stderr, "Warning: %s: %s\n", path, strerror( errno ));
++ continue;
++ }
++ (void)transcript( path, &st, &type, &afinfo, pdel );
++ }
++ if ( ferror( stdin )) {
++ perror( "fgets" );
++ exit( 2 );
++ }
++ } else {
++ path_prefix = canonicalized_path( path );
++
++ /* initialize the transcripts */
++ transcript_init( kfile, K_CLIENT );
++
++ if ( radstat( path_prefix, &st, &type, &afinfo ) != 0 ) {
++ perror( path_prefix );
++ exit( 2 );
++ }
++
++ fs_walk( path_prefix, &st, &type, &afinfo, start, finish, pdel );
++ }
++
++ if ( finish > 0 ) {
++ printf( "%%%d\n", ( int )finish );
++ }
++
++ /* free the transcripts */
++ transcript_free( );
++ hardlink_free( );
++}
++
+ int
+ main( int argc, char **argv )
+ {
+@@ -258,9 +396,6 @@
+ int c, len, edit_path_change = 0;
+ int errflag = 0, use_outfile = 0;
+ int finish = 0;
+- struct stat st;
+- char type, buf[ MAXPATHLEN ];
+- struct applefileinfo afinfo;
+
+ edit_path = CREATABLE;
+ cksum = 0;
+@@ -300,7 +435,7 @@
+ break;
+
+ case '1':
+- skip = 1;
++ skip = T_SKIP_ALL;
+ case 'C':
+ edit_path_change++;
+ edit_path = CREATABLE;
+@@ -347,82 +482,13 @@
+ }
+
+ if ( errflag || ( argc - optind != 1 )) {
+- fprintf( stderr, "usage: %s { -C | -A | -1 } [ -IVW ] ", argv[ 0 ] );
++ fprintf( stderr, "usage: %s { -C | -A | -1 } " "[ -IVW ] ", argv[ 0 ] );
+ fprintf( stderr, "[ -K command ] " );
+ fprintf( stderr, "[ -c checksum ] [ -o file [ -%% ] ] path\n" );
+ exit ( 2 );
+ }
+
+- path_prefix = argv[ optind ];
+- len = strlen( path_prefix );
+-
+- /* Clip trailing '/' */
+- if (( len > 1 ) && ( path_prefix[ len - 1 ] == '/' )) {
+- path_prefix[ len - 1 ] = '\0';
+- len--;
+- }
+-
+- /* If path_prefix doesn't contain a directory, canonicalize it by
+- * prepending a "./". This allow paths to be dynamically converted between
+- * relative and absolute paths without breaking sort order.
+- */
+- switch( path_prefix[ 0 ] ) {
+- case '/':
+- break;
+-
+- case '.':
+- /* Don't rewrite '.' or paths starting with './' */
+- if (( len == 1 ) || ( path_prefix[ 1 ] == '/' )) {
+- break;
+- }
+- default:
+- if ( snprintf( buf, sizeof( buf ), "./%s",
+- path_prefix ) >= MAXPATHLEN ) {
+- fprintf( stderr, "path too long\n" );
+- exit( 2 );
+- }
+- path_prefix = buf;
+- break;
+- }
+-
+- /* Determine if called with relative or absolute pathing. Path is relative
+- * if it's just '.' or starts with './'. File names that start with a '.'
+- * are absolute.
+- */
+- if ( path_prefix[ 0 ] == '.' ) {
+- if ( len == 1 ) {
+- tran_format = T_RELATIVE;
+- } else if ( path_prefix[ 1 ] == '/' ) {
+- tran_format = T_RELATIVE;
+- } else {
+- tran_format = T_ABSOLUTE;
+- }
+- } else {
+- tran_format = T_ABSOLUTE;
+- }
+-
+- if ( radstat( path_prefix, &st, &type, &afinfo ) != 0 ) {
+- perror( path_prefix );
+- exit( 2 );
+- }
+-
+- if (( dotfd = open( ".", O_RDONLY, 0 )) < 0 ) {
+- perror( "OOPS!" );
+- exit( 2 );
+- }
+-
+- /* initialize the transcripts */
+- transcript_init( kfile, K_CLIENT );
+-
+- fs_walk( path_prefix, &st, &type, &afinfo, 0, finish, 0 );
+-
+- if ( finish > 0 ) {
+- printf( "%%%d\n", ( int )finish );
+- }
+-
+- /* free the transcripts */
+- transcript_free( );
+- hardlink_free( );
++ fsdiff( argv[ optind ], kfile, 0, finish, 0 );
+
+ /* close the output file */
+ fclose( outtran );
diff --git a/sysutils/radmind/files/patch-ktcheck.c b/sysutils/radmind/files/patch-ktcheck.c
new file mode 100644
index 000000000000..3d1fec261098
--- /dev/null
+++ b/sysutils/radmind/files/patch-ktcheck.c
@@ -0,0 +1,20 @@
+--- ./ktcheck.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./ktcheck.c 2014-06-29 12:15:04.245544128 +0200
+@@ -459,7 +459,7 @@
+ perror( "Incorrect number of arguments\n" );
+ return( 2 );
+ }
+- times.modtime = atoi( targv[ 5 ] );
++ times.modtime = strtotimet( targv[ 5 ], NULL, 10 );
+ times.actime = time( NULL );
+
+ if (( stat( path, &st )) != 0 ) {
+@@ -506,7 +506,7 @@
+ needupdate = 1;
+ }
+ } else {
+- if ( atoi( targv[ 5 ] ) != (int)st.st_mtime ) {
++ if ( strtotimet( targv[ 5 ], NULL, 10 ) != st.st_mtime ) {
+ needupdate = 1;
+ }
+ }
diff --git a/sysutils/radmind/files/patch-lapply.c b/sysutils/radmind/files/patch-lapply.c
index 63113803d7d9..5c6321301119 100644
--- a/sysutils/radmind/files/patch-lapply.c
+++ b/sysutils/radmind/files/patch-lapply.c
@@ -1,5 +1,5 @@
---- ./lapply.c.orig 2010-12-12 22:42:49.000000000 -0500
-+++ ./lapply.c 2012-03-20 14:37:54.000000000 -0400
+--- ./lapply.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./lapply.c 2014-06-29 12:15:04.246544121 +0200
@@ -651,27 +651,37 @@
filechecklist:
if ( head == NULL ) {
diff --git a/sysutils/radmind/files/patch-largefile.h b/sysutils/radmind/files/patch-largefile.h
new file mode 100644
index 000000000000..5d5654934a28
--- /dev/null
+++ b/sysutils/radmind/files/patch-largefile.h
@@ -0,0 +1,18 @@
+--- ./largefile.h.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./largefile.h 2014-06-29 12:15:04.246544121 +0200
+@@ -18,3 +18,15 @@
+ #define strtoofft(x,y,z) (strtol((x),(y),(z)))
+ #define PRIofft "l"
+ #endif
++
++#if SIZEOF_TIME_T == 8
++ #ifdef HAVE_STRTOLL
++ #define strtotimet(x,y,z) (strtoll((x),(y),(z)))
++ #else /* !HAVE_STRTOLL */
++ #define strtotimet(x,y,z) (strtol((x),(y),(z)))
++ #endif /* HAVE_STRTOLL */
++ #define PRItimet "ll"
++#else /* SIZEOF_TIME_T != 8 */
++ #define strtotimet(x,y,z) (strtol((x),(y),(z)))
++ #define PRItimet "l"
++#endif /* SIZEOF_TIME_T */
diff --git a/sysutils/radmind/files/patch-lcksum.c b/sysutils/radmind/files/patch-lcksum.c
new file mode 100644
index 000000000000..5dca9c403f0d
--- /dev/null
+++ b/sysutils/radmind/files/patch-lcksum.c
@@ -0,0 +1,35 @@
+--- ./lcksum.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./lcksum.c 2014-06-29 12:15:04.247544144 +0200
+@@ -434,7 +434,7 @@
+ /* Check to see if checksum is listed in transcript */
+ if ( strcmp( targv[ 7 ], "-" ) != 0) {
+ /* use mtime from server */
+- fprintf( ufs, "%s %-37s %4s %5s %5s %9ld "
++ fprintf( ufs, "%s %-37s %4s %5s %5s %9" PRItimet "d "
+ "%7" PRIofft "d %s\n",
+ targv[ 0 ], targv[ 1 ], targv[ 2 ], targv[ 3 ],
+ targv[ 4 ], st.st_mtime, st.st_size, lcksum );
+@@ -457,6 +457,12 @@
+ }
+ free( line );
+ }
++ if ( fclose( f ) != 0 ) {
++ fprintf( stderr, "%s: fclose failed: %s\n", path, strerror( errno ));
++ cleanup( updatetran, upath );
++ exit( 2 );
++ }
++
+ if ( showprogress ) {
+ progressupdate( bytes, "" );
+ }
+@@ -496,6 +502,10 @@
+ badline:
+ exitval = 1;
+
++ if ( fclose( f ) != 0 ) {
++ fprintf( stderr, "%s: fclose failed: %s\n", path, strerror( errno ));
++ }
++
+ if ( checkall ) {
+ goto done;
+ } else {
diff --git a/sysutils/radmind/files/patch-man__lcreate.1 b/sysutils/radmind/files/patch-man__lcreate.1
index 5902bace1df5..e22a10d99d66 100644
--- a/sysutils/radmind/files/patch-man__lcreate.1
+++ b/sysutils/radmind/files/patch-man__lcreate.1
@@ -1,5 +1,5 @@
---- ./man/lcreate.1.orig 2010-12-12 22:50:53.000000000 -0500
-+++ ./man/lcreate.1 2012-03-20 14:38:03.000000000 -0400
+--- ./man/lcreate.1.orig 2010-12-13 04:50:53.000000000 +0100
++++ ./man/lcreate.1 2014-06-29 12:15:04.247544144 +0200
@@ -45,12 +45,6 @@
.sp
If the -n option is given, no files or transcripts are uploaded. Instead,
diff --git a/sysutils/radmind/files/patch-man__rash.1 b/sysutils/radmind/files/patch-man__rash.1
index dd8178a7cacd..ecafa184eadb 100644
--- a/sysutils/radmind/files/patch-man__rash.1
+++ b/sysutils/radmind/files/patch-man__rash.1
@@ -1,5 +1,5 @@
---- ./man/rash.1.orig 2010-12-12 22:50:53.000000000 -0500
-+++ ./man/rash.1 2012-03-20 14:38:08.000000000 -0400
+--- ./man/rash.1.orig 2010-12-13 04:50:53.000000000 +0100
++++ ./man/rash.1 2014-06-29 12:15:04.247544144 +0200
@@ -11,6 +11,10 @@
|
.B -q
diff --git a/sysutils/radmind/files/patch-mkdirs.c b/sysutils/radmind/files/patch-mkdirs.c
index de5d57bf7af0..a4ba59a48baf 100644
--- a/sysutils/radmind/files/patch-mkdirs.c
+++ b/sysutils/radmind/files/patch-mkdirs.c
@@ -1,5 +1,5 @@
---- ./mkdirs.c.orig 2010-12-12 22:42:49.000000000 -0500
-+++ ./mkdirs.c 2012-03-20 14:38:08.000000000 -0400
+--- ./mkdirs.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./mkdirs.c 2014-06-29 12:15:04.247544144 +0200
@@ -37,7 +37,9 @@
if ( mkdir( path, 0777 ) == 0 ) {
break;
diff --git a/sysutils/radmind/files/patch-ra.sh b/sysutils/radmind/files/patch-ra.sh
index 949abd5083f9..5d2f2d116751 100644
--- a/sysutils/radmind/files/patch-ra.sh
+++ b/sysutils/radmind/files/patch-ra.sh
@@ -1,5 +1,5 @@
---- ./ra.sh.orig 2010-12-12 22:42:49.000000000 -0500
-+++ ./ra.sh 2012-03-20 14:38:08.000000000 -0400
+--- ./ra.sh.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./ra.sh 2014-06-29 12:15:04.248542975 +0200
@@ -91,7 +91,7 @@
}
diff --git a/sysutils/radmind/files/patch-t2pkg.c b/sysutils/radmind/files/patch-t2pkg.c
index 5fe9840818a3..a033610d789d 100644
--- a/sysutils/radmind/files/patch-t2pkg.c
+++ b/sysutils/radmind/files/patch-t2pkg.c
@@ -1,5 +1,5 @@
---- ./t2pkg.c.orig 2010-12-12 22:42:49.000000000 -0500
-+++ ./t2pkg.c 2012-03-20 14:38:08.000000000 -0400
+--- ./t2pkg.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./t2pkg.c 2014-06-29 12:15:04.248542975 +0200
@@ -38,6 +38,7 @@
extern off_t lsize;
extern char *version;
diff --git a/sysutils/radmind/files/patch-transcript.c b/sysutils/radmind/files/patch-transcript.c
new file mode 100644
index 000000000000..f60355b061e5
--- /dev/null
+++ b/sysutils/radmind/files/patch-transcript.c
@@ -0,0 +1,133 @@
+--- ./transcript.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./transcript.c 2014-06-29 12:15:04.249543651 +0200
+@@ -45,7 +45,7 @@
+
+ char *path_prefix = NULL;
+ int edit_path;
+-int skip;
++int skip = 0;
+ int cksum;
+ int fs_minus;
+ int exclude_warnings = 0;
+@@ -271,7 +271,7 @@
+ tran->t_pinfo.pi_stat.st_mode = strtol( argv[ 2 ], NULL, 8 );
+ tran->t_pinfo.pi_stat.st_uid = atoi( argv[ 3 ] );
+ tran->t_pinfo.pi_stat.st_gid = atoi( argv[ 4 ] );
+- tran->t_pinfo.pi_stat.st_mtime = atoi( argv[ 5 ] );
++ tran->t_pinfo.pi_stat.st_mtime = strtotimet( argv[ 5 ], NULL, 10 );
+ tran->t_pinfo.pi_stat.st_size = strtoofft( argv[ 6 ], NULL, 10 );
+ if ( tran->t_type != T_NEGATIVE ) {
+ if (( cksum ) && ( strcmp( "-", argv [ 7 ] ) == 0 )) {
+@@ -436,12 +436,13 @@
+ * but the corresponding transcript is negative, hence, retain
+ * the file system's mtime. Woof!
+ */
+- fprintf( outtran, "%c %-37s\t%.4lo %5d %5d %9d %7" PRIofft "d %s\n",
++ fprintf( outtran, "%c %-37s\t%.4lo %5d %5d %9" PRItimet "d "
++ "%7" PRIofft "d %s\n",
+ cur->pi_type, epath,
+ (unsigned long)( T_MODE & cur->pi_stat.st_mode ),
+ (int)cur->pi_stat.st_uid, (int)cur->pi_stat.st_gid,
+ ( flag == PR_STATUS_NEG ) ?
+- (int)fs->pi_stat.st_mtime : (int)cur->pi_stat.st_mtime,
++ fs->pi_stat.st_mtime : cur->pi_stat.st_mtime,
+ cur->pi_stat.st_size, cur->pi_cksum_b64 );
+ break;
+
+@@ -723,7 +724,7 @@
+ if ( begin_tran->t_type != T_SPECIAL &&
+ t_exclude( begin_tran->t_pinfo.pi_name )) {
+ if ( exclude_warnings ) {
+- fprintf( stderr, "Warning: excluding %s\n",
++ printf( "#! Warning: excluding %s\n",
+ begin_tran->t_pinfo.pi_name );
+ }
+ transcript_parse( begin_tran );
+@@ -769,7 +770,7 @@
+ if ( list_size( special_list ) <= 0
+ || list_check( special_list, path ) == 0 ) {
+ if ( exclude_warnings ) {
+- fprintf( stderr, "Warning: excluding %s\n", path );
++ printf( "#! Warning: excluding %s\n", path );
+ }
+
+ /* move the transcripts ahead */
+@@ -949,7 +950,7 @@
+ */
+ t_new( T_NULL, NULL, NULL, NULL );
+
+- if ( skip ) {
++ if ( skip == T_SKIP_ALL ) {
+ return;
+ }
+
+@@ -985,15 +986,17 @@
+ exit( 2 );
+ }
+
+- if (( list_size( special_list ) > 0 ) && ( location == K_CLIENT )) {
+- /* open the special transcript if there were any special files */
+- if ( strlen( kdir ) + strlen( special ) + 2 > MAXPATHLEN ) {
+- fprintf( stderr,
+- "special path too long: %s%s\n", kdir, special );
+- exit( 2 );
++ if ( !( skip & T_SKIP_SPECIAL )) {
++ if (( list_size( special_list ) > 0 ) && ( location == K_CLIENT )) {
++ /* open the special transcript if there were any special files */
++ if ( strlen( kdir ) + strlen( special ) + 2 > MAXPATHLEN ) {
++ fprintf( stderr,
++ "special path too long: %s%s\n", kdir, special );
++ exit( 2 );
++ }
++ sprintf( fullpath, "%s%s", kdir, special );
++ t_new( T_SPECIAL, fullpath, special, "special" );
+ }
+- sprintf( fullpath, "%s%s", kdir, special );
+- t_new( T_SPECIAL, fullpath, special, "special" );
+ }
+
+ if ( tran_head->t_type == T_NULL && edit_path == APPLICABLE ) {
+@@ -1108,6 +1111,10 @@
+ break;
+
+ case 'n': /* negative */
++ if ( skip & T_SKIP_NEGATIVE ) {
++ break;
++ }
++
+ if ( minus ) {
+ t_remove( T_NEGATIVE, av[ 1 ] );
+ } else {
+@@ -1116,6 +1123,10 @@
+ break;
+
+ case 'p': /* positive */
++ if ( skip & T_SKIP_POSITIVE ) {
++ break;
++ }
++
+ if ( minus ) {
+ t_remove( T_POSITIVE, av[ 1 ] );
+ } else {
+@@ -1124,6 +1135,10 @@
+ break;
+
+ case 'x': /* exclude */
++ if ( skip & T_SKIP_EXCLUDES ) {
++ break;
++ }
++
+ if (( d_pattern = decode( av[ 1 ] )) == NULL ) {
+ fprintf( stderr, "%s: line %d: decode buffer too small\n",
+ kfile, linenum );
+@@ -1149,6 +1164,10 @@
+ break;
+
+ case 's': /* special */
++ if ( skip & T_SKIP_SPECIAL ) {
++ break;
++ }
++
+ path = av[ 1 ];
+
+ /* Convert path to match transcript type */
diff --git a/sysutils/radmind/files/patch-transcript.h b/sysutils/radmind/files/patch-transcript.h
new file mode 100644
index 000000000000..3c803acd0042
--- /dev/null
+++ b/sysutils/radmind/files/patch-transcript.h
@@ -0,0 +1,17 @@
+--- ./transcript.h.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./transcript.h 2014-06-29 12:15:04.249543651 +0200
+@@ -39,6 +39,14 @@
+ extern FILE *outtran;
+ extern char *path_prefix;
+
++
++#define T_SKIP_POSITIVE (1 << 1)
++#define T_SKIP_NEGATIVE (1 << 2)
++#define T_SKIP_SPECIAL (1 << 3)
++#define T_SKIP_EXCLUDES (1 << 4)
++#define T_SKIP_ALL (T_SKIP_POSITIVE | T_SKIP_NEGATIVE | \
++ T_SKIP_SPECIAL | T_SKIP_EXCLUDES)
++
+ struct pathinfo {
+ char pi_type;
+ int pi_minus;
diff --git a/sysutils/radmind/files/patch-update.c b/sysutils/radmind/files/patch-update.c
new file mode 100644
index 000000000000..11be7ccc1e58
--- /dev/null
+++ b/sysutils/radmind/files/patch-update.c
@@ -0,0 +1,19 @@
+--- ./update.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./update.c 2014-06-29 12:15:04.249543651 +0200
+@@ -26,6 +26,7 @@
+ #include "update.h"
+ #include "code.h"
+ #include "radstat.h"
++#include "largefile.h"
+ #include "transcript.h"
+ #include "progress.h"
+ #include "mkdirs.h"
+@@ -73,7 +74,7 @@
+
+ mode = strtol( targv[ 2 ], (char **)NULL, 8 );
+
+- times.modtime = atoi( targv[ 5 ] );
++ times.modtime = strtotimet( targv[ 5 ], NULL, 10 );
+ if ( times.modtime != st->st_mtime ) {
+ times.actime = st->st_atime;
+ if ( utime( path, &times ) != 0 ) {
diff --git a/sysutils/radmind/pkg-descr b/sysutils/radmind/pkg-descr
index 0953fe6080af..08b1019828b3 100644
--- a/sysutils/radmind/pkg-descr
+++ b/sysutils/radmind/pkg-descr
@@ -3,4 +3,6 @@ loaded over the network. This is useful for administering a large number
of hosts at the filesystem level. It can also act as an intelligent
tripwire.
-WWW: http://rsug.itd.umich.edu/software/radmind/
+This port contains security and functionality patches through May 22, 2014.
+
+WWW: http://sourceforge.net/projects/radmind/
diff --git a/sysutils/radmind/pkg-plist b/sysutils/radmind/pkg-plist
index 43de5ed68c1c..64a8f6ff90e8 100644
--- a/sysutils/radmind/pkg-plist
+++ b/sysutils/radmind/pkg-plist
@@ -10,27 +10,53 @@ bin/ra.sh
bin/repo
bin/twhich
sbin/radmind
+man/man1/fsdiff.1.gz
+man/man1/ktcheck.1.gz
+man/man1/lapply.1.gz
+man/man1/lcksum.1.gz
+man/man1/lcreate.1.gz
+man/man1/lfdiff.1.gz
+man/man1/lmerge.1.gz
+man/man1/lsort.1.gz
+man/man1/rash.1.gz
+man/man1/repo.1.gz
+man/man1/twhich.1.gz
+man/man5/applefile.5.gz
+man/man8/radmind.8.gz
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/SPEC
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@exec mkdir -p -m 755 %%RADMIND_BASE_DIR%%
-@exec mkdir -p -m 755 %%RADMIND_BASE_DIR%%/cert
-@exec mkdir -p -m 755 %%RADMIND_BASE_DIR%%/client
-@exec mkdir -p -m 755 %%RADMIND_BASE_DIR%%/preapply
-@exec mkdir -p -m 755 %%RADMIND_BASE_DIR%%/postapply
-@exec chown -R %%RADMINUSER%%:%%RADMINUSER%% %%RADMIND_BASE_DIR%%
+@cwd /
@unexec if cmp -s %%RADMIND_BASE_DIR%%/config.sample %%RADMIND_BASE_DIR%%/config; then rm -f %%RADMIND_BASE_DIR%%/config; fi
+@mode 700
%%RADMIND_BASE_DIR%%/config.sample
-@dirrmtry %%RADMIND_BASE_DIR%%/transcript
-@dirrmtry %%RADMIND_BASE_DIR%%/tmp/transcript
-@dirrmtry %%RADMIND_BASE_DIR%%/tmp/file
-@dirrmtry %%RADMIND_BASE_DIR%%/tmp
-@dirrmtry %%RADMIND_BASE_DIR%%/special
-@dirrmtry %%RADMIND_BASE_DIR%%/postapply
-@dirrmtry %%RADMIND_BASE_DIR%%/preapply
-@dirrmtry %%RADMIND_BASE_DIR%%/file
-@dirrmtry %%RADMIND_BASE_DIR%%/command
-@dirrmtry %%RADMIND_BASE_DIR%%/client
-@dirrmtry %%RADMIND_BASE_DIR%%/cert
-@dirrmtry %%RADMIND_BASE_DIR%%
+@mode
+@owner %%RADMINUSER%%
+@group %%RADMINUSER%%
+@unexec rmdir %D/%%RADMIND_BASE_DIR%%/transcript 2>/dev/null || true
+@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/transcript
+@unexec rmdir %D/%%RADMIND_BASE_DIR%%/tmp/transcript 2>/dev/null || true
+@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/tmp/transcript
+@unexec rmdir %D/%%RADMIND_BASE_DIR%%/tmp/file 2>/dev/null || true
+@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/tmp/file
+@unexec rmdir %D/%%RADMIND_BASE_DIR%%/tmp 2>/dev/null || true
+@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/tmp
+@unexec rmdir %D/%%RADMIND_BASE_DIR%%/special 2>/dev/null || true
+@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/special
+@unexec rmdir %D/%%RADMIND_BASE_DIR%%/postapply 2>/dev/null || true
+@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/postapply
+@unexec rmdir %D/%%RADMIND_BASE_DIR%%/preapply 2>/dev/null || true
+@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/preapply
+@unexec rmdir %D/%%RADMIND_BASE_DIR%%/file 2>/dev/null || true
+@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/file
+@unexec rmdir %D/%%RADMIND_BASE_DIR%%/command 2>/dev/null || true
+@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/command
+@unexec rmdir %D/%%RADMIND_BASE_DIR%%/client 2>/dev/null || true
+@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/client
+@unexec rmdir %D/%%RADMIND_BASE_DIR%%/cert 2>/dev/null || true
+@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/cert
+@unexec rmdir %D/%%RADMIND_BASE_DIR%% 2>/dev/null || true
+@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%
+@owner
+@group