View | Details | Raw Unified | Return to bug 190120 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-23 / +26 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	radmind
4
PORTNAME=	radmind
5
PORTVERSION=	1.14.1
5
PORTVERSION=	1.14.1
6
PORTREVISION=	2012032001
6
PORTREVISION=	2014052201
7
CATEGORIES=	sysutils
7
CATEGORIES=	sysutils
8
MASTER_SITES=	SF
8
MASTER_SITES=	SF
9
MASTER_SITE_SUBDIR=${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
9
MASTER_SITE_SUBDIR=${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
Lines 11-16 Link Here
11
MAINTAINER=	mikeg@bsd-box.net
11
MAINTAINER=	mikeg@bsd-box.net
12
COMMENT=	Utility for administering filesystem changes
12
COMMENT=	Utility for administering filesystem changes
13
13
14
LICENSE=	Michigan
15
LICENSE_NAME=	University of Michigan License
16
LICENSE_FILE=	${WRKSRC}/COPYRIGHT
17
LICENSE_PERMS=	${_LICENSE_PERMS_DEFAULT}
18
14
USE_OPENSSL=	yes
19
USE_OPENSSL=	yes
15
USE_RC_SUBR=	radmind
20
USE_RC_SUBR=	radmind
16
MAKE_JOBS_UNSAFE=	yes
21
MAKE_JOBS_UNSAFE=	yes
Lines 24-61 Link Here
24
RADMIND_BASE_DIR?=	/var/radmind
29
RADMIND_BASE_DIR?=	/var/radmind
25
30
26
SUB_LIST=	RADMIND_BASE_DIR=${RADMIND_BASE_DIR} RADMINUSER=${RADMINUSER}
31
SUB_LIST=	RADMIND_BASE_DIR=${RADMIND_BASE_DIR} RADMINUSER=${RADMINUSER}
27
PLIST_SUB=	RADMIND_BASE_DIR=${RADMIND_BASE_DIR} RADMINUSER=${RADMINUSER}
32
PLIST_SUB=	RADMIND_BASE_DIR=${RADMIND_BASE_DIR:S@/@@} RADMINUSER=${RADMINUSER}
28
SUB_FILES+=	pkg-install pkg-message
33
SUB_FILES+=	pkg-install pkg-message
29
34
30
MAN1=		fsdiff.1 ktcheck.1 lapply.1 lcksum.1 lcreate.1 lfdiff.1 \
31
		lmerge.1 lsort.1 twhich.1 rash.1 repo.1
32
MAN5=		applefile.5
33
MAN8=		radmind.8
34
DOCS=		COPYRIGHT README SPEC
35
DOCS=		COPYRIGHT README SPEC
35
36
36
OPTIONS_DEFINE=	IGNORE_TIMESTAMPS DOCS
37
OPTIONS_DEFINE=	DOCS
37
IGNORE_TIMESTAMPS_DESC=	Add '-t' option to fsdiff
38
IGNORE_TIMESTAMPS_DESC=	Add '-t' option to fsdiff
38
39
39
NO_STAGE=	yes
40
.include <bsd.port.options.mk>
40
.include <bsd.port.options.mk>
41
41
42
.if ${PORT_OPTIONS:MIGNORE_TIMESTAMPS}
43
EXTRA_PATCHES+=	${FILESDIR}/optpatch-ignore_timestamps
44
.endif
45
46
post-install:
42
post-install:
47
# Ugly hack to remove generated man pages
43
	# Ugly hack to remove generated man pages
48
	${RM} -rf ${WRKSRC}/tmp
44
	${RM} -rf ${WRKSRC}/tmp
49
45
50
.if ${PORT_OPTIONS:MDOCS}
46
	# Port's Docs (Copyright & wire protocol info)
51
	${MKDIR} ${DOCSDIR}
47
	${MKDIR} ${STAGEDIR}${DOCSDIR}
52
	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
48
	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
53
.endif
54
	${CP} ${FILESDIR}/config.sample ${RADMIND_BASE_DIR}/config.sample
55
	@if [ ! -f ${RADMIND_BASE_DIR}/config ]; then \
56
		${CP} -p ${RADMIND_BASE_DIR}/config.sample ${RADMIND_BASE_DIR}/config ; \
57
	fi
58
	@${CHOWN} -R ${RADMINUSER}:${RADMINUSER} ${RADMIND_BASE_DIR}
59
	@${CAT} ${PKGMESSAGE}
60
49
50
	${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}
51
	${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/cert
52
	${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/client
53
	${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/command
54
	${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/file
55
	${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/postapply
56
	${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/preapply
57
	${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/special
58
	${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/tmp
59
	${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/tmp/file
60
	${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/tmp/transcript
61
	${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/transcript
62
	${CP}    ${FILESDIR}/config.sample ${STAGEDIR}${RADMIND_BASE_DIR}/config.sample
63
61
.include <bsd.port.mk>
64
.include <bsd.port.mk>
(-)files/patch-.gitignore (-2 / +2 lines)
Lines 1-5 Link Here
1
--- ./.gitignore.orig	2010-12-12 22:42:49.000000000 -0500
1
--- ./.gitignore.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./.gitignore	2012-03-20 14:37:54.000000000 -0400
2
+++ ./.gitignore	2014-06-29 12:15:04.241543320 +0200
3
@@ -10,12 +10,8 @@
3
@@ -10,12 +10,8 @@
4
 config.log
4
 config.log
5
 config.status
5
 config.status
(-)files/patch-.gitmodules (+6 lines)
Line 0 Link Here
1
--- ./.gitmodules.orig	2014-06-29 12:15:04.241543320 +0200
2
+++ ./.gitmodules	2014-06-29 12:15:04.242543988 +0200
3
@@ -0,0 +1,3 @@
4
+[submodule "libsnet"]
5
+	path = libsnet
6
+	url = git://libsnet.git.sourceforge.net/gitroot/libsnet/libsnet
(-)files/patch-Makefile.in (-2 / +50 lines)
Lines 1-5 Link Here
1
--- ./Makefile.in.orig	2010-12-12 22:43:49.000000000 -0500
1
--- Makefile.in.orig	2010-12-13 04:43:49.000000000 +0100
2
+++ ./Makefile.in	2012-03-20 14:37:54.000000000 -0400
2
+++ Makefile.in	2014-06-29 13:32:18.069225436 +0200
3
@@ -204,37 +204,37 @@
3
@@ -204,37 +204,37 @@
4
 radmind : libsnet/libsnet.la ${RADMIND_OBJ} Makefile
4
 radmind : libsnet/libsnet.la ${RADMIND_OBJ} Makefile
5
 	${CC} ${CFLAGS} -o radmind ${RADMIND_OBJ} ${LDFLAGS}
5
 	${CC} ${CFLAGS} -o radmind ${RADMIND_OBJ} ${LDFLAGS}
Lines 48-50 Link Here
48
 	${CC} ${CFLAGS} -o lsort ${LSORT_OBJ} ${LDFLAGS}
48
 	${CC} ${CFLAGS} -o lsort ${LSORT_OBJ} ${LDFLAGS}
49
 
49
 
50
 FRC :
50
 FRC :
51
@@ -259,7 +259,7 @@
52
 	(cd .. && tar cvfz ${DISTDIR}.tar.gz ${DISTDIR})
53
 
54
 rash : FRC
55
-	-mkdir tmp
56
+	-mkdir -p tmp
57
 	sed -e 's@_RADMIND_HOST@${RADMIND_HOST}@g' \
58
 	    -e 's@_RADMIND_AUTHLEVEL@${RADMIND_AUTHLEVEL}@g' \
59
 	    -e 's@_RADMIND_PREAPPLY@${PREAPPLYDIR}@g' \
60
@@ -273,8 +273,7 @@
61
 	    ${srcdir}/ra.sh > tmp/ra.sh; 
62
 
63
 man : FRC
64
-	-mkdir tmp
65
-	-mkdir tmp/man
66
+	-mkdir -p tmp/man
67
 	pwd
68
 	for i in ${MANTARGETS}; do \
69
 	    sed -e 's@_RADMIND_PATH@${RADMINDDIR}@g'  \
70
@@ -290,23 +289,22 @@
71
 install	: all man rash
72
 	-mkdir -p ${DESTDIR}/${exec_prefix}
73
 	-mkdir -p ${DESTDIR}/${SBINDIR}
74
-	${INSTALL} -m 0755 -c radmind ${DESTDIR}/${SBINDIR}/
75
+	${INSTALL} -s -m 0755 -c radmind ${DESTDIR}/${SBINDIR}/
76
 	-mkdir -p ${DESTDIR}/${BINDIR}
77
 	for i in ${BINTARGETS}; do \
78
-	    ${INSTALL} -m 0755 -c $$i ${DESTDIR}/${BINDIR}/; \
79
+	    ${INSTALL} -s -m 0755 -c $$i ${DESTDIR}/${BINDIR}/; \
80
 	done
81
 	${INSTALL} -m 0755 -c tmp/ra.sh ${DESTDIR}/${BINDIR}/
82
 	-mkdir -p ${DESTDIR}/${prefix}
83
-	-mkdir -p ${DESTDIR}/${MANDIR}
84
-	-mkdir ${DESTDIR}/${MANDIR}/man1
85
+	-mkdir -p ${DESTDIR}/${MANDIR}/man1
86
 	for i in ${MAN1TARGETS}; do \
87
 	    ${INSTALL} -m 0644 -c tmp/man/$$i ${DESTDIR}/${MANDIR}/man1/; \
88
 	done
89
-	-mkdir ${DESTDIR}/${MANDIR}/man5
90
+	-mkdir -p ${DESTDIR}/${MANDIR}/man5
91
 	for i in ${MAN5TARGETS}; do \
92
 	    ${INSTALL} -m 0644 -c tmp/man/$$i ${DESTDIR}/${MANDIR}/man5/; \
93
 	done
94
-	-mkdir ${DESTDIR}/${MANDIR}/man8
95
+	-mkdir -p ${DESTDIR}/${MANDIR}/man8
96
 	 for i in ${MAN8TARGETS}; do \
97
 	    ${INSTALL} -m 0644 -c tmp/man/$$i ${DESTDIR}/${MANDIR}/man8/; \
98
 	done
(-)files/patch-README (-3 / +3 lines)
Lines 1-5 Link Here
1
--- ./README.orig	2010-12-12 22:42:49.000000000 -0500
1
--- ./README.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./README	2012-03-20 14:37:54.000000000 -0400
2
+++ ./README	2014-06-29 12:15:04.242543988 +0200
3
@@ -72,25 +72,25 @@
3
@@ -72,25 +72,25 @@
4
   % "env CPPFLAGS=-I/usr/kerberos/include ./configure"
4
   % "env CPPFLAGS=-I/usr/kerberos/include ./configure"
5
 
5
 
Lines 19-25 Link Here
19
 
19
 
20
-cvs -d :pserver:anonymous@radmind.cvs.sourceforge.net:/cvsroot/radmind \
20
-cvs -d :pserver:anonymous@radmind.cvs.sourceforge.net:/cvsroot/radmind \
21
-	checkout radmind
21
-	checkout radmind
22
+    git clone git://radmind.git.sourceforge.net/gitroot/gradmind
22
+    git clone git://radmind.git.sourceforge.net/gitroot/radmind/radmind
23
 
23
 
24
 2) Move into the new radmind directory:
24
 2) Move into the new radmind directory:
25
 
25
 
(-)files/patch-aclocal.m4 (-2 / +23 lines)
Lines 1-5 Link Here
1
--- ./aclocal.m4.orig	2010-12-12 22:42:49.000000000 -0500
1
--- ./aclocal.m4.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./aclocal.m4	2012-03-20 14:37:54.000000000 -0400
2
+++ ./aclocal.m4	2014-06-29 12:15:04.242543988 +0200
3
@@ -105,16 +105,11 @@
3
@@ -105,16 +105,11 @@
4
 	    arches="-arch i386 -arch ppc"
4
 	    arches="-arch i386 -arch ppc"
5
 	    ;;
5
 	    ;;
Lines 19-21 Link Here
19
 	    ;;
19
 	    ;;
20
 
20
 
21
 	  *)
21
 	  *)
22
@@ -129,3 +124,20 @@
23
     fi
24
 ])
25
 
26
+AC_DEFUN([MACOSX_MUTE_DEPRECATION_WARNINGS],
27
+[
28
+    dnl Lion deprecates a system-provided OpenSSL. Build output
29
+    dnl is cluttered with useless deprecation warnings.
30
+
31
+    AS_IF([test x"$CC" = x"gcc"], [
32
+        case "${host_os}" in
33
+        darwin11*)
34
+            AC_MSG_NOTICE([muting deprecation warnings from compiler])
35
+            OPTOPTS="$OPTOPTS -Wno-deprecated-declarations"
36
+            ;;
37
+
38
+        *)
39
+            ;;
40
+        esac
41
+    ])
42
+])
(-)files/patch-argcargv.c (+13 lines)
Line 0 Link Here
1
--- ./argcargv.c.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./argcargv.c	2014-06-29 12:15:04.243544285 +0200
3
@@ -48,7 +48,9 @@
4
 
5
     if ( acav == NULL ) {
6
 	if ( acavg == NULL ) {
7
-	    acavg = acav_alloc();
8
+	    if (( acavg = acav_alloc()) == NULL ) {
9
+		return( -1 );
10
+	    }
11
 	}
12
 	acav = acavg;
13
     }
(-)files/patch-command.c (+230 lines)
Line 0 Link Here
1
--- ./command.c.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./command.c	2014-06-29 12:15:04.244544161 +0200
3
@@ -477,38 +477,90 @@
4
 
5
 /* looks for special file info in transcripts */
6
     char **
7
-special_t( char *transcript, char *epath )
8
+special_t( char *sp_path, char *remote_path )
9
 {
10
-    FILE		*fs;
11
-    int			ac, len;
12
-    char		**av;
13
+    FILE		*fs = NULL;
14
+    int			i, ac, len, ln;
15
+    char		**av = NULL;
16
+    char		*paths[ 4 ] = { NULL };
17
+    char		*p;
18
+    char		sp_t[ MAXPATHLEN ];
19
     static char		line[ MAXPATHLEN ];
20
 
21
-    if (( fs = fopen( transcript, "r" )) == NULL ) {
22
-	return( NULL );
23
-    }
24
+    /*
25
+     * in order, we look for special file transcript lines in the
26
+     * following locations:
27
+     *
28
+     *      - A transcript in the same directory and with the same name
29
+     *	      as the special file, but with a ".T" extension.
30
+     *
31
+     *      - A transcript named "<remote_id>.T" in the same directory as
32
+     *        the client's special file directory root.
33
+     *
34
+     *      - /var/radmind/transcript/special.T
35
+     *
36
+     * if no matching transcript line is found, default metadata is
37
+     * returned to the client (type: f; mode: 0444; owner: 0; group: 0).
38
+     */
39
+    paths[ 0 ] = sp_path;
40
+    paths[ 1 ] = special_dir;
41
+    paths[ 2 ] = "transcript/special.T";
42
+    paths[ 3 ] = NULL;
43
 
44
-    while ( fgets( line, MAXPATHLEN, fs ) != NULL ) {
45
-	len = strlen( line );
46
-	if (( line[ len - 1 ] ) != '\n' ) {
47
-	    syslog( LOG_ERR, "special_t: %s: line too long", transcript );
48
-	    break;
49
+    for ( i = 0; paths[ i ] != NULL; i++ ) {
50
+	if (( p = strrchr( paths[ i ], '.' )) != NULL
51
+		&& strcmp( p, ".T" ) == 0 ) {
52
+	    if ( strlen( paths[ i ] ) >= MAXPATHLEN ) {
53
+		syslog( LOG_WARNING, "special_t: path \"%s\" too long",
54
+			paths[ i ] );
55
+		continue;
56
+	    }
57
+	    strcpy( sp_t, paths[ i ] );
58
+	} else if ( snprintf( sp_t, MAXPATHLEN, "%s.T",
59
+			      paths[ i ] ) >= MAXPATHLEN ) {
60
+	    syslog( LOG_WARNING, "special_t: path \"%s.T\" too long", sp_path );
61
+	    continue;
62
 	}
63
 
64
-	if (( ac = argcargv( line, &av )) != 8 ) {
65
+	if (( fs = fopen( sp_t, "r" )) == NULL ) {
66
 	    continue;
67
 	}
68
-	if (( *av[ 0 ] != 'f' ) && ( *av[ 0 ] != 'a' )) {
69
-	    continue;
70
+
71
+	ln = 0;
72
+	while ( fgets( line, MAXPATHLEN, fs ) != NULL ) {
73
+	    ln++;
74
+	    len = strlen( line );
75
+	    if (( line[ len - 1 ] ) != '\n' ) {
76
+		syslog( LOG_ERR, "special_t: %s: line %d too long", sp_t, ln );
77
+		break;
78
+	    }
79
+
80
+	    /* only files and applefiles allowed */
81
+	    if ( strncmp( line, "f ", strlen( "f " )) != 0 &&
82
+			strncmp( line, "a ", strlen( "a " )) != 0 ) {
83
+		continue;
84
+	    }
85
+	    if (( ac = argcargv( line, &av )) != 8 ) {
86
+		syslog( LOG_WARNING, "special_t: %s: line %d: "
87
+			"bad transcript line", sp_t, ln );
88
+		continue;
89
+	    }
90
+
91
+	    if ( strcmp( av[ 1 ], remote_path ) == 0 ) { 
92
+		(void)fclose( fs );
93
+		return( av );
94
+	    }
95
 	}
96
 
97
-	if ( strcmp( av[ 1 ], epath ) == 0 ) { 
98
-	    (void)fclose( fs );
99
-	    return( av );
100
+	if ( fclose( fs ) != 0 ) {
101
+	    syslog( LOG_WARNING, "special_t: fclose %s: %m", sp_t );
102
 	}
103
+	fs = NULL;
104
     }
105
-
106
-    (void)fclose( fs );
107
+    if ( fs != NULL ) {
108
+	(void)fclose( fs );
109
+    }
110
+    
111
     return( NULL );
112
 }
113
 
114
@@ -624,11 +676,11 @@
115
     switch ( key ) {
116
     case K_COMMAND:
117
 	if ( ac == 2 ) {
118
-	    snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
119
+	    snet_writef( sn, RADMIND_STAT_FMT,
120
 		"f", "command", DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
121
 		st.st_mtime, st.st_size, cksum_b64 );
122
 	} else {
123
-	    snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
124
+	    snet_writef( sn, RADMIND_STAT_FMT,
125
 		"f", av[ 2 ], DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
126
 		st.st_mtime, st.st_size, cksum_b64 );
127
 	}
128
@@ -636,61 +688,33 @@
129
         
130
 		    
131
     case K_TRANSCRIPT:
132
-	snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
133
+	snet_writef( sn, RADMIND_STAT_FMT,
134
 		"f", av[ 2 ], 
135
 		DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
136
 		st.st_mtime, st.st_size, cksum_b64 );
137
 	return( 0 );
138
     
139
     case K_SPECIAL:
140
-	/*  status on a special file comes from 1 of three cases:
141
-	 *  1. A transcript in the special file directory
142
-	 *  2. A transcript in the Transcript dir with .T appended
143
-	 *  3. No transcript is found, and constants are returned
144
-	 */
145
-
146
-        /* look for transcript containing the information */
147
-	if ( ( strlen( path ) + 2 ) > MAXPATHLEN ) {
148
-	    syslog( LOG_WARNING, 
149
-		"f_stat: transcript path longer than MAXPATHLEN" );
150
-
151
-	    /* return constants */
152
-	    snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
153
-		    "f", av[ 2 ], 
154
-		    DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
155
-		    st.st_mtime, st.st_size, cksum_b64 );
156
-	    return( 0 );
157
-	}
158
-
159
-	/* if allowable, check for transcript in the special file directory */
160
-
161
-	strcat( path, ".T" );
162
-
163
-	/* store value of av[ 2 ], because argcargv will be called
164
+	/*
165
+	 * store value of av[ 2 ], because argcargv will be called
166
 	 * from special_t(), and that will blow away the current values
167
-	 * for av[ 2 ]
168
-	 *
169
-	 * Could just use new argvargc API... XXX  Notice how we never free
170
-	 * env_file...
171
+	 * for av[ 2 ].
172
 	 */
173
-
174
 	if (( enc_file = strdup( av[ 2 ] )) == NULL ) {
175
 	    syslog( LOG_ERR, "f_stat: strdup: %s %m", av[ 2 ] );
176
 	    return( -1 );
177
 	}
178
 
179
 	if (( av = special_t( path, enc_file )) == NULL ) {
180
-	    if (( av = special_t( "transcript/special.T", enc_file ))
181
-		    == NULL ) {
182
-		snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
183
-			"f", enc_file, 
184
-			DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID, 
185
-			st.st_mtime, st.st_size, cksum_b64 );
186
-		free( enc_file );
187
-		return( 0 );
188
-	    }
189
+	    /* no special transcript match found, return defaults. */
190
+	    snet_writef( sn, RADMIND_STAT_FMT,
191
+		    "f", enc_file, 
192
+		    DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID, 
193
+		    st.st_mtime, st.st_size, cksum_b64 );
194
+	    free( enc_file );
195
+	    return( 0 );
196
 	}
197
-	snet_writef( sn, "%s %s %s %s %s %d %" PRIofft "d %s\r\n",
198
+	snet_writef( sn, RADMIND_STAT_FMT,
199
 		av[ 0 ], enc_file,
200
 		av[ 2 ], av[ 3 ], av[ 4 ],
201
 		st.st_mtime, st.st_size, cksum_b64 );
202
@@ -1261,8 +1285,7 @@
203
 	    continue;
204
 	}
205
 	if ( strcmp( av[ 0 ], "@include" ) == 0 ) {
206
-	    depth++;
207
-	    if ( depth > RADMIND_MAX_INCLUDE_DEPTH ) {
208
+	    if ( depth >= RADMIND_MAX_INCLUDE_DEPTH ) {
209
 		syslog( LOG_ERR, "%s: line %d: include %s exceeds max depth",
210
 			path_config, linenum, av[ 1 ] );
211
 		goto command_k_done;
212
@@ -1277,7 +1300,7 @@
213
 		    continue;
214
 		}
215
 	    }
216
-	    if ( command_k( av[ 1 ], depth ) != 0 ) {
217
+	    if ( command_k( av[ 1 ], depth + 1 ) != 0 ) {
218
 		continue;
219
 	    }
220
 
221
@@ -1325,7 +1348,8 @@
222
 
223
     /* If we get here, the host that connected is not in the config
224
        file. So screw him. */
225
-    syslog( LOG_ERR, "host not in config file: %s", remote_host );
226
+    syslog( LOG_ERR, "host %s not in config file %s",
227
+		remote_host, path_config );
228
 
229
 command_k_done:
230
     snet_close( sn );
(-)files/patch-command.h (+8 lines)
Line 0 Link Here
1
--- ./command.h.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./command.h	2014-06-29 12:15:04.244544161 +0200
3
@@ -13,3 +13,5 @@
4
     char	*c_name;
5
     int		(*c_func)( SNET *, int, char *[] );
6
 };
7
+
8
+#define RADMIND_STAT_FMT "%s %s %o %d %d %" PRItimet "d %" PRIofft "d %s\r\n"
(-)files/patch-configure.ac (-7 / +14 lines)
Lines 1-12 Link Here
1
--- ./configure.ac.orig	2010-12-12 22:43:38.000000000 -0500
1
--- ./configure.ac.orig	2010-12-13 04:43:38.000000000 +0100
2
+++ ./configure.ac	2012-03-20 14:37:54.000000000 -0400
2
+++ ./configure.ac	2014-06-29 12:15:04.244544161 +0200
3
@@ -45,24 +45,29 @@
3
@@ -44,25 +44,36 @@
4
 
4
 # Check sizes
5
 # Check sizes
5
 AC_CHECK_SIZEOF(off_t)
6
 AC_CHECK_SIZEOF(off_t)
6
 
7
+AC_CHECK_SIZEOF(time_t)
8
+
7
+# check early to make any required changes to environment for following tests.
9
+# check early to make any required changes to environment for following tests.
8
+CHECK_UNIVERSAL_BINARIES
10
+CHECK_UNIVERSAL_BINARIES
9
+
11
+
12
+# mute Mac OS X's helpful notices that using dylib OpenSSL
13
+MACOSX_MUTE_DEPRECATION_WARNINGS
14
 
10
 # Checks for libraries.
15
 # Checks for libraries.
11
 AC_CHECK_LIB(c, inet_aton, libc_inet_aton=yes) 
16
 AC_CHECK_LIB(c, inet_aton, libc_inet_aton=yes) 
12
 if test x$libc_inet_aton != xyes; then 
17
 if test x$libc_inet_aton != xyes; then 
Lines 14-21 Link Here
14
 fi 
19
 fi 
15
-AC_CHECK_LIB(c, lchown)
20
-AC_CHECK_LIB(c, lchown)
16
-AC_CHECK_LIB(c, lchmod)
21
-AC_CHECK_LIB(c, lchmod)
17
+AC_CHECK_LIB(c, lchown, [AC_DEFINE(HAVE_LCHOWN)], [])
22
+if test x$host_vendor = xapply; then
18
+AC_CHECK_LIB(c, lchmod, [AC_DEFINE(HAVE_LCHMOD)], [])
23
+    AC_CHECK_LIB(c, lchown, [AC_DEFINE(HAVE_LCHOWN)], [])
24
+    AC_CHECK_LIB(c, lchmod, [AC_DEFINE(HAVE_LCHMOD)], [])
25
+fi
19
 AC_CHECK_LIB(nsl, gethostbyaddr)
26
 AC_CHECK_LIB(nsl, gethostbyaddr)
20
 AC_CHECK_LIB([socket], [socket])
27
 AC_CHECK_LIB([socket], [socket])
21
 AC_CHECK_LIB([ssl], [SSL_accept], , [CHECK_SSL])
28
 AC_CHECK_LIB([ssl], [SSL_accept], , [CHECK_SSL])
Lines 34-40 Link Here
34
     AC_CHECK_LIB([pam], [pam_start],
41
     AC_CHECK_LIB([pam], [pam_start],
35
 	[
42
 	[
36
 	AC_CHECK_HEADERS(pam/pam_appl.h, , [AC_CHECK_HEADERS(security/pam_appl.h)])
43
 	AC_CHECK_HEADERS(pam/pam_appl.h, , [AC_CHECK_HEADERS(security/pam_appl.h)])
37
@@ -75,7 +80,6 @@
44
@@ -75,7 +86,6 @@
38
 AC_CHECK_LIB(dns_sd, DNSServiceRegister)
45
 AC_CHECK_LIB(dns_sd, DNSServiceRegister)
39
 
46
 
40
 CHECK_ZLIB
47
 CHECK_ZLIB
(-)files/patch-contrib__specialist (+82 lines)
Line 0 Link Here
1
--- ./contrib/specialist.orig	2014-06-29 12:15:04.244544161 +0200
2
+++ ./contrib/specialist	2014-06-29 12:15:04.245544128 +0200
3
@@ -0,0 +1,79 @@
4
+#! /bin/sh
5
+
6
+# specialist: assist creation of special files.
7
+
8
+PATH=/bin:/usr/bin:/usr/local/bin; export PATH
9
+
10
+SCRIPT=`basename "$0"`
11
+INPUT_FORMAT=${INPUT_FORMAT:=path}
12
+
13
+usage() {
14
+    echo "usage: ${SCRIPT} [ -T ]" 1>&2
15
+    exit 1
16
+}
17
+
18
+die() {
19
+    msg=$*
20
+
21
+    echo "${msg}" 1>&2
22
+    exit 2
23
+}
24
+
25
+# create a special transcript line for the given path.
26
+specialize() {
27
+    local path="$1"
28
+
29
+    [ -n "${path}" -a -f "${path}" ] || die "Invalid path: ${path}"
30
+
31
+    fsdiff -1 -c sha1 "${path}"
32
+    return $?
33
+}
34
+
35
+specialize_transcript() {
36
+    local path=""
37
+    status=0
38
+
39
+    while read type path remainder; do
40
+	if [ x"${type}" != x"f" ]; then
41
+	    continue
42
+	fi
43
+
44
+	specialize "${path}"
45
+    done
46
+}
47
+
48
+specialize_paths() {
49
+    local path=""
50
+    status=0
51
+
52
+    while read path; do
53
+	specialize "${path}"
54
+	if [ $? -ne 0 ]; then
55
+	    status=1
56
+	fi
57
+    done
58
+
59
+    return "${status}"
60
+}
61
+
62
+while getopts T opt; do
63
+    case $opt in
64
+    T)
65
+	INPUT_FORMAT="transcript"
66
+	;;
67
+
68
+    *)
69
+	usage
70
+	;;
71
+	
72
+    esac
73
+done
74
+shift $((OPTIND - 1))
75
+
76
+if [ x"${INPUT_FORMAT}" = x"transcript" ]; then
77
+    specialize_transcript
78
+else
79
+    specialize_paths
80
+fi
81
+
82
+exit $?
(-)files/patch-fsdiff.c (+251 lines)
Line 0 Link Here
1
--- ./fsdiff.c.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./fsdiff.c	2014-06-29 12:15:04.245544128 +0200
3
@@ -249,6 +249,144 @@
4
     return;
5
 }
6
 
7
+    static char *
8
+canonicalized_path( char *path )
9
+{
10
+    int			len;
11
+    static char		cpath[ MAXPATHLEN ];
12
+
13
+    if ( path == NULL ) {
14
+	return( NULL );
15
+    }
16
+
17
+    len = strlen( path );
18
+    if ( len >= sizeof( cpath )) {
19
+	fprintf( stderr, "fsdiff: path too long: %s\n", path );
20
+	exit( 2 );
21
+    }
22
+    strcpy( cpath, path );
23
+
24
+    /* Clip trailing '/' */
25
+    if (( len > 1 ) && ( cpath[ len - 1 ] == '/' )) {
26
+	cpath[ len - 1 ] = '\0';
27
+	len--;
28
+    }
29
+
30
+    /*
31
+     * If prefix doesn't contain a directory, canonicalize it by prepending a
32
+     * "./".  This allow paths to be dynamically converted between relative and
33
+     * absolute paths without breaking sort order.
34
+     */
35
+    switch( cpath[ 0 ] ) {
36
+    case '/':
37
+        break;
38
+
39
+    case '.':
40
+	/* Don't rewrite '.' or paths starting with './' */
41
+	if ( len == 1 || cpath[ 1 ] == '/' ) {
42
+	    break;
43
+	}
44
+
45
+    default:
46
+	if ( len + 2 >= sizeof( cpath )) {
47
+	    fprintf( stderr, "fsdiff: path too long: ./%s\n", cpath );
48
+	    exit( 2 );
49
+	}
50
+	memmove( cpath + 2, cpath, len );
51
+	cpath[ 0 ] = '.'; cpath[ 1 ] = '/';
52
+
53
+        break;
54
+    }
55
+
56
+    /*
57
+     * Determine if called with relative or absolute pathing.  Path is relative
58
+     * if it's just '.' or starts with './'.  File names that start with a '.'
59
+     * are absolute.
60
+     */
61
+    if ( cpath[ 0 ] == '.' ) {
62
+	if ( len == 1 ) {
63
+	    tran_format = T_RELATIVE;
64
+	} else if ( cpath[ 1 ] == '/' ) {
65
+	    tran_format = T_RELATIVE;
66
+	} else {
67
+	    tran_format = T_ABSOLUTE;
68
+	}
69
+    } else {
70
+	tran_format = T_ABSOLUTE;
71
+    }
72
+
73
+    return( cpath );
74
+}
75
+
76
+    static void
77
+fsdiff( char *path, char *kfile, int start, int finish, int pdel ) 
78
+{
79
+    struct applefileinfo	afinfo;
80
+    struct stat			st;
81
+    char			type;
82
+    char			lpath[ MAXPATHLEN ];
83
+    int				len;
84
+
85
+    if (( dotfd = open( ".", O_RDONLY, 0 )) < 0 ) {
86
+	perror( "OOPS!" );
87
+	exit( 2 );
88
+    }
89
+
90
+    if ( skip && strcmp( path, "-" ) == 0 ) {
91
+	/* leave excludes in place */
92
+	skip = skip & ~T_SKIP_EXCLUDES;
93
+
94
+	path_prefix = "/";
95
+	transcript_init( kfile, K_CLIENT );
96
+
97
+	/* run -1 against every line we get from stdin */
98
+	while ( fgets( lpath, sizeof( lpath ), stdin ) != NULL ) {
99
+	    len = strlen( lpath );
100
+	    if ( lpath[ len - 1 ] != '\n' ) {
101
+		fprintf( stderr, "fsdiff: fgets: line too long\n" );
102
+		exit( 2 );
103
+	    }
104
+	    lpath[ len - 1 ] = '\0';
105
+	    path = canonicalized_path( lpath );
106
+
107
+	    if ( radstat( path, &st, &type, &afinfo ) != 0 ) {
108
+		if ( errno != ENOENT ) {
109
+		    perror( lpath );
110
+		    exit( 2 );
111
+		}
112
+
113
+		fprintf( stderr, "Warning: %s: %s\n", path, strerror( errno ));
114
+		continue;
115
+	    }
116
+	    (void)transcript( path, &st, &type, &afinfo, pdel );
117
+	}
118
+	if ( ferror( stdin )) {
119
+	    perror( "fgets" );
120
+	    exit( 2 );
121
+	}
122
+    } else {
123
+	path_prefix = canonicalized_path( path );
124
+
125
+	/* initialize the transcripts */
126
+	transcript_init( kfile, K_CLIENT );
127
+
128
+	if ( radstat( path_prefix, &st, &type, &afinfo ) != 0 ) {
129
+	    perror( path_prefix );
130
+	    exit( 2 );
131
+	}
132
+
133
+	fs_walk( path_prefix, &st, &type, &afinfo, start, finish, pdel );
134
+    }
135
+
136
+    if ( finish > 0 ) {
137
+	printf( "%%%d\n", ( int )finish );
138
+    }
139
+
140
+    /* free the transcripts */
141
+    transcript_free( );
142
+    hardlink_free( );
143
+}
144
+
145
     int
146
 main( int argc, char **argv ) 
147
 {
148
@@ -258,9 +396,6 @@
149
     int 		c, len, edit_path_change = 0;
150
     int 		errflag = 0, use_outfile = 0;
151
     int			finish = 0;
152
-    struct stat		st;
153
-    char		type, buf[ MAXPATHLEN ];
154
-    struct applefileinfo	afinfo;
155
 
156
     edit_path = CREATABLE;
157
     cksum = 0;
158
@@ -300,7 +435,7 @@
159
 	    break;
160
 
161
 	case '1':
162
-	    skip = 1;
163
+	    skip = T_SKIP_ALL;
164
 	case 'C':
165
 	    edit_path_change++;
166
 	    edit_path = CREATABLE;
167
@@ -347,82 +482,13 @@
168
     }
169
 
170
     if ( errflag || ( argc - optind != 1 )) {
171
-	fprintf( stderr, "usage: %s { -C | -A | -1 } [ -IVW ] ", argv[ 0 ] );
172
+	fprintf( stderr, "usage: %s { -C | -A | -1 } " "[ -IVW ] ", argv[ 0 ] );
173
 	fprintf( stderr, "[ -K command ] " );
174
 	fprintf( stderr, "[ -c checksum ] [ -o file [ -%% ] ] path\n" );
175
 	exit ( 2 );
176
     }
177
 
178
-    path_prefix = argv[ optind ];
179
-    len = strlen( path_prefix );
180
-
181
-    /* Clip trailing '/' */
182
-    if (( len > 1 ) && ( path_prefix[ len - 1 ] == '/' )) {
183
-	path_prefix[ len - 1 ] = '\0';
184
-	len--;
185
-    }
186
-
187
-    /* If path_prefix doesn't contain a directory, canonicalize it by
188
-     * prepending a "./".  This allow paths to be dynamically converted between
189
-     * relative and absolute paths without breaking sort order.
190
-     */
191
-    switch( path_prefix[ 0 ] ) {
192
-    case '/':
193
-        break;
194
-
195
-    case '.':
196
-	/* Don't rewrite '.' or paths starting with './' */
197
-	if (( len == 1 ) || (  path_prefix[ 1 ] == '/' )) {
198
-	    break;
199
-	}
200
-    default:
201
-        if ( snprintf( buf, sizeof( buf ), "./%s",
202
-                path_prefix ) >= MAXPATHLEN ) {
203
-            fprintf( stderr, "path too long\n" );
204
-            exit( 2 );
205
-        }
206
-	path_prefix = buf;
207
-        break;
208
-    }
209
-
210
-    /* Determine if called with relative or absolute pathing.  Path is relative
211
-     * if it's just '.' or starts with './'.  File names that start with a '.'
212
-     * are absolute.
213
-     */
214
-    if ( path_prefix[ 0 ] == '.' ) {
215
-	if ( len == 1 ) {
216
-	    tran_format = T_RELATIVE;
217
-	} else if ( path_prefix[ 1 ] == '/' ) {
218
-	    tran_format = T_RELATIVE;
219
-	} else {
220
-	    tran_format = T_ABSOLUTE;
221
-	}
222
-    } else {
223
-	tran_format = T_ABSOLUTE;
224
-    }
225
-
226
-    if ( radstat( path_prefix, &st, &type, &afinfo ) != 0 ) {
227
-	perror( path_prefix );
228
-	exit( 2 );
229
-    }
230
-
231
-    if (( dotfd = open( ".", O_RDONLY, 0 )) < 0 ) {
232
-	perror( "OOPS!" );
233
-	exit( 2 );
234
-    }
235
-
236
-    /* initialize the transcripts */
237
-    transcript_init( kfile, K_CLIENT );
238
-
239
-    fs_walk( path_prefix, &st, &type, &afinfo, 0, finish, 0 );
240
-
241
-    if ( finish > 0 ) {
242
-	printf( "%%%d\n", ( int )finish );
243
-    }
244
-
245
-    /* free the transcripts */
246
-    transcript_free( );
247
-    hardlink_free( );
248
+    fsdiff( argv[ optind ], kfile, 0, finish, 0 );
249
 
250
     /* close the output file */     
251
     fclose( outtran );
(-)files/patch-ktcheck.c (+20 lines)
Line 0 Link Here
1
--- ./ktcheck.c.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./ktcheck.c	2014-06-29 12:15:04.245544128 +0200
3
@@ -459,7 +459,7 @@
4
 	perror( "Incorrect number of arguments\n" );
5
 	return( 2 );
6
     }
7
-    times.modtime = atoi( targv[ 5 ] );
8
+    times.modtime = strtotimet( targv[ 5 ], NULL, 10 );
9
     times.actime = time( NULL );
10
 
11
     if (( stat( path, &st )) != 0 ) {
12
@@ -506,7 +506,7 @@
13
 		needupdate = 1;
14
 	    }
15
 	} else {
16
-	    if ( atoi( targv[ 5 ] ) != (int)st.st_mtime )  {
17
+	    if ( strtotimet( targv[ 5 ], NULL, 10 ) != st.st_mtime )  {
18
 		needupdate = 1;
19
 	    }
20
 	}
(-)files/patch-lapply.c (-2 / +2 lines)
Lines 1-5 Link Here
1
--- ./lapply.c.orig	2010-12-12 22:42:49.000000000 -0500
1
--- ./lapply.c.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./lapply.c	2012-03-20 14:37:54.000000000 -0400
2
+++ ./lapply.c	2014-06-29 12:15:04.246544121 +0200
3
@@ -651,27 +651,37 @@
3
@@ -651,27 +651,37 @@
4
 filechecklist:
4
 filechecklist:
5
 		if ( head == NULL ) {
5
 		if ( head == NULL ) {
(-)files/patch-largefile.h (+18 lines)
Line 0 Link Here
1
--- ./largefile.h.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./largefile.h	2014-06-29 12:15:04.246544121 +0200
3
@@ -18,3 +18,15 @@
4
 #define strtoofft(x,y,z)	(strtol((x),(y),(z)))
5
 #define PRIofft			"l"
6
 #endif
7
+
8
+#if SIZEOF_TIME_T == 8
9
+    #ifdef HAVE_STRTOLL
10
+    #define strtotimet(x,y,z)	(strtoll((x),(y),(z)))
11
+    #else /* !HAVE_STRTOLL */
12
+    #define strtotimet(x,y,z)	(strtol((x),(y),(z)))
13
+    #endif /* HAVE_STRTOLL */
14
+    #define PRItimet		"ll"
15
+#else /* SIZEOF_TIME_T != 8 */
16
+    #define strtotimet(x,y,z)	(strtol((x),(y),(z)))
17
+    #define PRItimet		"l"
18
+#endif /* SIZEOF_TIME_T */
(-)files/patch-lcksum.c (+35 lines)
Line 0 Link Here
1
--- ./lcksum.c.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./lcksum.c	2014-06-29 12:15:04.247544144 +0200
3
@@ -434,7 +434,7 @@
4
 		/* Check to see if checksum is listed in transcript */
5
 		if ( strcmp( targv[ 7 ], "-" ) != 0) {
6
 		    /* use mtime from server */
7
-		    fprintf( ufs, "%s %-37s %4s %5s %5s %9ld "
8
+		    fprintf( ufs, "%s %-37s %4s %5s %5s %9" PRItimet "d "
9
 			    "%7" PRIofft "d %s\n",
10
 			targv[ 0 ], targv[ 1 ], targv[ 2 ], targv[ 3 ],
11
 			targv[ 4 ], st.st_mtime, st.st_size, lcksum );
12
@@ -457,6 +457,12 @@
13
 	}
14
 	free( line );
15
     }
16
+    if ( fclose( f ) != 0 ) {
17
+	fprintf( stderr, "%s: fclose failed: %s\n", path, strerror( errno ));
18
+	cleanup( updatetran, upath );
19
+	exit( 2 );
20
+    }
21
+
22
     if ( showprogress ) {
23
 	progressupdate( bytes, "" );
24
     }
25
@@ -496,6 +502,10 @@
26
 badline:
27
     exitval = 1;
28
 
29
+    if ( fclose( f ) != 0 ) {
30
+	fprintf( stderr, "%s: fclose failed: %s\n", path, strerror( errno ));
31
+    }
32
+
33
     if ( checkall ) {
34
 	goto done;
35
     } else {
(-)files/patch-man__lcreate.1 (-2 / +2 lines)
Lines 1-5 Link Here
1
--- ./man/lcreate.1.orig	2010-12-12 22:50:53.000000000 -0500
1
--- ./man/lcreate.1.orig	2010-12-13 04:50:53.000000000 +0100
2
+++ ./man/lcreate.1	2012-03-20 14:38:03.000000000 -0400
2
+++ ./man/lcreate.1	2014-06-29 12:15:04.247544144 +0200
3
@@ -45,12 +45,6 @@
3
@@ -45,12 +45,6 @@
4
 .sp
4
 .sp
5
 If the -n option is given, no files or transcripts are uploaded.  Instead,
5
 If the -n option is given, no files or transcripts are uploaded.  Instead,
(-)files/patch-man__rash.1 (-2 / +2 lines)
Lines 1-5 Link Here
1
--- ./man/rash.1.orig	2010-12-12 22:50:53.000000000 -0500
1
--- ./man/rash.1.orig	2010-12-13 04:50:53.000000000 +0100
2
+++ ./man/rash.1	2012-03-20 14:38:08.000000000 -0400
2
+++ ./man/rash.1	2014-06-29 12:15:04.247544144 +0200
3
@@ -11,6 +11,10 @@
3
@@ -11,6 +11,10 @@
4
 |
4
 |
5
 .B -q
5
 .B -q
(-)files/patch-mkdirs.c (-2 / +2 lines)
Lines 1-5 Link Here
1
--- ./mkdirs.c.orig	2010-12-12 22:42:49.000000000 -0500
1
--- ./mkdirs.c.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./mkdirs.c	2012-03-20 14:38:08.000000000 -0400
2
+++ ./mkdirs.c	2014-06-29 12:15:04.247544144 +0200
3
@@ -37,7 +37,9 @@
3
@@ -37,7 +37,9 @@
4
 	if ( mkdir( path, 0777 ) == 0 ) {
4
 	if ( mkdir( path, 0777 ) == 0 ) {
5
 	    break;
5
 	    break;
(-)files/patch-ra.sh (-2 / +2 lines)
Lines 1-5 Link Here
1
--- ./ra.sh.orig	2010-12-12 22:42:49.000000000 -0500
1
--- ./ra.sh.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./ra.sh	2012-03-20 14:38:08.000000000 -0400
2
+++ ./ra.sh	2014-06-29 12:15:04.248542975 +0200
3
@@ -91,7 +91,7 @@
3
@@ -91,7 +91,7 @@
4
 }
4
 }
5
 
5
 
(-)files/patch-t2pkg.c (-2 / +2 lines)
Lines 1-5 Link Here
1
--- ./t2pkg.c.orig	2010-12-12 22:42:49.000000000 -0500
1
--- ./t2pkg.c.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./t2pkg.c	2012-03-20 14:38:08.000000000 -0400
2
+++ ./t2pkg.c	2014-06-29 12:15:04.248542975 +0200
3
@@ -38,6 +38,7 @@
3
@@ -38,6 +38,7 @@
4
 extern off_t	lsize;
4
 extern off_t	lsize;
5
 extern char	*version;
5
 extern char	*version;
(-)files/patch-transcript.c (+133 lines)
Line 0 Link Here
1
--- ./transcript.c.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./transcript.c	2014-06-29 12:15:04.249543651 +0200
3
@@ -45,7 +45,7 @@
4
 
5
 char				*path_prefix = NULL;
6
 int				edit_path;
7
-int				skip;
8
+int				skip = 0;
9
 int				cksum;
10
 int				fs_minus;
11
 int				exclude_warnings = 0;
12
@@ -271,7 +271,7 @@
13
 	tran->t_pinfo.pi_stat.st_mode = strtol( argv[ 2 ], NULL, 8 );
14
 	tran->t_pinfo.pi_stat.st_uid = atoi( argv[ 3 ] );
15
 	tran->t_pinfo.pi_stat.st_gid = atoi( argv[ 4 ] );
16
-	tran->t_pinfo.pi_stat.st_mtime = atoi( argv[ 5 ] );
17
+	tran->t_pinfo.pi_stat.st_mtime = strtotimet( argv[ 5 ], NULL, 10 );
18
 	tran->t_pinfo.pi_stat.st_size = strtoofft( argv[ 6 ], NULL, 10 );
19
 	if ( tran->t_type != T_NEGATIVE ) {
20
 	    if (( cksum ) && ( strcmp( "-", argv [ 7 ] ) == 0  )) {
21
@@ -436,12 +436,13 @@
22
 	 * but the corresponding transcript is negative, hence, retain
23
 	 * the file system's mtime.  Woof!
24
 	 */
25
-	fprintf( outtran, "%c %-37s\t%.4lo %5d %5d %9d %7" PRIofft "d %s\n",
26
+	fprintf( outtran, "%c %-37s\t%.4lo %5d %5d %9" PRItimet "d "
27
+			  "%7" PRIofft "d %s\n",
28
 		cur->pi_type, epath,
29
 		(unsigned long)( T_MODE & cur->pi_stat.st_mode ), 
30
 		(int)cur->pi_stat.st_uid, (int)cur->pi_stat.st_gid,
31
 		( flag == PR_STATUS_NEG ) ?
32
-			(int)fs->pi_stat.st_mtime : (int)cur->pi_stat.st_mtime,
33
+			fs->pi_stat.st_mtime : cur->pi_stat.st_mtime,
34
 		cur->pi_stat.st_size, cur->pi_cksum_b64 );
35
 	break;
36
 
37
@@ -723,7 +724,7 @@
38
 	    if ( begin_tran->t_type != T_SPECIAL &&
39
 		    t_exclude( begin_tran->t_pinfo.pi_name )) {
40
 		if ( exclude_warnings ) {
41
-		    fprintf( stderr, "Warning: excluding %s\n",
42
+		    printf( "#! Warning: excluding %s\n",
43
 				begin_tran->t_pinfo.pi_name );
44
 		}
45
 		transcript_parse( begin_tran );
46
@@ -769,7 +770,7 @@
47
 	    if ( list_size( special_list ) <= 0
48
 		    || list_check( special_list, path ) == 0 ) {
49
 		if ( exclude_warnings ) {
50
-		    fprintf( stderr, "Warning: excluding %s\n", path );
51
+		    printf( "#! Warning: excluding %s\n", path );
52
 		}
53
 
54
 		/* move the transcripts ahead */
55
@@ -949,7 +950,7 @@
56
      */
57
     t_new( T_NULL, NULL, NULL, NULL );
58
 
59
-    if ( skip ) {
60
+    if ( skip == T_SKIP_ALL ) {
61
 	return;
62
     }
63
 
64
@@ -985,15 +986,17 @@
65
 	exit( 2 );
66
     }
67
 
68
-    if (( list_size( special_list ) > 0 ) && ( location == K_CLIENT )) {
69
-	/* open the special transcript if there were any special files */
70
-	if ( strlen( kdir ) + strlen( special ) + 2 > MAXPATHLEN ) {
71
-	    fprintf( stderr, 
72
-		    "special path too long: %s%s\n", kdir, special );
73
-	    exit( 2 );
74
+    if ( !( skip & T_SKIP_SPECIAL )) {
75
+	if (( list_size( special_list ) > 0 ) && ( location == K_CLIENT )) {
76
+	    /* open the special transcript if there were any special files */
77
+	    if ( strlen( kdir ) + strlen( special ) + 2 > MAXPATHLEN ) {
78
+		fprintf( stderr, 
79
+			"special path too long: %s%s\n", kdir, special );
80
+		exit( 2 );
81
+	    }
82
+	    sprintf( fullpath, "%s%s", kdir, special );
83
+	    t_new( T_SPECIAL, fullpath, special, "special" );
84
 	}
85
-	sprintf( fullpath, "%s%s", kdir, special );
86
-	t_new( T_SPECIAL, fullpath, special, "special" );
87
     }
88
 
89
     if ( tran_head->t_type == T_NULL  && edit_path == APPLICABLE ) {
90
@@ -1108,6 +1111,10 @@
91
 	    break;
92
 
93
 	case 'n':				/* negative */
94
+	    if ( skip & T_SKIP_NEGATIVE ) {
95
+		break;
96
+	    }
97
+
98
 	    if ( minus ) { 
99
 		t_remove( T_NEGATIVE, av[ 1 ] );
100
 	    } else {
101
@@ -1116,6 +1123,10 @@
102
 	    break;
103
 
104
 	case 'p':				/* positive */
105
+	    if ( skip & T_SKIP_POSITIVE ) {
106
+		break;
107
+	    }
108
+
109
 	    if ( minus ) {
110
 		t_remove( T_POSITIVE, av[ 1 ] );
111
 	    } else {
112
@@ -1124,6 +1135,10 @@
113
 	    break;
114
 
115
 	case 'x':				/* exclude */
116
+	    if ( skip & T_SKIP_EXCLUDES ) {
117
+		break;
118
+	    }
119
+
120
 	    if (( d_pattern = decode( av[ 1 ] )) == NULL ) {
121
 		fprintf( stderr, "%s: line %d: decode buffer too small\n",
122
 		    kfile, linenum );
123
@@ -1149,6 +1164,10 @@
124
 	    break;
125
 
126
 	case 's':				/* special */
127
+	    if ( skip & T_SKIP_SPECIAL ) {
128
+		break;
129
+	    }
130
+
131
 	    path = av[ 1 ];
132
 
133
 	    /* Convert path to match transcript type */
(-)files/patch-transcript.h (+17 lines)
Line 0 Link Here
1
--- ./transcript.h.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./transcript.h	2014-06-29 12:15:04.249543651 +0200
3
@@ -39,6 +39,14 @@
4
 extern FILE		*outtran;
5
 extern char		*path_prefix;
6
 
7
+
8
+#define T_SKIP_POSITIVE		(1 << 1)
9
+#define T_SKIP_NEGATIVE		(1 << 2)
10
+#define T_SKIP_SPECIAL		(1 << 3)
11
+#define T_SKIP_EXCLUDES		(1 << 4)
12
+#define	T_SKIP_ALL		(T_SKIP_POSITIVE | T_SKIP_NEGATIVE | \
13
+				 T_SKIP_SPECIAL | T_SKIP_EXCLUDES)
14
+
15
 struct pathinfo {
16
     char			pi_type;
17
     int				pi_minus;
(-)files/patch-update.c (+19 lines)
Line 0 Link Here
1
--- ./update.c.orig	2010-12-13 04:42:49.000000000 +0100
2
+++ ./update.c	2014-06-29 12:15:04.249543651 +0200
3
@@ -26,6 +26,7 @@
4
 #include "update.h"
5
 #include "code.h"
6
 #include "radstat.h"
7
+#include "largefile.h"
8
 #include "transcript.h"
9
 #include "progress.h"
10
 #include "mkdirs.h"
11
@@ -73,7 +74,7 @@
12
 
13
 	mode = strtol( targv[ 2 ], (char **)NULL, 8 );
14
 
15
-	times.modtime = atoi( targv[ 5 ] );
16
+	times.modtime = strtotimet( targv[ 5 ], NULL, 10 );
17
 	if ( times.modtime != st->st_mtime ) {
18
 	    times.actime = st->st_atime;
19
 	    if ( utime( path, &times ) != 0 ) {
(-)pkg-descr (-1 / +3 lines)
Lines 3-6 Link Here
3
of hosts at the filesystem level. It can also act as an intelligent
3
of hosts at the filesystem level. It can also act as an intelligent
4
tripwire.
4
tripwire.
5
5
6
WWW:	http://rsug.itd.umich.edu/software/radmind/
6
This port contains security and functionality patches through May 22, 2014.
7
8
WWW: http://sourceforge.net/projects/radmind/
(-)pkg-plist (-18 / +44 lines)
Lines 10-36 Link Here
10
bin/repo
10
bin/repo
11
bin/twhich
11
bin/twhich
12
sbin/radmind
12
sbin/radmind
13
man/man1/fsdiff.1.gz
14
man/man1/ktcheck.1.gz
15
man/man1/lapply.1.gz
16
man/man1/lcksum.1.gz
17
man/man1/lcreate.1.gz
18
man/man1/lfdiff.1.gz
19
man/man1/lmerge.1.gz
20
man/man1/lsort.1.gz
21
man/man1/rash.1.gz
22
man/man1/repo.1.gz
23
man/man1/twhich.1.gz
24
man/man5/applefile.5.gz
25
man/man8/radmind.8.gz
13
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT
26
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT
14
%%PORTDOCS%%%%DOCSDIR%%/README
27
%%PORTDOCS%%%%DOCSDIR%%/README
15
%%PORTDOCS%%%%DOCSDIR%%/SPEC
28
%%PORTDOCS%%%%DOCSDIR%%/SPEC
16
%%PORTDOCS%%@dirrm %%DOCSDIR%%
29
%%PORTDOCS%%@dirrm %%DOCSDIR%%
17
@exec mkdir -p -m 755 %%RADMIND_BASE_DIR%%
30
@cwd /
18
@exec mkdir -p -m 755 %%RADMIND_BASE_DIR%%/cert
19
@exec mkdir -p -m 755 %%RADMIND_BASE_DIR%%/client
20
@exec mkdir -p -m 755 %%RADMIND_BASE_DIR%%/preapply
21
@exec mkdir -p -m 755 %%RADMIND_BASE_DIR%%/postapply
22
@exec chown -R %%RADMINUSER%%:%%RADMINUSER%% %%RADMIND_BASE_DIR%%
23
@unexec if cmp -s %%RADMIND_BASE_DIR%%/config.sample %%RADMIND_BASE_DIR%%/config; then rm -f %%RADMIND_BASE_DIR%%/config; fi
31
@unexec if cmp -s %%RADMIND_BASE_DIR%%/config.sample %%RADMIND_BASE_DIR%%/config; then rm -f %%RADMIND_BASE_DIR%%/config; fi
32
@mode 700
24
%%RADMIND_BASE_DIR%%/config.sample
33
%%RADMIND_BASE_DIR%%/config.sample
25
@dirrmtry %%RADMIND_BASE_DIR%%/transcript
34
@mode
26
@dirrmtry %%RADMIND_BASE_DIR%%/tmp/transcript
35
@owner %%RADMINUSER%%
27
@dirrmtry %%RADMIND_BASE_DIR%%/tmp/file
36
@group %%RADMINUSER%%
28
@dirrmtry %%RADMIND_BASE_DIR%%/tmp
37
@unexec rmdir %D/%%RADMIND_BASE_DIR%%/transcript 2>/dev/null || true
29
@dirrmtry %%RADMIND_BASE_DIR%%/special
38
@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/transcript
30
@dirrmtry %%RADMIND_BASE_DIR%%/postapply
39
@unexec rmdir %D/%%RADMIND_BASE_DIR%%/tmp/transcript 2>/dev/null || true
31
@dirrmtry %%RADMIND_BASE_DIR%%/preapply
40
@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/tmp/transcript
32
@dirrmtry %%RADMIND_BASE_DIR%%/file
41
@unexec rmdir %D/%%RADMIND_BASE_DIR%%/tmp/file 2>/dev/null || true
33
@dirrmtry %%RADMIND_BASE_DIR%%/command
42
@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/tmp/file
34
@dirrmtry %%RADMIND_BASE_DIR%%/client
43
@unexec rmdir %D/%%RADMIND_BASE_DIR%%/tmp 2>/dev/null || true
35
@dirrmtry %%RADMIND_BASE_DIR%%/cert
44
@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/tmp
36
@dirrmtry %%RADMIND_BASE_DIR%%
45
@unexec rmdir %D/%%RADMIND_BASE_DIR%%/special 2>/dev/null || true
46
@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/special
47
@unexec rmdir %D/%%RADMIND_BASE_DIR%%/postapply 2>/dev/null || true
48
@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/postapply
49
@unexec rmdir %D/%%RADMIND_BASE_DIR%%/preapply 2>/dev/null || true
50
@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/preapply
51
@unexec rmdir %D/%%RADMIND_BASE_DIR%%/file 2>/dev/null || true
52
@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/file
53
@unexec rmdir %D/%%RADMIND_BASE_DIR%%/command 2>/dev/null || true
54
@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/command
55
@unexec rmdir %D/%%RADMIND_BASE_DIR%%/client 2>/dev/null || true
56
@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/client
57
@unexec rmdir %D/%%RADMIND_BASE_DIR%%/cert 2>/dev/null || true
58
@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%/cert
59
@unexec rmdir %D/%%RADMIND_BASE_DIR%% 2>/dev/null || true
60
@exec install -d -o %%RADMINUSER%% -g %%RADMINUSER%% %D/%%RADMIND_BASE_DIR%%
61
@owner
62
@group

Return to bug 190120