You can subscribe to this list here.
2006 |
Jan
|
Feb
(52) |
Mar
(83) |
Apr
(37) |
May
(23) |
Jun
(9) |
Jul
(10) |
Aug
(30) |
Sep
(4) |
Oct
(9) |
Nov
(10) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(3) |
Feb
(20) |
Mar
(3) |
Apr
|
May
(10) |
Jun
(17) |
Jul
(11) |
Aug
(6) |
Sep
(6) |
Oct
|
Nov
(15) |
Dec
(15) |
2008 |
Jan
(12) |
Feb
(1) |
Mar
(13) |
Apr
(7) |
May
(4) |
Jun
(37) |
Jul
(9) |
Aug
(7) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2009 |
Jan
(1) |
Feb
(11) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2010 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
|
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
(4) |
Nov
(6) |
Dec
(2) |
2011 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
(3) |
Oct
(3) |
Nov
(6) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Andrew M. <fit...@us...> - 2007-11-12 03:51:42
|
Update of /cvsroot/radmind/radmind/contrib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6650 Added Files: t2pkg.c Log Message: Skeleton code for local installs/pkg creation from a transcript. --- NEW FILE: t2pkg.c --- #include "config.h" #include <sys/types.h> #include <sys/param.h> #include <sys/mount.h> #include <sys/stat.h> #include <errno.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <utime.h> #include <openssl/evp.h> #ifdef __APPLE__ #include <sys/attr.h> #include <sys/paths.h> #endif /* __APPLE */ #ifdef linux #include <sys/vfs.h> #endif /* linux */ #include "applefile.h" #include "base64.h" #include "transcript.h" #include "code.h" #include "mkdirs.h" #include "rmdirs.h" #include "pathcmp.h" #include "progress.h" #include "list.h" extern int errno; extern int showprogress; extern off_t lsize; int cksum = 0; int force = 0; int case_sensitive = 1; const EVP_MD *md; int copy_file( struct transcript *t, char *dst, char *src, int where ); int local_update( struct transcript *t, char *dst, char *src, int where ); off_t fs_available_space( char *dstdir ); int copy_file( struct transcript *t, char *dst, char *src, int where ) { struct stat st; int rfd, wfd, afd = -1, rsrcfd = -1; int type = t->t_pinfo.pi_type; unsigned int md_len; char buf[ 8192 ]; char *trancksum = t->t_pinfo.pi_cksum_b64; char *path = t->t_pinfo.pi_name; ssize_t rr, size = 0; EVP_MD_CTX mdctx; unsigned char md_value[ EVP_MAX_MD_SIZE ]; char cksum_b64[ SZ_BASE64_E( EVP_MAX_MD_SIZE ) ]; #ifdef __APPLE__ extern struct as_header as_header; extern struct attrlist getalist; extern struct attrlist setalist; struct as_header header; struct as_entry as_ents[ 3 ]; struct attr_info ai; char nullbuf[ FINFOLEN ] = { 0 }; char rsrcpath[ MAXPATHLEN ], srcrsrc[ MAXPATHLEN ]; char finfo[ 32 ]; ssize_t rsize; unsigned int rsrc_len; #endif /* __APPLE__ */ if ( cksum ) { if ( strcmp( trancksum, "-" ) == 0 ) { fprintf( stderr, "line %d: no checksum\n", t->t_linenum ); return( -1 ); } EVP_DigestInit( &mdctx, md ); } if (( rfd = open( src, O_RDONLY, 0 )) < 0 ) { perror( src ); return( -1 ); } if (( wfd = open( dst, O_CREAT | O_WRONLY | O_EXCL, 0666 )) < 0 ) { perror( dst ); goto error2; } if ( fstat( rfd, &st ) < 0 ) { perror( src ); goto error2; } #ifdef __APPLE__ if ( snprintf( rsrcpath, MAXPATHLEN, "%s%s", dst, _PATH_RSRCFORKSPEC ) >= MAXPATHLEN ) { fprintf( stderr, "%s%s: path too long.\n", dst, _PATH_RSRCFORKSPEC ); return( -1 ); } if ( where == K_CLIENT && type == 'a' ) { if ( getattrlist( src, &getalist, &ai, sizeof( struct attr_info ), FSOPT_NOFOLLOW ) != 0 ) { fprintf( stderr, "getattrlist %s failed.\n", src ); goto error2; } /* add applefile sizes so size in transcript matches */ st.st_size += ( FINFOLEN + ai.ai_rsrc_len + ( 3 * sizeof( struct as_entry )) + AS_HEADERLEN ); } #endif /* __APPLE__ */ /* check size against transcript */ if ( st.st_size != t->t_pinfo.pi_stat.st_size ) { if ( force ) { fprintf( stderr, "warning: " ); } fprintf( stderr, "line %d: size in transcript does not match size of file.\n", t->t_linenum ); if ( !force ) { goto error2; } } size = st.st_size; #ifdef __APPLE__ if ( where == K_SERVER && type == 'a' ) { /* decode AppleSingle file to filesystem */ /* XXX What if fs isn't HFS+? */ /* read AppleSingle header */ rr = read( rfd, &header, AS_HEADERLEN ); if ( rr < 0 ) { perror( dst ); exit( 2 ); } if ( rr != AS_HEADERLEN || memcmp( &as_header, &header, AS_HEADERLEN ) != 0 ) { fprintf( stderr, "%s: invalid AppleSingle file.\n", src ); goto error2; } if ( cksum ) { EVP_DigestUpdate( &mdctx, ( char * )&header, ( unsigned int )rr ); } size -= rr; if ( showprogress ) { progressupdate( rr, path ); } /* read the entries */ rr = read( rfd, ( char * )&as_ents, ( 3 * sizeof( struct as_entry ))); if ( rr < 0 ) { perror( dst ); goto error2; } if ( rr != ( 3 * sizeof( struct as_entry ))) { fprintf( stderr, "%s: invalid AppleSingle file.\n", src ); goto error2; } /* endian handling, swap header entries if necessary */ rsrc_len = as_ents[ AS_RFE ].ae_length; as_entry_netswap( &as_ents[ AS_FIE ] ); as_entry_netswap( &as_ents[ AS_RFE ] ); as_entry_netswap( &as_ents[ AS_DFE ] ); if ( cksum ) { EVP_DigestUpdate( &mdctx, ( char * )&as_ents, ( unsigned int )rr ); } size -= rr; if ( showprogress ) { progressupdate( rr, path ); } if ( as_ents[ AS_FIE ].ae_id != ASEID_FINFO || as_ents[ AS_RFE ].ae_id != ASEID_RFORK || as_ents[ AS_DFE ].ae_id != ASEID_DFORK ) { fprintf( stderr, "%s: invalid AppleSingle file.\n", src ); goto error2; } if (( rr = read( rfd, finfo, FINFOLEN )) < 0 ) { perror( dst ); goto error2; } if ( rr != FINFOLEN ) { fprintf( stderr, "%s: invalid AppleSingle file.\n", src ); goto error2; } if ( cksum ) { EVP_DigestUpdate( &mdctx, finfo, ( unsigned int )rr ); } if ( showprogress ) { progressupdate( rr, path ); } /* finder info */ if ( memcmp( finfo, nullbuf, FINFOLEN ) != 0 ) { if ( setattrlist( dst, &setalist, finfo, FINFOLEN, FSOPT_NOFOLLOW ) != 0 ) { fprintf( stderr, "setattrlist %s failed.\n", dst ); goto error2; } } size -= rr; /* read and write rsrc fork from AppleSingle */ if (( rsrcfd = open( rsrcpath, O_WRONLY, 0 )) < 0 ) { perror( rsrcpath ); goto error2; } for ( rsize = as_ents[ AS_RFE ].ae_length; rsize > 0; rsize -= rr ) { if (( rr = read( rfd, buf, MIN( sizeof( buf ), rsize ))) <= 0 ) { fprintf( stderr, "%s: corrupt AppleSingle file.\n", dst ); goto error2; } if ( write( rsrcfd, buf, rr ) != rr ) { perror( rsrcpath ); goto error2; } if ( cksum ) { EVP_DigestUpdate( &mdctx, buf, ( unsigned int )rr ); } if ( showprogress ) { progressupdate( rr, path ); } } size -= as_ents[ AS_RFE ].ae_length; if ( close( rsrcfd ) < 0 ) { perror( dst ); goto error2; } } else if ( where == K_CLIENT && type == 'a' ) { /* * We have to fake the checksum here, since we're copying * from the client. Add the AppleSingle header and faked * entries to the checksum digest. */ if ( cksum ) { EVP_DigestUpdate( &mdctx, &as_header, AS_HEADERLEN ); as_ents[AS_FIE].ae_id = ASEID_FINFO; as_ents[AS_FIE].ae_offset = AS_HEADERLEN + ( 3 * sizeof( struct as_entry )); as_ents[AS_FIE].ae_length = FINFOLEN; as_ents[AS_RFE].ae_id = ASEID_RFORK; as_ents[AS_RFE].ae_offset = ( as_ents[AS_FIE].ae_offset + as_ents[AS_FIE].ae_length ); as_ents[AS_RFE].ae_length = ai.ai_rsrc_len; as_ents[AS_DFE].ae_id = ASEID_DFORK; as_ents[AS_DFE].ae_offset = ( as_ents[AS_RFE].ae_offset + as_ents[AS_RFE].ae_length ); as_ents[AS_DFE].ae_length = ( st.st_size - ( AS_HEADERLEN + ( 3 * sizeof( struct as_entry )) + FINFOLEN + ai.ai_rsrc_len )); /* endian handling, swap header entries if necessary */ rsrc_len = as_ents[ AS_RFE ].ae_length; as_entry_netswap( &as_ents[ AS_FIE ] ); as_entry_netswap( &as_ents[ AS_RFE ] ); as_entry_netswap( &as_ents[ AS_DFE ] ); EVP_DigestUpdate( &mdctx, ( char * )&as_ents, ( 3 * sizeof( struct as_entry ))); } size -= ( AS_HEADERLEN + ( 3 * sizeof( struct as_entry )) + FINFOLEN ); if ( showprogress ) { progressupdate(( AS_HEADERLEN + FINFOLEN + ( 3 * sizeof( struct as_entry ))), path ); } /* finder info */ if ( memcmp( ai.ai_data, nullbuf, FINFOLEN ) != 0 ) { if ( setattrlist( dst, &setalist, ai.ai_data, FINFOLEN, FSOPT_NOFOLLOW ) != 0 ) { fprintf( stderr, "setattrlist %s failed.\n", dst ); goto error1; } } if ( cksum ) { EVP_DigestUpdate( &mdctx, ai.ai_data, FINFOLEN ); } /* read and write the finder info and rsrc fork from the system */ if ( ai.ai_rsrc_len > 0 ) { if ( snprintf( srcrsrc, MAXPATHLEN, "%s%s", src, _PATH_RSRCFORKSPEC ) >= MAXPATHLEN ) { fprintf( stderr, "%s%s: path too long\n", dst, _PATH_RSRCFORKSPEC ); return( -1 ); } if (( afd = open( srcrsrc, O_RDONLY, 0 )) < 0 ) { perror( srcrsrc ); return( -1 ); } if (( rsrcfd = open( rsrcpath, O_WRONLY, 0 )) < 0 ) { perror( rsrcpath ); goto error2; } while (( rr = read( afd, buf, sizeof( buf ))) > 0 ) { if ( write( rsrcfd, buf, rr ) != rr ) { perror( rsrcpath ); goto error2; } if ( cksum ) { EVP_DigestUpdate( &mdctx, buf, rr ); } size -= rr; if ( showprogress ) { progressupdate( rr, path ); } } if ( rr < 0 ) { perror( srcrsrc ); goto error2; } if ( close( afd ) < 0 ) { perror( srcrsrc ); goto error2; } if ( close( rsrcfd ) < 0 ) { perror( rsrcpath ); goto error1; } } } #else /* __APPLE__ */ if ( type == 'a' ) { fprintf( stderr, "decode applefile %s invalid\n", path ); goto error2; } #endif /* __APPLE */ /* write the data fork */ while (( rr = read( rfd, buf, sizeof( buf ))) > 0 ) { if ( write( wfd, buf, rr ) != rr ) { perror( "write" ); goto error2; } if ( cksum ) { EVP_DigestUpdate( &mdctx, buf, rr ); } size -= rr; if ( showprogress ) { progressupdate( rr, path ); } } if ( rr < 0 ) { perror( dst ); exit( 2 ); } if ( close( rfd ) < 0 ) { perror( dst ); goto error2; } if ( close( wfd ) < 0 ) { perror( dst ); goto error1; } if ( size != 0 ) { fprintf( stderr, "line %d: copied wrong number of bytes.\n", t->t_linenum ); fprintf( stderr, "FILE %s\n", path ); goto error1; } if ( cksum ) { EVP_DigestFinal( &mdctx, md_value, &md_len ); base64_e( md_value, md_len, ( char * )cksum_b64 ); if ( strcmp( trancksum, cksum_b64 ) != 0 ) { if ( force ) { fprintf( stderr, "warning: " ); } fprintf( stderr, "line %d: checksum mismatch\n", t->t_linenum ); if ( !force ) { goto error1; } } } return( 0 ); error2: close( rfd ); close( wfd ); if ( afd >= 0 ) { close( afd ); } if ( rsrcfd >= 0 ) { close( rsrcfd ); } error1: return( -1 ); } int local_update( struct transcript *t, char *dst, char *src, int where ) { int type = t->t_pinfo.pi_type; mode_t mode; uid_t owner; gid_t group; struct utimbuf times; #ifdef __APPLE__ extern struct attrlist setalist; static char nullbuf[ FINFOLEN ] = { 0 }; #endif /* __APPLE__ */ switch ( type ) { case 'a': case 'f': if ( copy_file( t, dst, src, where ) != 0 ) { return( 1 ); } break; case 'd': mode = t->t_pinfo.pi_stat.st_mode; if ( mkdir( dst, mode ) < 0 ) { if ( errno != EEXIST ) { perror( dst ); return( 1 ); } } #ifdef __APPLE__ /* set finder info, if necessary */ if ( memcmp( t->t_pinfo.pi_afinfo.ai.ai_data, nullbuf, FINFOLEN ) != 0 ) { if ( setattrlist( dst, &setalist, t->t_pinfo.pi_afinfo.ai.ai_data, FINFOLEN, FSOPT_NOFOLLOW ) != 0 ) { fprintf( stderr, "setattrlist for %s failed.\n", dst ); return( 1 ); } } #endif /* __APPLE__ */ break; case 'h': if ( link( t->t_pinfo.pi_link, dst ) != 0 ) { perror( dst ); return( 1 ); } goto done; case 'l': if ( symlink( t->t_pinfo.pi_link, dst ) != 0 ) { perror( dst ); return( 1 ); } goto done; case 'p': mode = t->t_pinfo.pi_stat.st_mode | S_IFIFO; if ( mkfifo( dst, mode ) != 0 ) { perror( dst ); return( 1 ); } break; case 'b': case 'c': mode = t->t_pinfo.pi_stat.st_mode; if ( type == 'b' ) { mode |= S_IFBLK; } else { mode |= S_IFCHR; } if ( mknod( dst, mode, t->t_pinfo.pi_stat.st_rdev ) != 0 ) { perror( dst ); return( 1 ); } break; case 'D': /* can't actually do anything with these */ case 's': fprintf( stderr, "Warning: line %d: %c %s not created...continuing\n", t->t_linenum, type, dst ); goto done; default: fprintf( stderr, "%c: unknown object type\n", type ); return( 1 ); } owner = t->t_pinfo.pi_stat.st_uid; group = t->t_pinfo.pi_stat.st_gid; if ( chown( dst, owner, group ) != 0 ) { perror( dst ); return( 1 ); } mode = ( T_MODE & t->t_pinfo.pi_stat.st_mode ); if ( chmod( dst, mode ) != 0 ) { perror( dst ); return( 1 ); } if ( type == 'a' || type == 'f' ) { times.modtime = t->t_pinfo.pi_stat.st_mtime; times.actime = t->t_pinfo.pi_stat.st_mtime; if ( utime( dst, × ) != 0 ) { perror( dst ); return( 1 ); } } done: return( 0 ); } off_t fs_available_space( char *dstdir ) { struct statfs s; off_t block_size, free_blocks; if ( statfs( dstdir, &s ) != 0 ) { fprintf( stderr, "statfs %s: %s\n", dstdir, strerror( errno )); return( -1 ); } block_size = s.f_bsize; free_blocks = s.f_bfree; return( block_size * free_blocks ); } int main( int ac, char *av[] ) { extern char *optarg; extern int optind; struct transcript *t; struct stat st; char *transcript; char shortname[ MAXPATHLEN ], fullpath[ MAXPATHLEN ]; char tmp[ MAXPATHLEN ], src[ MAXPATHLEN ], dst[ MAXPATHLEN ]; char root[ MAXPATHLEN ] = "/"; char *kfile = "/dev/null"; char *p, *dstdir = NULL; char *radmind_path = _RADMIND_PATH; int c, err = 0; int where = K_CLIENT; off_t space; FILE *f; while (( c = getopt( ac, av, "%c:D:d:FIr:s" )) != EOF ) { switch ( c ) { case '%': /* % done progress */ showprogress = 1; break; case 'c': /* cksum */ OpenSSL_add_all_digests(); md = EVP_get_digestbyname( optarg ); if ( !md ) { fprintf( stderr, "%s: unsupported checksum\n", optarg ); exit( 2 ); } cksum = 1; break; case 'D': /* radmind directory */ radmind_path = optarg; break; case 'd': /* where to copy files */ dstdir = optarg; break; case 'F': /* force if size or checksum mismatch */ force = 1; break; case 'I': /* case-insensitive transcripts */ case_sensitive = 0; break; case 'r': /* root path */ if ( strlen( optarg ) >= MAXPATHLEN ) { fprintf( stderr, "%s: path too long\n", optarg ); exit( 2 ); } strcpy( root, optarg ); if ( stat( root, &st ) < 0 ) { perror( root ); exit( 2 ); } break; case 's': /* running on server */ where = K_SERVER; break; default: err++; break; } } if ( err || dstdir == NULL || ( ac - optind != 1 )) { fprintf( stderr, "Usage: %s { -d dstdir } [ -Fs ] [ -c cksum ] " "[ -D radmind_path ] [ -r root_path ] " "transcript.T\n", av[ 0 ] ); exit( 1 ); } transcript = av[ optind ]; if ( realpath( transcript, fullpath ) == NULL ) { fprintf( stderr, "realpath %s: %s\n", transcript, strerror( errno )); exit( 2 ); } if (( p = strrchr( transcript, '/' )) == NULL ) { if ( strlen( transcript ) >= MAXPATHLEN ) { fprintf( stderr, "%s: path too long\n", transcript ); exit( 2 ); } strcpy( shortname, transcript ); } else { p++; if ( strlen( p ) >= MAXPATHLEN ) { fprintf( stderr, "%s: path too long\n", p ); exit( 2 ); } strcpy( shortname, p ); } if ( mkdirs( dstdir ) < 0 ) { fprintf( stderr, "mkdirs %s: %s\n", dstdir, strerror( errno )); exit( 2 ); } if ( stat( root, &st ) != 0 ) { fprintf( stderr, "stat %s: %s\n", root, strerror( errno )); exit( 2 ); } if ( mkdir( dstdir, 0777 ) != 0 ) { if ( errno != EEXIST ) { perror( dstdir ); exit( 2 ); } } if ( chmod( dstdir, st.st_mode ) != 0 ) { perror( "chmod" ); exit( 2 ); } if ( chown( dstdir, st.st_uid, st.st_gid ) != 0 ) { perror( "chown" ); exit( 2 ); } /* make sure we've got enough space for copying */ if (( f = fopen( transcript, "r" )) == NULL ) { perror( transcript ); exit( 2 ); } lsize = loadsetsize( f ); if ( fclose( f ) != 0 ) { fprintf( stderr, "fclose %s: %s", transcript, strerror( errno )); exit( 2 ); } if (( space = fs_available_space( dstdir )) < 0 ) { exit( 2 ); } if ( lsize >= space ) { fprintf( stderr, "%s: insufficient disk space for %s.\n", dstdir, shortname ); exit( 1 ); } if ( where == K_SERVER ) { if ( snprintf( root, MAXPATHLEN, "%s/file/%s", radmind_path, shortname ) >= MAXPATHLEN ) { fprintf( stderr, "%s/file/%s: path too long\n", radmind_path, shortname ); exit( 2 ); } } outtran = stdout; edit_path = CREATABLE; transcript_init( kfile, where ); t_new( T_POSITIVE, fullpath, shortname, kfile ); for ( ;; ) { t = transcript_select(); if ( t->t_eof ) { break; } /* create the destination path */ if ( snprintf( tmp, MAXPATHLEN, "%s/%s", dstdir, t->t_pinfo.pi_name ) >= MAXPATHLEN ) { fprintf( stderr, "%s/%s: path too long\n", dstdir, t->t_pinfo.pi_name ); exit( 2 ); } if ( mkdirs( tmp ) < 0 ) { fprintf( stderr, "mkdirs %s: %s\n", tmp, strerror( errno )); } if ( realpath( tmp, dst ) == NULL ) { fprintf( stderr, "realpath %s: %s\n", tmp, strerror( errno )); exit( 2 ); } /* and the source path */ if ( snprintf( tmp, MAXPATHLEN, "%s/%s", root, t->t_pinfo.pi_name ) >= MAXPATHLEN ) { fprintf( stderr, "%s/%s: path too long\n", dstdir, t->t_pinfo.pi_name ); exit( 2 ); } if ( realpath( tmp, src ) == NULL ) { fprintf( stderr, "realpath %s: %s\n", tmp, strerror( errno )); exit( 2 ); } if ( local_update( t, dst, src, where ) != 0 ) { /* XXX is this really a good idea? */ if ( rmdirs( dstdir ) != 0 ) { fprintf( stderr, "rmdirs failed, delete %s manually.\n", dstdir ); exit( 2 ); } } transcript_parse( t ); } transcript_free(); return( 0 ); } |
From: Andrew M. <fit...@us...> - 2007-11-10 22:47:06
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18765 Modified Files: twhich.c Log Message: Clip trailing slashes like fsdiff. Index: twhich.c =================================================================== RCS file: /cvsroot/radmind/radmind/twhich.c,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** twhich.c 3 Nov 2007 15:25:45 -0000 1.43 --- twhich.c 10 Nov 2007 22:47:00 -0000 1.44 *************** *** 140,144 **** main( int argc, char **argv ) { ! int c, err = 0, defaultkfile = 1, rc = 0; int server = 0, displayall = 0, recursive = 0; extern char *version; --- 140,144 ---- main( int argc, char **argv ) { ! int c, err = 0, defaultkfile = 1, rc = 0, len; int server = 0, displayall = 0, recursive = 0; extern char *version; *************** *** 184,187 **** --- 184,188 ---- pattern = argv[ argc - 1 ]; + len = strlen( pattern ); if ( server && defaultkfile ) { *************** *** 197,200 **** --- 198,206 ---- } + /* clip trailing slash */ + if ( len > 1 && pattern[ len - 1 ] == '/' ) { + pattern[ len - 1 ] = '\0'; + } + /* initialize the transcripts */ edit_path = APPLICABLE; |
From: Andrew M. <fit...@us...> - 2007-11-06 03:24:36
|
Update of /cvsroot/radmind/radmind/contrib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1459/contrib Log Message: Directory /cvsroot/radmind/radmind/contrib added to the repository |
From: Andrew M. <fit...@us...> - 2007-11-03 15:25:52
|
Update of /cvsroot/radmind/radmind/man In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23190/man Modified Files: fsdiff.1 Log Message: Merged radmind-1-10-0-exclude-branch. Index: fsdiff.1 =================================================================== RCS file: /cvsroot/radmind/radmind/man/fsdiff.1,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** fsdiff.1 5 Jul 2007 19:38:59 -0000 1.13 --- fsdiff.1 3 Nov 2007 15:25:45 -0000 1.14 *************** *** 12,16 **** .B -1 } [ ! .BI -IV ] [ .BI \-K\ command --- 12,16 ---- .B -1 } [ ! .BI -IVW ] [ .BI \-K\ command *************** *** 180,185 **** .sp .br ! Type is 'k' for command file, 'p' for positive, 'n' for negative and 's' ! for special. The argument path is either a command file name, transcript name, or in the case of type special, a full pathname. --- 180,185 ---- .sp .br ! Type is 'k' for command file, 'p' for positive, 'n' for negative, 's' ! for special and 'x' for an exclude pattern. The argument path is either a command file name, transcript name, or in the case of type special, a full pathname. *************** *** 198,204 **** .br s /etc/fstab .sp Lines beginning with "#" are comments, and are skipped. A comment must ! be on a line by itself. Blank lines are also skipped. .sp If there is no command file, the transcript used is the null transcript. --- 198,210 ---- .br s /etc/fstab + .br + x /etc/tsm*.pid .sp Lines beginning with "#" are comments, and are skipped. A comment must ! be on a line by itself. Blank lines are also skipped. Exclude lines are ! wildcard patterns (see radmind(8) DESCRIPTION) of paths that will be ! ignored completely, that is, fsdiff will not care if an object matching ! an exclude line is present or absent, and will not print out anything ! relating to it. .sp If there is no command file, the transcript used is the null transcript. *************** *** 300,303 **** --- 306,313 ---- a list of supported checksumming algorithms in descending order of preference and then exits. + .TP 19 + .B \-W + prints a warning to the standard error when encountering an object + matching an exclude pattern. .sp .SH FILES |
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23190 Modified Files: Makefile.in command.c fsdiff.c ktcheck.c lfdiff.c list.h transcript.c transcript.h twhich.c Log Message: Merged radmind-1-10-0-exclude-branch. Index: transcript.h =================================================================== RCS file: /cvsroot/radmind/radmind/transcript.h,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** transcript.h 30 May 2007 18:11:49 -0000 1.41 --- transcript.h 3 Nov 2007 15:25:45 -0000 1.42 *************** *** 10,14 **** #define T_NEGATIVE 2 #define T_SPECIAL 3 - #define T_EXCLUDE 4 #define T_MOVE_TRAN 1 --- 10,13 ---- *************** *** 34,37 **** --- 33,37 ---- extern int skip; extern int cksum; + extern int fs_minus; extern FILE *outtran; extern char *path_prefix; *************** *** 61,69 **** }; ! int transcript( char *, struct stat *, char *, struct applefileinfo * ); void transcript_init( char *kfile, int location ); struct transcript *transcript_select( void ); void transcript_parse( struct transcript * ); void transcript_free( void ); void t_print( struct pathinfo *, struct transcript *, int ); char *hardlink( struct pathinfo * ); --- 61,70 ---- }; ! int transcript( char *, struct stat *, char *, struct applefileinfo *, int ); void transcript_init( char *kfile, int location ); struct transcript *transcript_select( void ); void transcript_parse( struct transcript * ); void transcript_free( void ); + int t_exclude( char *path ); void t_print( struct pathinfo *, struct transcript *, int ); char *hardlink( struct pathinfo * ); Index: Makefile.in =================================================================== RCS file: /cvsroot/radmind/radmind/Makefile.in,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -d -r1.106 -r1.107 *** Makefile.in 31 Jul 2007 14:15:21 -0000 1.106 --- Makefile.in 3 Nov 2007 15:25:45 -0000 1.107 *************** *** 59,63 **** FSDIFF_OBJ= version.o fsdiff.o argcargv.o transcript.o llist.o code.o \ hardlink.o cksum.o base64.o pathcmp.o radstat.o applefile.o \ ! list.o KTCHECK_OBJ= version.o ktcheck.o argcargv.o retr.o base64.o code.o \ --- 59,63 ---- FSDIFF_OBJ= version.o fsdiff.o argcargv.o transcript.o llist.o code.o \ hardlink.o cksum.o base64.o pathcmp.o radstat.o applefile.o \ ! list.o wildcard.o KTCHECK_OBJ= version.o ktcheck.o argcargv.o retr.o base64.o code.o \ *************** *** 80,84 **** LFDIFF_OBJ= version.o lfdiff.o argcargv.o connect.o retr.o cksum.o \ progress.o base64.o applefile.o code.o tls.o pathcmp.o \ ! transcript.o list.o radstat.o hardlink.o mkprefix.o REPO_OBJ= version.o repo.o report.o argcargv.o connect.o code.o tls.o --- 80,84 ---- LFDIFF_OBJ= version.o lfdiff.o argcargv.o connect.o retr.o cksum.o \ progress.o base64.o applefile.o code.o tls.o pathcmp.o \ ! transcript.o list.o radstat.o hardlink.o mkprefix.o wildcard.o REPO_OBJ= version.o repo.o report.o argcargv.o connect.o code.o tls.o *************** *** 86,90 **** TWHICH_OBJ= version.o twhich.o argcargv.o transcript.o llist.o code.o \ hardlink.o cksum.o base64.o pathcmp.o radstat.o applefile.o \ ! list.o LSORT_OBJ= version.o lsort.o pathcmp.o code.o argcargv.o --- 86,90 ---- TWHICH_OBJ= version.o twhich.o argcargv.o transcript.o llist.o code.o \ hardlink.o cksum.o base64.o pathcmp.o radstat.o applefile.o \ ! list.o wildcard.o LSORT_OBJ= version.o lsort.o pathcmp.o code.o argcargv.o Index: twhich.c =================================================================== RCS file: /cvsroot/radmind/radmind/twhich.c,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** twhich.c 14 Apr 2006 21:17:13 -0000 1.42 --- twhich.c 3 Nov 2007 15:25:45 -0000 1.43 *************** *** 19,22 **** --- 19,23 ---- #include "pathcmp.h" #include "list.h" + #include "wildcard.h" const EVP_MD *md; *************** *** 38,41 **** --- 39,43 ---- extern struct transcript *tran_head; extern struct list *special_list; + extern struct list *exclude_list; int cmp = 0, match = 0; *************** *** 56,59 **** --- 58,76 ---- } + /* check exclude list */ + if ( exclude_list->l_count > 0 ) { + for ( node = list_pop_head( exclude_list ); node != NULL; + node = list_pop_head( exclude_list )) { + if ( wildcard( node->n_path, pattern, case_sensitive )) { + printf( "# Exclude\n" ); + printf( "# exclude pattern: %s\n", node->n_path ); + if ( !displayall ) { + goto done; + } + } + free( node ); + } + } + for ( tran = tran_head; tran->t_next != NULL; tran = tran->t_next ) { Index: transcript.c =================================================================== RCS file: /cvsroot/radmind/radmind/transcript.c,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -d -r1.120 -r1.121 *** transcript.c 31 Aug 2007 15:28:54 -0000 1.120 --- transcript.c 3 Nov 2007 15:25:45 -0000 1.121 *************** *** 27,30 **** --- 27,31 ---- #include "largefile.h" #include "list.h" + #include "wildcard.h" int read_kfile( char *kfile, int location ); *************** *** 40,43 **** --- 41,45 ---- static struct list *kfile_list; struct list *special_list; + struct list *exclude_list; char *path_prefix = NULL; *************** *** 45,48 **** --- 47,52 ---- int skip; int cksum; + int fs_minus; + int exclude_warnings = 0; FILE *outtran; *************** *** 255,258 **** --- 259,264 ---- if ( print_minus ) { + /* set fs_minus so we can handle excluded files in dirs to be deleted */ + fs_minus = 1; fprintf( outtran, "- " ); } *************** *** 549,552 **** --- 555,574 ---- } + int + t_exclude( char *path ) + { + struct node *cur; + + if ( list_size( exclude_list ) > 0 ) { + for ( cur = exclude_list->l_head; cur != NULL; cur = cur->n_next ) { + if ( wildcard( cur->n_path, path, case_sensitive )) { + return( 1 ); + } + } + } + + return( 0 ); + } + /* * Loop through the list of transcripts and compare each *************** *** 610,614 **** int ! transcript( char *path, struct stat *st, char *type, struct applefileinfo *afinfo ) { struct pathinfo pi; --- 632,637 ---- int ! transcript( char *path, struct stat *st, char *type, ! struct applefileinfo *afinfo, int parent_minus ) { struct pathinfo pi; *************** *** 619,622 **** --- 642,647 ---- struct transcript *tran = NULL; + fs_minus = 0; + /* * path is NULL when we've been called after the filesystem has been *************** *** 624,627 **** --- 649,671 ---- */ if ( path != NULL ) { + /* + * check for exclude match first to avoid any unnecessary work. + * special files still have highest precedence. + */ + if ( t_exclude( path ) && !parent_minus ) { + if ( list_size( special_list ) <= 0 + || list_check( special_list, path ) == 0 ) { + if ( exclude_warnings ) { + fprintf( stderr, "Warning: excluding %s\n", path ); + } + + /* move the transcripts ahead */ + tran = transcript_select(); + transcript_parse( tran ); + + return( 0 ); + } + } + strcpy( pi.pi_name, path ); pi.pi_stat = *st; *************** *** 711,718 **** break; - case T_EXCLUDE : - /* read the whole file, keep a list of possibly wild pathnames */ - break; - default : break; --- 755,758 ---- *************** *** 826,829 **** --- 866,873 ---- exit( 2 ); } + if (( exclude_list = list_new()) == NULL ) { + perror( "list_new" ); + exit( 2 ); + } if ( read_kfile( kfile, location ) != 0 ) { exit( 2 ); *************** *** 969,975 **** case 'x': /* exclude */ if ( minus ) { ! t_remove( T_EXCLUDE, av[ 1 ] ); } else { ! t_new( T_EXCLUDE, fullpath, av[ 1 ], kfile ); } break; --- 1013,1024 ---- case 'x': /* exclude */ if ( minus ) { ! list_remove( exclude_list, av[ 1 ] ); } else { ! if ( !list_check( exclude_list, av[ 1 ] )) { ! if ( list_insert( exclude_list, av[ 1 ] ) != 0 ) { ! perror( "list_insert" ); ! return( -1 ); ! } ! } } break; *************** *** 1015,1019 **** * filesystem to compare against. */ ! transcript( NULL, NULL, NULL, NULL ); while ( tran_head != NULL ) { --- 1064,1068 ---- * filesystem to compare against. */ ! transcript( NULL, NULL, NULL, NULL, 0 ); while ( tran_head != NULL ) { Index: list.h =================================================================== RCS file: /cvsroot/radmind/radmind/list.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** list.h 29 May 2007 23:17:48 -0000 1.6 --- list.h 3 Nov 2007 15:25:45 -0000 1.7 *************** *** 18,22 **** }; ! #define list_size( list ) ((list)->l_count) struct list * list_new( void ); --- 18,22 ---- }; ! #define list_size( list ) ((list) ? (list)->l_count : 0 ) struct list * list_new( void ); Index: command.c =================================================================== RCS file: /cvsroot/radmind/radmind/command.c,v retrieving revision 1.138 retrieving revision 1.139 diff -C2 -d -r1.138 -r1.139 *** command.c 30 May 2007 18:11:49 -0000 1.138 --- command.c 3 Nov 2007 15:25:45 -0000 1.139 *************** *** 1403,1406 **** --- 1403,1407 ---- case 's': + case 'x': break; Index: fsdiff.c =================================================================== RCS file: /cvsroot/radmind/radmind/fsdiff.c,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** fsdiff.c 6 May 2006 22:13:18 -0000 1.78 --- fsdiff.c 3 Nov 2007 15:25:45 -0000 1.79 *************** *** 28,36 **** void fs_walk( char *, struct stat *, char *, struct applefileinfo *, ! int, int ); int dodots = 0; int dotfd; int lastpercent = -1; int case_sensitive = 1; const EVP_MD *md; --- 28,37 ---- void fs_walk( char *, struct stat *, char *, struct applefileinfo *, ! int, int, int ); int dodots = 0; int dotfd; int lastpercent = -1; int case_sensitive = 1; + extern int exclude_warnings; const EVP_MD *md; *************** *** 80,84 **** void fs_walk( char *path, struct stat *st, char *type, struct applefileinfo *afinfo, ! int start, int finish ) { DIR *dir; --- 81,85 ---- void fs_walk( char *path, struct stat *st, char *type, struct applefileinfo *afinfo, ! int start, int finish, int pdel ) { DIR *dir; *************** *** 87,90 **** --- 88,92 ---- int len; int count = 0; + int del_parent; float chunk, f = start; char temp[ MAXPATHLEN ]; *************** *** 99,103 **** /* call the transcript code */ ! switch ( transcript( path, st, type, afinfo )) { case 2 : /* negative directory */ for (;;) { --- 101,105 ---- /* call the transcript code */ ! switch ( transcript( path, st, type, afinfo, pdel )) { case 2 : /* negative directory */ for (;;) { *************** *** 126,130 **** } ! fs_walk( temp, &st0, &type0, &afinfo0, start, finish ); } else { return; --- 128,132 ---- } ! fs_walk( temp, &st0, &type0, &afinfo0, start, finish, pdel ); } else { return; *************** *** 144,147 **** --- 146,161 ---- } + /* + * store whether object is to be deleted. if we get here, object + * is a directory, which should mean that if fs_minus == 1 all + * child objects should be removed as well. tracking this allows + * us to zap excluded objects whose parent dir will be deleted. + * + * del_parent is passed into subsequent fs_walk and transcript + * calls, where * it's checked when considering whether to + * exclude an object. + */ + del_parent = fs_minus; + if ( case_sensitive ) { cmp = strcmp; *************** *** 223,227 **** fs_walk( temp, &cur->fl_stat, &cur->fl_type, &cur->fl_afinfo, ! (int)f, (int)( f + chunk )); f += chunk; --- 237,241 ---- fs_walk( temp, &cur->fl_stat, &cur->fl_type, &cur->fl_afinfo, ! (int)f, (int)( f + chunk ), del_parent ); f += chunk; *************** *** 252,256 **** outtran = stdout; ! while (( c = getopt( argc, argv, "%1ACc:IK:o:Vv" )) != EOF ) { switch( c ) { case '%': --- 266,270 ---- outtran = stdout; ! while (( c = getopt( argc, argv, "%1ACc:IK:o:VvW" )) != EOF ) { switch( c ) { case '%': *************** *** 302,305 **** --- 316,323 ---- exit( 0 ); + case 'W': /* print a warning when excluding an object */ + exclude_warnings = 1; + break; + case '?': printf( "bad %c\n", c ); *************** *** 329,333 **** if ( errflag || ( argc - optind != 1 )) { ! fprintf( stderr, "usage: %s { -C | -A | -1 } [ -IV ] ", argv[ 0 ] ); fprintf( stderr, "[ -K command ] " ); fprintf( stderr, "[ -c checksum ] [ -o file [ -%% ] ] path\n" ); --- 347,351 ---- if ( errflag || ( argc - optind != 1 )) { ! fprintf( stderr, "usage: %s { -C | -A | -1 } [ -IVW ] ", argv[ 0 ] ); fprintf( stderr, "[ -K command ] " ); fprintf( stderr, "[ -c checksum ] [ -o file [ -%% ] ] path\n" ); *************** *** 355,359 **** transcript_init( kfile, K_CLIENT ); ! fs_walk( path_prefix, &st, &type, &afinfo, 0, finish ); if ( finish > 0 ) { --- 373,377 ---- transcript_init( kfile, K_CLIENT ); ! fs_walk( path_prefix, &st, &type, &afinfo, 0, finish, 0 ); if ( finish > 0 ) { Index: ktcheck.c =================================================================== RCS file: /cvsroot/radmind/radmind/ktcheck.c,v retrieving revision 1.125 retrieving revision 1.126 diff -C2 -d -r1.125 -r1.126 *** ktcheck.c 31 Jul 2007 02:55:36 -0000 1.125 --- ktcheck.c 3 Nov 2007 15:25:45 -0000 1.126 *************** *** 1022,1025 **** --- 1022,1029 ---- } break; + + case 'x': + /* exclude patterns have no associated transcript */ + break; } } Index: lfdiff.c =================================================================== RCS file: /cvsroot/radmind/radmind/lfdiff.c,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** lfdiff.c 31 Jul 2007 02:55:36 -0000 1.61 --- lfdiff.c 3 Nov 2007 15:25:45 -0000 1.62 *************** *** 38,41 **** --- 38,42 ---- #include "transcript.h" #include "code.h" + #include "wildcard.h" void (*logger)( char * ) = NULL; *************** *** 48,51 **** --- 49,53 ---- int create_prefix = 0; int quiet = 1; + int excluded = 0; const EVP_MD *md; SSL_CTX *ctx; *************** *** 57,64 **** { extern struct transcript *tran_head; - extern struct list *special_list; struct stat st; struct transcript *tran; - struct node *node; int cmp = 0; --- 59,64 ---- *************** *** 74,91 **** outtran = stdout; ! /* identical to code in twhich.c */ ! ! /* check special list */ ! if ( special_list->l_count > 0 ) { ! for ( node = list_pop_head( special_list ); node != NULL; ! node = list_pop_head( special_list )) { ! if ( pathcasecmp( node->n_path, file, case_sensitive ) == 0 ) { ! printf( "# Special\n" ); ! printf( "special.T:\n" ); ! printf( "%s\n", node->n_path ); ! free( node ); ! break; ! } ! } } --- 74,81 ---- outtran = stdout; ! /* check exclude list */ ! if ( t_exclude( file )) { ! excluded = 1; ! return( NULL ); } *************** *** 157,161 **** while (( c = getopt ( argc, argv, ! "h:Ip:P:rST:u:Vvw:x:y:z:Z:bitcefnC:D:sX:" )) != EOF ) { switch( c ) { case 'I': --- 147,151 ---- while (( c = getopt ( argc, argv, ! "h:IK:p:P:rST:u:Vvw:x:y:z:Z:bitcefnC:D:sX:" )) != EOF ) { switch( c ) { case 'I': *************** *** 167,170 **** --- 157,164 ---- break; + case 'K': + kfile = optarg; + break; + case 'p': if (( port = htons ( atoi( optarg ))) == 0 ) { *************** *** 310,314 **** if (( tran = precedent_transcript( kfile, file, K_CLIENT )) == NULL ) { ! fprintf( stderr, "%s not found in any transcript\n", file ); exit( 2 ); } --- 304,312 ---- if (( tran = precedent_transcript( kfile, file, K_CLIENT )) == NULL ) { ! if ( excluded ) { ! fprintf( stderr, "%s: excluded\n", file ); ! } else { ! fprintf( stderr, "%s not found in any transcript\n", file ); ! } exit( 2 ); } |
From: Andrew M. <fit...@us...> - 2007-11-03 14:57:41
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv11884 Modified Files: Tag: radmind-1-10-0-exclude-branch fsdiff.c Log Message: Updated usage for -W. Index: fsdiff.c =================================================================== RCS file: /cvsroot/radmind/radmind/fsdiff.c,v retrieving revision 1.78.4.1 retrieving revision 1.78.4.2 diff -C2 -d -r1.78.4.1 -r1.78.4.2 *** fsdiff.c 7 Sep 2007 17:12:35 -0000 1.78.4.1 --- fsdiff.c 3 Nov 2007 14:57:38 -0000 1.78.4.2 *************** *** 347,351 **** if ( errflag || ( argc - optind != 1 )) { ! fprintf( stderr, "usage: %s { -C | -A | -1 } [ -IV ] ", argv[ 0 ] ); fprintf( stderr, "[ -K command ] " ); fprintf( stderr, "[ -c checksum ] [ -o file [ -%% ] ] path\n" ); --- 347,351 ---- if ( errflag || ( argc - optind != 1 )) { ! fprintf( stderr, "usage: %s { -C | -A | -1 } [ -IVW ] ", argv[ 0 ] ); fprintf( stderr, "[ -K command ] " ); fprintf( stderr, "[ -c checksum ] [ -o file [ -%% ] ] path\n" ); |
From: Andrew M. <fit...@us...> - 2007-11-03 14:48:25
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8401 Modified Files: Tag: radmind-1-10-0-exclude-branch transcript.c Log Message: Incorporating revision 1.120 changes from umeditor. Index: transcript.c =================================================================== RCS file: /cvsroot/radmind/radmind/transcript.c,v retrieving revision 1.119.2.1 retrieving revision 1.119.2.2 diff -C2 -d -r1.119.2.1 -r1.119.2.2 *** transcript.c 7 Sep 2007 17:12:35 -0000 1.119.2.1 --- transcript.c 3 Nov 2007 14:48:19 -0000 1.119.2.2 *************** *** 118,122 **** switch( *argv[ 0 ] ) { case 'd': /* dir */ - #ifdef __APPLE__ if (( ac != 5 ) && ( ac != 6 )) { fprintf( stderr, "%s: line %d: expected 5 or 6 arguments, got %d\n", --- 118,121 ---- *************** *** 124,134 **** exit( 2 ); } - #else /* !__APPLE__ */ - if ( ac != 5 ) { - fprintf( stderr, "%s: line %d: expected 5 arguments, got %d\n", - tran->t_fullname, tran->t_linenum, ac ); - exit( 2 ); - } - #endif /* __APPLE__ */ tran->t_pinfo.pi_stat.st_mode = strtol( argv[ 2 ], NULL, 8 ); --- 123,126 ---- |
From: Andrew M. <fit...@us...> - 2007-09-11 14:57:02
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18011 Modified Files: Tag: radmind-1-10-0-exclude-branch list.h Log Message: Check for null list. Fixes fsdiff -1 crash. Thanks to Thomas Kula for reporting the problem. Index: list.h =================================================================== RCS file: /cvsroot/radmind/radmind/list.h,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** list.h 29 May 2007 23:17:48 -0000 1.6 --- list.h 11 Sep 2007 14:56:57 -0000 1.6.2.1 *************** *** 18,22 **** }; ! #define list_size( list ) ((list)->l_count) struct list * list_new( void ); --- 18,22 ---- }; ! #define list_size( list ) ((list) ? (list)->l_count : 0 ) struct list * list_new( void ); |
From: Andrew M. <fit...@us...> - 2007-09-07 17:24:35
|
Update of /cvsroot/radmind/radmind/man In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15347 Modified Files: Tag: radmind-1-10-0-exclude-branch fsdiff.1 Log Message: Added -W option documentation. Index: fsdiff.1 =================================================================== RCS file: /cvsroot/radmind/radmind/man/fsdiff.1,v retrieving revision 1.13.2.1 retrieving revision 1.13.2.2 diff -C2 -d -r1.13.2.1 -r1.13.2.2 *** fsdiff.1 7 Sep 2007 17:12:35 -0000 1.13.2.1 --- fsdiff.1 7 Sep 2007 17:24:31 -0000 1.13.2.2 *************** *** 12,16 **** .B -1 } [ ! .BI -IV ] [ .BI \-K\ command --- 12,16 ---- .B -1 } [ ! .BI -IVW ] [ .BI \-K\ command *************** *** 306,309 **** --- 306,313 ---- a list of supported checksumming algorithms in descending order of preference and then exits. + .TP 19 + .B \-W + prints a warning to the standard error when encountering an object + matching an exclude pattern. .sp .SH FILES |
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9913 Modified Files: Tag: radmind-1-10-0-exclude-branch Makefile.in command.c fsdiff.c ktcheck.c lfdiff.c transcript.c transcript.h twhich.c Log Message: Accepted [ 1781998 ]: Support for exclude patterns. Index: transcript.h =================================================================== RCS file: /cvsroot/radmind/radmind/transcript.h,v retrieving revision 1.41 retrieving revision 1.41.2.1 diff -C2 -d -r1.41 -r1.41.2.1 *** transcript.h 30 May 2007 18:11:49 -0000 1.41 --- transcript.h 7 Sep 2007 17:12:35 -0000 1.41.2.1 *************** *** 10,14 **** #define T_NEGATIVE 2 #define T_SPECIAL 3 - #define T_EXCLUDE 4 #define T_MOVE_TRAN 1 --- 10,13 ---- *************** *** 34,37 **** --- 33,37 ---- extern int skip; extern int cksum; + extern int fs_minus; extern FILE *outtran; extern char *path_prefix; *************** *** 61,69 **** }; ! int transcript( char *, struct stat *, char *, struct applefileinfo * ); void transcript_init( char *kfile, int location ); struct transcript *transcript_select( void ); void transcript_parse( struct transcript * ); void transcript_free( void ); void t_print( struct pathinfo *, struct transcript *, int ); char *hardlink( struct pathinfo * ); --- 61,70 ---- }; ! int transcript( char *, struct stat *, char *, struct applefileinfo *, int ); void transcript_init( char *kfile, int location ); struct transcript *transcript_select( void ); void transcript_parse( struct transcript * ); void transcript_free( void ); + int t_exclude( char *path ); void t_print( struct pathinfo *, struct transcript *, int ); char *hardlink( struct pathinfo * ); Index: Makefile.in =================================================================== RCS file: /cvsroot/radmind/radmind/Makefile.in,v retrieving revision 1.106 retrieving revision 1.106.2.1 diff -C2 -d -r1.106 -r1.106.2.1 *** Makefile.in 31 Jul 2007 14:15:21 -0000 1.106 --- Makefile.in 7 Sep 2007 17:12:35 -0000 1.106.2.1 *************** *** 59,63 **** FSDIFF_OBJ= version.o fsdiff.o argcargv.o transcript.o llist.o code.o \ hardlink.o cksum.o base64.o pathcmp.o radstat.o applefile.o \ ! list.o KTCHECK_OBJ= version.o ktcheck.o argcargv.o retr.o base64.o code.o \ --- 59,63 ---- FSDIFF_OBJ= version.o fsdiff.o argcargv.o transcript.o llist.o code.o \ hardlink.o cksum.o base64.o pathcmp.o radstat.o applefile.o \ ! list.o wildcard.o KTCHECK_OBJ= version.o ktcheck.o argcargv.o retr.o base64.o code.o \ *************** *** 80,84 **** LFDIFF_OBJ= version.o lfdiff.o argcargv.o connect.o retr.o cksum.o \ progress.o base64.o applefile.o code.o tls.o pathcmp.o \ ! transcript.o list.o radstat.o hardlink.o mkprefix.o REPO_OBJ= version.o repo.o report.o argcargv.o connect.o code.o tls.o --- 80,84 ---- LFDIFF_OBJ= version.o lfdiff.o argcargv.o connect.o retr.o cksum.o \ progress.o base64.o applefile.o code.o tls.o pathcmp.o \ ! transcript.o list.o radstat.o hardlink.o mkprefix.o wildcard.o REPO_OBJ= version.o repo.o report.o argcargv.o connect.o code.o tls.o *************** *** 86,90 **** TWHICH_OBJ= version.o twhich.o argcargv.o transcript.o llist.o code.o \ hardlink.o cksum.o base64.o pathcmp.o radstat.o applefile.o \ ! list.o LSORT_OBJ= version.o lsort.o pathcmp.o code.o argcargv.o --- 86,90 ---- TWHICH_OBJ= version.o twhich.o argcargv.o transcript.o llist.o code.o \ hardlink.o cksum.o base64.o pathcmp.o radstat.o applefile.o \ ! list.o wildcard.o LSORT_OBJ= version.o lsort.o pathcmp.o code.o argcargv.o Index: twhich.c =================================================================== RCS file: /cvsroot/radmind/radmind/twhich.c,v retrieving revision 1.42 retrieving revision 1.42.4.1 diff -C2 -d -r1.42 -r1.42.4.1 *** twhich.c 14 Apr 2006 21:17:13 -0000 1.42 --- twhich.c 7 Sep 2007 17:12:35 -0000 1.42.4.1 *************** *** 19,22 **** --- 19,23 ---- #include "pathcmp.h" #include "list.h" + #include "wildcard.h" const EVP_MD *md; *************** *** 38,41 **** --- 39,43 ---- extern struct transcript *tran_head; extern struct list *special_list; + extern struct list *exclude_list; int cmp = 0, match = 0; *************** *** 56,59 **** --- 58,76 ---- } + /* check exclude list */ + if ( exclude_list->l_count > 0 ) { + for ( node = list_pop_head( exclude_list ); node != NULL; + node = list_pop_head( exclude_list )) { + if ( wildcard( node->n_path, pattern, case_sensitive )) { + printf( "# Exclude\n" ); + printf( "# exclude pattern: %s\n", node->n_path ); + if ( !displayall ) { + goto done; + } + } + free( node ); + } + } + for ( tran = tran_head; tran->t_next != NULL; tran = tran->t_next ) { Index: transcript.c =================================================================== RCS file: /cvsroot/radmind/radmind/transcript.c,v retrieving revision 1.119 retrieving revision 1.119.2.1 diff -C2 -d -r1.119 -r1.119.2.1 *** transcript.c 31 May 2007 21:28:54 -0000 1.119 --- transcript.c 7 Sep 2007 17:12:35 -0000 1.119.2.1 *************** *** 27,30 **** --- 27,31 ---- #include "largefile.h" #include "list.h" + #include "wildcard.h" int read_kfile( char *kfile, int location ); *************** *** 40,43 **** --- 41,45 ---- static struct list *kfile_list; struct list *special_list; + struct list *exclude_list; char *path_prefix = NULL; *************** *** 45,48 **** --- 47,52 ---- int skip; int cksum; + int fs_minus; + int exclude_warnings = 0; FILE *outtran; *************** *** 263,266 **** --- 267,272 ---- if ( print_minus ) { + /* set fs_minus so we can handle excluded files in dirs to be deleted */ + fs_minus = 1; fprintf( outtran, "- " ); } *************** *** 557,560 **** --- 563,582 ---- } + int + t_exclude( char *path ) + { + struct node *cur; + + if ( list_size( exclude_list ) > 0 ) { + for ( cur = exclude_list->l_head; cur != NULL; cur = cur->n_next ) { + if ( wildcard( cur->n_path, path, case_sensitive )) { + return( 1 ); + } + } + } + + return( 0 ); + } + /* * Loop through the list of transcripts and compare each *************** *** 618,622 **** int ! transcript( char *path, struct stat *st, char *type, struct applefileinfo *afinfo ) { struct pathinfo pi; --- 640,645 ---- int ! transcript( char *path, struct stat *st, char *type, ! struct applefileinfo *afinfo, int parent_minus ) { struct pathinfo pi; *************** *** 627,630 **** --- 650,655 ---- struct transcript *tran = NULL; + fs_minus = 0; + /* * path is NULL when we've been called after the filesystem has been *************** *** 632,635 **** --- 657,679 ---- */ if ( path != NULL ) { + /* + * check for exclude match first to avoid any unnecessary work. + * special files still have highest precedence. + */ + if ( t_exclude( path ) && !parent_minus ) { + if ( list_size( special_list ) <= 0 + || list_check( special_list, path ) == 0 ) { + if ( exclude_warnings ) { + fprintf( stderr, "Warning: excluding %s\n", path ); + } + + /* move the transcripts ahead */ + tran = transcript_select(); + transcript_parse( tran ); + + return( 0 ); + } + } + strcpy( pi.pi_name, path ); pi.pi_stat = *st; *************** *** 719,726 **** break; - case T_EXCLUDE : - /* read the whole file, keep a list of possibly wild pathnames */ - break; - default : break; --- 763,766 ---- *************** *** 834,837 **** --- 874,881 ---- exit( 2 ); } + if (( exclude_list = list_new()) == NULL ) { + perror( "list_new" ); + exit( 2 ); + } if ( read_kfile( kfile, location ) != 0 ) { exit( 2 ); *************** *** 977,983 **** case 'x': /* exclude */ if ( minus ) { ! t_remove( T_EXCLUDE, av[ 1 ] ); } else { ! t_new( T_EXCLUDE, fullpath, av[ 1 ], kfile ); } break; --- 1021,1032 ---- case 'x': /* exclude */ if ( minus ) { ! list_remove( exclude_list, av[ 1 ] ); } else { ! if ( !list_check( exclude_list, av[ 1 ] )) { ! if ( list_insert( exclude_list, av[ 1 ] ) != 0 ) { ! perror( "list_insert" ); ! return( -1 ); ! } ! } } break; *************** *** 1023,1027 **** * filesystem to compare against. */ ! transcript( NULL, NULL, NULL, NULL ); while ( tran_head != NULL ) { --- 1072,1076 ---- * filesystem to compare against. */ ! transcript( NULL, NULL, NULL, NULL, 0 ); while ( tran_head != NULL ) { Index: command.c =================================================================== RCS file: /cvsroot/radmind/radmind/command.c,v retrieving revision 1.138 retrieving revision 1.138.2.1 diff -C2 -d -r1.138 -r1.138.2.1 *** command.c 30 May 2007 18:11:49 -0000 1.138 --- command.c 7 Sep 2007 17:12:35 -0000 1.138.2.1 *************** *** 1403,1406 **** --- 1403,1407 ---- case 's': + case 'x': break; Index: fsdiff.c =================================================================== RCS file: /cvsroot/radmind/radmind/fsdiff.c,v retrieving revision 1.78 retrieving revision 1.78.4.1 diff -C2 -d -r1.78 -r1.78.4.1 *** fsdiff.c 6 May 2006 22:13:18 -0000 1.78 --- fsdiff.c 7 Sep 2007 17:12:35 -0000 1.78.4.1 *************** *** 28,36 **** void fs_walk( char *, struct stat *, char *, struct applefileinfo *, ! int, int ); int dodots = 0; int dotfd; int lastpercent = -1; int case_sensitive = 1; const EVP_MD *md; --- 28,37 ---- void fs_walk( char *, struct stat *, char *, struct applefileinfo *, ! int, int, int ); int dodots = 0; int dotfd; int lastpercent = -1; int case_sensitive = 1; + extern int exclude_warnings; const EVP_MD *md; *************** *** 80,84 **** void fs_walk( char *path, struct stat *st, char *type, struct applefileinfo *afinfo, ! int start, int finish ) { DIR *dir; --- 81,85 ---- void fs_walk( char *path, struct stat *st, char *type, struct applefileinfo *afinfo, ! int start, int finish, int pdel ) { DIR *dir; *************** *** 87,90 **** --- 88,92 ---- int len; int count = 0; + int del_parent; float chunk, f = start; char temp[ MAXPATHLEN ]; *************** *** 99,103 **** /* call the transcript code */ ! switch ( transcript( path, st, type, afinfo )) { case 2 : /* negative directory */ for (;;) { --- 101,105 ---- /* call the transcript code */ ! switch ( transcript( path, st, type, afinfo, pdel )) { case 2 : /* negative directory */ for (;;) { *************** *** 126,130 **** } ! fs_walk( temp, &st0, &type0, &afinfo0, start, finish ); } else { return; --- 128,132 ---- } ! fs_walk( temp, &st0, &type0, &afinfo0, start, finish, pdel ); } else { return; *************** *** 144,147 **** --- 146,161 ---- } + /* + * store whether object is to be deleted. if we get here, object + * is a directory, which should mean that if fs_minus == 1 all + * child objects should be removed as well. tracking this allows + * us to zap excluded objects whose parent dir will be deleted. + * + * del_parent is passed into subsequent fs_walk and transcript + * calls, where * it's checked when considering whether to + * exclude an object. + */ + del_parent = fs_minus; + if ( case_sensitive ) { cmp = strcmp; *************** *** 223,227 **** fs_walk( temp, &cur->fl_stat, &cur->fl_type, &cur->fl_afinfo, ! (int)f, (int)( f + chunk )); f += chunk; --- 237,241 ---- fs_walk( temp, &cur->fl_stat, &cur->fl_type, &cur->fl_afinfo, ! (int)f, (int)( f + chunk ), del_parent ); f += chunk; *************** *** 252,256 **** outtran = stdout; ! while (( c = getopt( argc, argv, "%1ACc:IK:o:Vv" )) != EOF ) { switch( c ) { case '%': --- 266,270 ---- outtran = stdout; ! while (( c = getopt( argc, argv, "%1ACc:IK:o:VvW" )) != EOF ) { switch( c ) { case '%': *************** *** 302,305 **** --- 316,323 ---- exit( 0 ); + case 'W': /* print a warning when excluding an object */ + exclude_warnings = 1; + break; + case '?': printf( "bad %c\n", c ); *************** *** 355,359 **** transcript_init( kfile, K_CLIENT ); ! fs_walk( path_prefix, &st, &type, &afinfo, 0, finish ); if ( finish > 0 ) { --- 373,377 ---- transcript_init( kfile, K_CLIENT ); ! fs_walk( path_prefix, &st, &type, &afinfo, 0, finish, 0 ); if ( finish > 0 ) { Index: ktcheck.c =================================================================== RCS file: /cvsroot/radmind/radmind/ktcheck.c,v retrieving revision 1.125 retrieving revision 1.125.2.1 diff -C2 -d -r1.125 -r1.125.2.1 *** ktcheck.c 31 Jul 2007 02:55:36 -0000 1.125 --- ktcheck.c 7 Sep 2007 17:12:35 -0000 1.125.2.1 *************** *** 1022,1025 **** --- 1022,1029 ---- } break; + + case 'x': + /* exclude patterns have no associated transcript */ + break; } } Index: lfdiff.c =================================================================== RCS file: /cvsroot/radmind/radmind/lfdiff.c,v retrieving revision 1.61 retrieving revision 1.61.2.1 diff -C2 -d -r1.61 -r1.61.2.1 *** lfdiff.c 31 Jul 2007 02:55:36 -0000 1.61 --- lfdiff.c 7 Sep 2007 17:12:35 -0000 1.61.2.1 *************** *** 38,41 **** --- 38,42 ---- #include "transcript.h" #include "code.h" + #include "wildcard.h" void (*logger)( char * ) = NULL; *************** *** 48,51 **** --- 49,53 ---- int create_prefix = 0; int quiet = 1; + int excluded = 0; const EVP_MD *md; SSL_CTX *ctx; *************** *** 57,64 **** { extern struct transcript *tran_head; - extern struct list *special_list; struct stat st; struct transcript *tran; - struct node *node; int cmp = 0; --- 59,64 ---- *************** *** 74,91 **** outtran = stdout; ! /* identical to code in twhich.c */ ! ! /* check special list */ ! if ( special_list->l_count > 0 ) { ! for ( node = list_pop_head( special_list ); node != NULL; ! node = list_pop_head( special_list )) { ! if ( pathcasecmp( node->n_path, file, case_sensitive ) == 0 ) { ! printf( "# Special\n" ); ! printf( "special.T:\n" ); ! printf( "%s\n", node->n_path ); ! free( node ); ! break; ! } ! } } --- 74,81 ---- outtran = stdout; ! /* check exclude list */ ! if ( t_exclude( file )) { ! excluded = 1; ! return( NULL ); } *************** *** 157,161 **** while (( c = getopt ( argc, argv, ! "h:Ip:P:rST:u:Vvw:x:y:z:Z:bitcefnC:D:sX:" )) != EOF ) { switch( c ) { case 'I': --- 147,151 ---- while (( c = getopt ( argc, argv, ! "h:IK:p:P:rST:u:Vvw:x:y:z:Z:bitcefnC:D:sX:" )) != EOF ) { switch( c ) { case 'I': *************** *** 167,170 **** --- 157,164 ---- break; + case 'K': + kfile = optarg; + break; + case 'p': if (( port = htons ( atoi( optarg ))) == 0 ) { *************** *** 310,314 **** if (( tran = precedent_transcript( kfile, file, K_CLIENT )) == NULL ) { ! fprintf( stderr, "%s not found in any transcript\n", file ); exit( 2 ); } --- 304,312 ---- if (( tran = precedent_transcript( kfile, file, K_CLIENT )) == NULL ) { ! if ( excluded ) { ! fprintf( stderr, "%s: excluded\n", file ); ! } else { ! fprintf( stderr, "%s not found in any transcript\n", file ); ! } exit( 2 ); } |
From: Andrew M. <fit...@us...> - 2007-09-07 17:12:39
|
Update of /cvsroot/radmind/radmind/man In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9913/man Modified Files: Tag: radmind-1-10-0-exclude-branch fsdiff.1 Log Message: Accepted [ 1781998 ]: Support for exclude patterns. Index: fsdiff.1 =================================================================== RCS file: /cvsroot/radmind/radmind/man/fsdiff.1,v retrieving revision 1.13 retrieving revision 1.13.2.1 diff -C2 -d -r1.13 -r1.13.2.1 *** fsdiff.1 5 Jul 2007 19:38:59 -0000 1.13 --- fsdiff.1 7 Sep 2007 17:12:35 -0000 1.13.2.1 *************** *** 180,185 **** .sp .br ! Type is 'k' for command file, 'p' for positive, 'n' for negative and 's' ! for special. The argument path is either a command file name, transcript name, or in the case of type special, a full pathname. --- 180,185 ---- .sp .br ! Type is 'k' for command file, 'p' for positive, 'n' for negative, 's' ! for special and 'x' for an exclude pattern. The argument path is either a command file name, transcript name, or in the case of type special, a full pathname. *************** *** 198,204 **** .br s /etc/fstab .sp Lines beginning with "#" are comments, and are skipped. A comment must ! be on a line by itself. Blank lines are also skipped. .sp If there is no command file, the transcript used is the null transcript. --- 198,210 ---- .br s /etc/fstab + .br + x /etc/tsm*.pid .sp Lines beginning with "#" are comments, and are skipped. A comment must ! be on a line by itself. Blank lines are also skipped. Exclude lines are ! wildcard patterns (see radmind(8) DESCRIPTION) of paths that will be ! ignored completely, that is, fsdiff will not care if an object matching ! an exclude line is present or absent, and will not print out anything ! relating to it. .sp If there is no command file, the transcript used is the null transcript. |
From: Andrew M. <fit...@us...> - 2007-09-06 14:48:21
|
Update of /cvsroot/radmind/radmind-assistant In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15858 Modified Files: RAVersionCompare.m Log Message: Fix version checking when version string is longer than 5 characters. Thanks to John Robertson for reporting the issue. Index: RAVersionCompare.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/RAVersionCompare.m,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RAVersionCompare.m 14 Mar 2006 16:42:46 -0000 1.6 --- RAVersionCompare.m 6 Sep 2007 14:47:56 -0000 1.7 *************** *** 92,96 **** } ! for ( i = 0, j = 0; i < MIN( strlen( buf ), 5 ); i++ ) { if ( isdigit( buf[ i ] )) { vbuf[ j ] = buf[ i ]; --- 92,96 ---- } ! for ( i = 0, j = 0; i < MIN( strlen( buf ), 10 ); i++ ) { if ( isdigit( buf[ i ] )) { vbuf[ j ] = buf[ i ]; |
From: Patrick M. <ume...@us...> - 2007-09-04 20:40:04
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv12171 Modified Files: daemon.c Log Message: Set correct paths for TLS related files. [ Bug 1785746 ] Thanks to Linc Davis for reporting the problem. Index: daemon.c =================================================================== RCS file: /cvsroot/radmind/radmind/daemon.c,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** daemon.c 31 Jul 2007 02:55:36 -0000 1.83 --- daemon.c 4 Sep 2007 20:40:00 -0000 1.84 *************** *** 158,162 **** } ! b_addr.s_addr = htonl( INADDR_ANY ); while (( c = getopt( ac, av, "a:Bb:dD:F:fL:m:p:P:Ru:UVw:x:y:z:Z:" )) --- 158,167 ---- } ! b_addr.s_addr = htonl( INADDR_ANY ); ! ! /* Set appropriate TLS paths for server; default values are for client */ ! caFile = "cert/ca.pem"; ! cert = "cert/cert.pem"; ! privatekey = "cert/cert.pem"; while (( c = getopt( ac, av, "a:Bb:dD:F:fL:m:p:P:Ru:UVw:x:y:z:Z:" )) |
From: Patrick M. <ume...@us...> - 2007-08-31 15:29:00
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8003 Modified Files: transcript.c Log Message: Allow directories to have 5 or 6 arguments on all platforms. This fixes a bug the prevents twhich from parsing apple transcripts on non-apple hardware. Index: transcript.c =================================================================== RCS file: /cvsroot/radmind/radmind/transcript.c,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** transcript.c 31 May 2007 21:28:54 -0000 1.119 --- transcript.c 31 Aug 2007 15:28:54 -0000 1.120 *************** *** 114,118 **** switch( *argv[ 0 ] ) { case 'd': /* dir */ - #ifdef __APPLE__ if (( ac != 5 ) && ( ac != 6 )) { fprintf( stderr, "%s: line %d: expected 5 or 6 arguments, got %d\n", --- 114,117 ---- *************** *** 120,130 **** exit( 2 ); } - #else /* !__APPLE__ */ - if ( ac != 5 ) { - fprintf( stderr, "%s: line %d: expected 5 arguments, got %d\n", - tran->t_fullname, tran->t_linenum, ac ); - exit( 2 ); - } - #endif /* __APPLE__ */ tran->t_pinfo.pi_stat.st_mode = strtol( argv[ 2 ], NULL, 8 ); --- 119,122 ---- |
From: Andrew M. <fit...@us...> - 2007-08-24 03:14:13
|
Update of /cvsroot/radmind/radmind/man In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22293 Modified Files: radmind.8 Log Message: Fixed manpage rendering issue which hid some of the text. Index: radmind.8 =================================================================== RCS file: /cvsroot/radmind/radmind/man/radmind.8,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** radmind.8 31 Jul 2007 02:55:37 -0000 1.41 --- radmind.8 24 Aug 2007 03:14:09 -0000 1.42 *************** *** 61,66 **** .sp Lines that are blank or begin with '#' are ignored. There are several ! supported wildcard patterns similar to shell globbing. ! '*' will match any string. A number range can be given by "<\c .IR min -\c --- 61,66 ---- .sp Lines that are blank or begin with '#' are ignored. There are several ! supported wildcard patterns similar to shell globbing. '*' ! will match any string. A number range can be given by "<\c .IR min -\c |
From: Andrew M. <fit...@us...> - 2007-08-16 23:41:24
|
Update of /cvsroot/radmind/radmind-assistant/rte In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2062 Modified Files: Info.plist RTEEditableTableView.m RXTranscript.m Log Message: Fixed crash when filtering a second time (autorelease mishap). Updated post-build script to copy filters to Resources dir. Updated version. Index: Info.plist =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/Info.plist,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Info.plist 27 Mar 2006 20:13:50 -0000 1.7 --- Info.plist 16 Aug 2007 23:40:13 -0000 1.8 *************** *** 29,33 **** <string>Radmind Transcript Editor</string> <key>CFBundleGetInfoString</key> ! <string>Radmind Transcript Editor 0.7.7</string> <key>CFBundleIconFile</key> <string>editor</string> --- 29,33 ---- <string>Radmind Transcript Editor</string> <key>CFBundleGetInfoString</key> ! <string>Radmind Transcript Editor 0.8.0</string> <key>CFBundleIconFile</key> <string>editor</string> *************** *** 41,49 **** <string>APPL</string> <key>CFBundleShortVersionString</key> ! <string>0.7.7</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> ! <string>0.7.7</string> <key>NSAppleScriptEnabled</key> <true/> --- 41,49 ---- <string>APPL</string> <key>CFBundleShortVersionString</key> ! <string>0.8.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> ! <string>0.8.0</string> <key>NSAppleScriptEnabled</key> <true/> Index: RXTranscript.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/RXTranscript.m,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** RXTranscript.m 24 Jun 2007 23:11:43 -0000 1.112 --- RXTranscript.m 16 Aug 2007 23:40:13 -0000 1.113 *************** *** 1018,1025 **** [ self setDisplayedTranscriptContents: [ self transcriptContents ]]; [ tContentsTableView reloadData ]; - - if ( filteredTranscript ) { - [ filteredTranscript autorelease ]; - } } --- 1018,1021 ---- Index: RTEEditableTableView.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/RTEEditableTableView.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RTEEditableTableView.m 31 Aug 2006 04:21:59 -0000 1.1 --- RTEEditableTableView.m 16 Aug 2007 23:40:13 -0000 1.2 *************** *** 8,16 **** @implementation RTEEditableTableView - - ( BOOL )needsPanelToBecomeKey - { - return( YES ); - } - - ( void )textDidEndEditing: ( NSNotification * )aNotification { --- 8,11 ---- |
From: Andrew M. <fit...@us...> - 2007-08-16 23:40:44
|
Update of /cvsroot/radmind/radmind-assistant/rte/English.lproj/RXTranscript.nib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2062/English.lproj/RXTranscript.nib Modified Files: info.nib keyedobjects.nib Log Message: Fixed crash when filtering a second time (autorelease mishap). Updated post-build script to copy filters to Resources dir. Updated version. Index: info.nib =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/English.lproj/RXTranscript.nib/info.nib,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** info.nib 29 Aug 2006 01:38:34 -0000 1.43 --- info.nib 16 Aug 2007 23:40:14 -0000 1.44 *************** *** 18,22 **** <string>348 627 181 87 0 0 1440 878 </string> <key>97</key> ! <string>451 444 538 285 0 0 1440 878 </string> </dict> <key>IBFramework Version</key> --- 18,22 ---- <string>348 627 181 87 0 0 1440 878 </string> <key>97</key> ! <string>452 444 538 285 0 0 1440 878 </string> </dict> <key>IBFramework Version</key> Index: keyedobjects.nib =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/English.lproj/RXTranscript.nib/keyedobjects.nib,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 Binary files /tmp/cvsq6VcKf and /tmp/cvsmEornv differ |
From: Andrew M. <fit...@us...> - 2007-08-16 23:40:25
|
Update of /cvsroot/radmind/radmind-assistant/rte/English.lproj/RXPrefs.nib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2062/English.lproj/RXPrefs.nib Modified Files: keyedobjects.nib Log Message: Fixed crash when filtering a second time (autorelease mishap). Updated post-build script to copy filters to Resources dir. Updated version. Index: keyedobjects.nib =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/English.lproj/RXPrefs.nib/keyedobjects.nib,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 Binary files /tmp/cvsoK6ILT and /tmp/cvs8yF4N8 differ |
From: Andrew M. <fit...@us...> - 2007-08-16 23:40:21
|
Update of /cvsroot/radmind/radmind-assistant/rte/RTE.xcodeproj In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2062/RTE.xcodeproj Modified Files: project.pbxproj Log Message: Fixed crash when filtering a second time (autorelease mishap). Updated post-build script to copy filters to Resources dir. Updated version. Index: project.pbxproj =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/RTE.xcodeproj/project.pbxproj,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** project.pbxproj 31 Aug 2006 04:28:53 -0000 1.8 --- project.pbxproj 16 Aug 2007 23:40:14 -0000 1.9 *************** *** 16,19 **** --- 16,22 ---- 091EDF2E05583F160036F26A /* NSArray(CreateArgv).h in Headers */ = {isa = PBXBuildFile; fileRef = 091EDF2C05583F160036F26A /* NSArray(CreateArgv).h */; }; 091EDF2F05583F160036F26A /* NSArray(CreateArgv).m in Sources */ = {isa = PBXBuildFile; fileRef = 091EDF2D05583F160036F26A /* NSArray(CreateArgv).m */; }; + 0957C8230C2F3614007A451D /* Applications.transcriptFilter in Resources */ = {isa = PBXBuildFile; fileRef = 0957C8200C2F3614007A451D /* Applications.transcriptFilter */; }; + 0957C8240C2F3614007A451D /* DS_Store.transcriptFilter in Resources */ = {isa = PBXBuildFile; fileRef = 0957C8210C2F3614007A451D /* DS_Store.transcriptFilter */; }; + 0957C8250C2F3614007A451D /* Non-Root Owners.transcriptFilter in Resources */ = {isa = PBXBuildFile; fileRef = 0957C8220C2F3614007A451D /* Non-Root Owners.transcriptFilter */; }; 095BE01105FEC2D40065403C /* NSAttributedString-Ellipsis.h in Headers */ = {isa = PBXBuildFile; fileRef = 095BE00F05FEC2D40065403C /* NSAttributedString-Ellipsis.h */; }; 095BE01205FEC2D40065403C /* NSAttributedString-Ellipsis.m in Sources */ = {isa = PBXBuildFile; fileRef = 095BE01005FEC2D40065403C /* NSAttributedString-Ellipsis.m */; }; *************** *** 132,135 **** --- 135,141 ---- 091EDF2C05583F160036F26A /* NSArray(CreateArgv).h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray(CreateArgv).h"; sourceTree = "<group>"; }; 091EDF2D05583F160036F26A /* NSArray(CreateArgv).m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray(CreateArgv).m"; sourceTree = "<group>"; }; + 0957C8200C2F3614007A451D /* Applications.transcriptFilter */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = Applications.transcriptFilter; path = filters/Applications.transcriptFilter; sourceTree = "<group>"; }; + 0957C8210C2F3614007A451D /* DS_Store.transcriptFilter */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = DS_Store.transcriptFilter; path = filters/DS_Store.transcriptFilter; sourceTree = "<group>"; }; + 0957C8220C2F3614007A451D /* Non-Root Owners.transcriptFilter */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = "Non-Root Owners.transcriptFilter"; path = "filters/Non-Root Owners.transcriptFilter"; sourceTree = "<group>"; }; 095BE00F05FEC2D40065403C /* NSAttributedString-Ellipsis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSAttributedString-Ellipsis.h"; sourceTree = "<group>"; }; 095BE01005FEC2D40065403C /* NSAttributedString-Ellipsis.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSAttributedString-Ellipsis.m"; sourceTree = "<group>"; }; *************** *** 251,254 **** --- 257,270 ---- /* Begin PBXGroup section */ + 0957C81F0C2F35ED007A451D /* Filters */ = { + isa = PBXGroup; + children = ( + 0957C8200C2F3614007A451D /* Applications.transcriptFilter */, + 0957C8210C2F3614007A451D /* DS_Store.transcriptFilter */, + 0957C8220C2F3614007A451D /* Non-Root Owners.transcriptFilter */, + ); + name = Filters; + sourceTree = "<group>"; + }; 095BE0FE05FFF97A0065403C /* rteauthexec */ = { isa = PBXGroup; *************** *** 380,383 **** --- 396,400 ---- isa = PBXGroup; children = ( + 0957C81F0C2F35ED007A451D /* Filters */, 09659106071EFE3C003B3083 /* editor.icns */, 09F2277A03F5BF8000A8002B /* rteauthexec */, *************** *** 593,596 **** --- 610,616 ---- 09A3B7A30A3F0A5B006F3297 /* twhich.png in Resources */, 09A3B7AA0A3F3E05006F3297 /* comment.png in Resources */, + 0957C8230C2F3614007A451D /* Applications.transcriptFilter in Resources */, + 0957C8240C2F3614007A451D /* DS_Store.transcriptFilter in Resources */, + 0957C8250C2F3614007A451D /* Non-Root Owners.transcriptFilter in Resources */, ); runOnlyForDeploymentPostprocessing = 0; *************** *** 610,614 **** runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; ! shellScript = "#! /bin/sh\n\nPATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH\n\ntoolname=\"rteauthexec\"\ntoolpath=\"${BUILT_PRODUCTS_DIR}/${toolname}\"\nrsrcdir=\"${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\n\nif [ x\"${ACTION}\" != x\"build\" ]; then\n\texit 0\nfi\n\nif [ \"${toolpath}\" -nt \"${rsrcdir}/${toolname}\" \\\n\t\t-o ! -f \"${rsrcdir}/${toolname}\" ]; then\n\techo Copying ${toolpath} to ${rsrcdir}...\n\tcp -f \"${toolpath}\" \"${rsrcdir}\"\n\tif [ $? -ne 0 ]; then\n\t\techo Copy failed.\n\t\texit 2\n\tfi\nfi\n\nexit 0"; }; /* End PBXShellScriptBuildPhase section */ --- 630,634 ---- runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; ! shellScript = "#! /bin/sh\n\nPATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH\n\ntoolname=\"rteauthexec\"\ntoolpath=\"${BUILT_PRODUCTS_DIR}/${toolname}\"\nrsrcdir=\"${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\n\nif [ x\"${ACTION}\" != x\"build\" ]; then\n\texit 0\nfi\n\nif [ \"${toolpath}\" -nt \"${rsrcdir}/${toolname}\" \\\n\t\t-o ! -f \"${rsrcdir}/${toolname}\" ]; then\n\techo Copying ${toolpath} to ${rsrcdir}...\n\tcp -f \"${toolpath}\" \"${rsrcdir}\"\n\tif [ $? -ne 0 ]; then\n\t\techo Copy failed.\n\t\texit 2\n\tfi\nfi\n\n# transcript filters\nmkdir -m 0755 -p \"${rsrcdir}/Filters\"\nfind \"${rsrcdir}\" -name '*.transcriptFilter' -print0 \\\n\t\t| xargs -0 -J '%' cp \"%\" \"${rsrcdir}/Filters\"\n\nexit 0"; }; /* End PBXShellScriptBuildPhase section */ |
From: Patrick M. <ume...@us...> - 2007-07-31 14:15:24
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9622 Modified Files: Makefile.in Log Message: make package now removes temporary file. Index: Makefile.in =================================================================== RCS file: /cvsroot/radmind/radmind/Makefile.in,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -d -r1.105 -r1.106 *** Makefile.in 31 Jul 2007 14:00:42 -0000 1.105 --- Makefile.in 31 Jul 2007 14:15:21 -0000 1.106 *************** *** 355,358 **** --- 355,359 ---- -d ${PKGSRCDIR}/tmp/OS_X/Description.plist tar cvfz ../${PKGNAME}.pkg.tar.gz ../${PKGNAME}.pkg + sudo rm -rf ${PKGDIR} clean : |
From: Patrick M. <ume...@us...> - 2007-07-31 14:00:45
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3987 Modified Files: Makefile.in Log Message: make package will now create a compressed tar ball. Index: Makefile.in =================================================================== RCS file: /cvsroot/radmind/radmind/Makefile.in,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -d -r1.104 -r1.105 *** Makefile.in 31 Jul 2007 13:52:19 -0000 1.104 --- Makefile.in 31 Jul 2007 14:00:42 -0000 1.105 *************** *** 354,357 **** --- 354,358 ---- -i ${PKGSRCDIR}/tmp/OS_X/Info.plist \ -d ${PKGSRCDIR}/tmp/OS_X/Description.plist + tar cvfz ../${PKGNAME}.pkg.tar.gz ../${PKGNAME}.pkg clean : |
From: Patrick M. <ume...@us...> - 2007-07-31 13:52:23
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32704 Modified Files: Makefile.in Log Message: make dist will now create a compressed tar ball. Index: Makefile.in =================================================================== RCS file: /cvsroot/radmind/radmind/Makefile.in,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** Makefile.in 11 Jul 2007 03:01:42 -0000 1.103 --- Makefile.in 31 Jul 2007 13:52:19 -0000 1.104 *************** *** 242,245 **** --- 242,246 ---- rm -rf ${DISTDIR}/man mv ${DISTDIR}/tmp ${DISTDIR}/man + tar cvfz ${DISTDIR}.tar.gz ${DISTDIR} rash : FRC |
From: Patrick M. <ume...@us...> - 2007-07-31 02:55:41
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6324 Modified Files: daemon.c ktcheck.c lapply.c lcreate.c lfdiff.c repo.c tls.c tls.h Log Message: Added -P option that allows you to specifies a directory that contains certificates to be used when verifying the peer. Certificates must be in PEM format and the directory must have been processed with the openssl c_rehash utility. Index: repo.c =================================================================== RCS file: /cvsroot/radmind/radmind/repo.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** repo.c 18 Jun 2007 19:40:05 -0000 1.10 --- repo.c 31 Jul 2007 02:55:37 -0000 1.11 *************** *** 40,44 **** extern struct timeval timeout; extern char *version; ! extern char *ca, *cert, *privatekey; SSL_CTX *ctx; --- 40,44 ---- extern struct timeval timeout; extern char *version; ! extern char *caFile, *caDir, *cert, *privatekey; SSL_CTX *ctx; *************** *** 58,62 **** char **capa = NULL; /* server capabilities */ ! while (( c = getopt( argc, argv, "e:h:p:vVw:x:y:Z:z:" )) != EOF ) { switch ( c ) { case 'e': /* event to report */ --- 58,62 ---- char **capa = NULL; /* server capabilities */ ! while (( c = getopt( argc, argv, "e:h:p:P:vVw:x:y:Z:z:" )) != EOF ) { switch ( c ) { case 'e': /* event to report */ *************** *** 78,81 **** --- 78,85 ---- break; + case 'P': + caDir = optarg; + break; + case 'v': verbose = 1; *************** *** 97,101 **** case 'x': ! ca = optarg; break; --- 101,105 ---- case 'x': ! caFile = optarg; break; *************** *** 146,150 **** if ( err || (( argc - optind ) < 0 )) { fprintf( stderr, "usage: %s -e event [ -Vv ] ", argv[ 0 ] ); ! fprintf( stderr, "[ -h host ] [ -p port ] " ); fprintf( stderr, "[ -w auth-level ] [ -x ca-pem-file ] " ); fprintf( stderr, "[ -y cert-pem-file ] [ -z key-pem-file ] " ); --- 150,154 ---- if ( err || (( argc - optind ) < 0 )) { fprintf( stderr, "usage: %s -e event [ -Vv ] ", argv[ 0 ] ); ! fprintf( stderr, "[ -h host ] [ -p port ] [ -P ca-pem-directory ] " ); fprintf( stderr, "[ -w auth-level ] [ -x ca-pem-file ] " ); fprintf( stderr, "[ -y cert-pem-file ] [ -z key-pem-file ] " ); *************** *** 193,197 **** if ( authlevel != 0 ) { ! if ( tls_client_setup( use_randfile, authlevel, ca, cert, privatekey ) != 0 ) { exit( 2 ); --- 197,201 ---- if ( authlevel != 0 ) { ! if ( tls_client_setup( use_randfile, authlevel, caFile, caDir, cert, privatekey ) != 0 ) { exit( 2 ); Index: daemon.c =================================================================== RCS file: /cvsroot/radmind/radmind/daemon.c,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** daemon.c 18 Jun 2007 19:40:05 -0000 1.82 --- daemon.c 31 Jul 2007 02:55:36 -0000 1.83 *************** *** 142,148 **** extern int optind; extern char *optarg; ! char *ca = "cert/ca.pem"; ! char *cert = "cert/cert.pem"; ! char *privatekey = "cert/cert.pem"; pid_t pid; int status; --- 142,146 ---- extern int optind; extern char *optarg; ! extern char *caFile, *caDir, *cert, *privatekey; pid_t pid; int status; *************** *** 154,158 **** #endif /* HAVE_DNSSD */ - if (( prog = strrchr( av[ 0 ], '/' )) == NULL ) { prog = av[ 0 ]; --- 152,155 ---- *************** *** 163,167 **** b_addr.s_addr = htonl( INADDR_ANY ); ! while (( c = getopt( ac, av, "a:Bb:dD:F:fL:m:p:Ru:UVw:x:y:z:Z:" )) != EOF ) { switch ( c ) { --- 160,164 ---- b_addr.s_addr = htonl( INADDR_ANY ); ! while (( c = getopt( ac, av, "a:Bb:dD:F:fL:m:p:P:Ru:UVw:x:y:z:Z:" )) != EOF ) { switch ( c ) { *************** *** 223,226 **** --- 220,227 ---- break; + case 'P' : /* ca dir */ + caDir = optarg; + break; + case 'r' : use_randfile = 1; *************** *** 249,253 **** case 'x' : /* ca file */ ! ca = optarg; break; --- 250,254 ---- case 'x' : /* ca file */ ! caFile = optarg; break; *************** *** 285,289 **** fprintf( stderr, "[ -b backlog ] [ -D path ] [ -F syslog-facility " ); fprintf( stderr, "[ -L syslog-level ] [ -m max-connections ] " ); ! fprintf( stderr, "[ -p port ] [ -u umask ] " ); fprintf( stderr, "[ -w auth-level ] [ -x ca-pem-file ] " ); fprintf( stderr, "[ -y cert-pem-file] [ -z key-pem-file ] " ); --- 286,290 ---- fprintf( stderr, "[ -b backlog ] [ -D path ] [ -F syslog-facility " ); fprintf( stderr, "[ -L syslog-level ] [ -m max-connections ] " ); ! fprintf( stderr, "[ -p port ] [ -P ca-pem-directory ] [ -u umask ] " ); fprintf( stderr, "[ -w auth-level ] [ -x ca-pem-file ] " ); fprintf( stderr, "[ -y cert-pem-file] [ -z key-pem-file ] " ); *************** *** 355,359 **** if ( authlevel != 0 ) { ! if ( tls_server_setup( use_randfile, authlevel, ca, cert, privatekey ) != 0 ) { exit( 1 ); --- 356,360 ---- if ( authlevel != 0 ) { ! if ( tls_server_setup( use_randfile, authlevel, caFile, caDir, cert, privatekey ) != 0 ) { exit( 1 ); Index: lcreate.c =================================================================== RCS file: /cvsroot/radmind/radmind/lcreate.c,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** lcreate.c 18 Jun 2007 19:40:05 -0000 1.88 --- lcreate.c 31 Jul 2007 02:55:36 -0000 1.89 *************** *** 68,72 **** SSL_CTX *ctx; ! extern char *ca, *cert, *privatekey; int --- 68,72 ---- SSL_CTX *ctx; ! extern char *caFile, *caDir, *cert, *privatekey; int *************** *** 98,102 **** char **capa = NULL; /* capabilities */ ! while (( c = getopt( argc, argv, "%c:Fh:ilnNp:qrt:TU:vVw:x:y:z:Z:" )) != EOF ) { switch( c ) { --- 98,102 ---- char **capa = NULL; /* capabilities */ ! while (( c = getopt( argc, argv, "%c:Fh:ilnNp:P:qrt:TU:vVw:x:y:z:Z:" )) != EOF ) { switch( c ) { *************** *** 149,152 **** --- 149,156 ---- break; + case 'P' : /* ca dir */ + caDir = optarg; + break; + case 'q': quiet = 1; *************** *** 193,197 **** case 'x' : /* ca file */ ! ca = optarg; break; --- 197,201 ---- case 'x' : /* ca file */ ! caFile = optarg; break; *************** *** 236,240 **** fprintf( stderr, "usage: lcreate [ -%%FlnNrTV ] [ -q | -v | -i ] " ); fprintf( stderr, "[ -c checksum ] " ); ! fprintf( stderr, "[ -h host ] [ -p port ] " ); fprintf( stderr, "[ -t stored-name ] [ -U user ] " ); fprintf( stderr, "[ -w auth-level ] [ -x ca-pem-file ] " ); --- 240,244 ---- fprintf( stderr, "usage: lcreate [ -%%FlnNrTV ] [ -q | -v | -i ] " ); fprintf( stderr, "[ -c checksum ] " ); ! fprintf( stderr, "[ -h host ] [ -p port ] [ -P ca-pem-directory ] " ); fprintf( stderr, "[ -t stored-name ] [ -U user ] " ); fprintf( stderr, "[ -w auth-level ] [ -x ca-pem-file ] " ); *************** *** 266,271 **** if ( authlevel != 0 ) { ! if ( tls_client_setup( use_randfile, authlevel, ca, cert, ! privatekey ) != 0 ) { /* error message printed in tls_setup */ exit( 2 ); --- 270,275 ---- if ( authlevel != 0 ) { ! if ( tls_client_setup( use_randfile, authlevel, caFile, caDir, ! cert, privatekey ) != 0 ) { /* error message printed in tls_setup */ exit( 2 ); Index: tls.c =================================================================== RCS file: /cvsroot/radmind/radmind/tls.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** tls.c 24 Jan 2006 20:43:52 -0000 1.21 --- tls.c 31 Jul 2007 02:55:37 -0000 1.22 *************** *** 41,45 **** extern struct timeval timeout; ! char *ca = _RADMIND_TLS_CA; char *cert = _RADMIND_TLS_CERT; char *privatekey = _RADMIND_TLS_CERT; --- 41,46 ---- extern struct timeval timeout; ! char *caFile = NULL; ! char *caDir = NULL; char *cert = _RADMIND_TLS_CERT; char *privatekey = _RADMIND_TLS_CERT; *************** *** 74,78 **** int ! tls_server_setup( int use_randfile, int authlevel, char *ca, char *cert, char *privatekey ) { extern SSL_CTX *ctx; --- 75,79 ---- int ! tls_server_setup( int use_randfile, int authlevel, char *caFile, char *caDir, char *cert, char *privatekey ) { extern SSL_CTX *ctx; *************** *** 114,124 **** if ( authlevel == 2 ) { ! /* Load CA */ ! if ( SSL_CTX_load_verify_locations( ctx, ca, NULL ) != 1 ) { ! fprintf( stderr, "SSL_CTX_load_verify_locations: %s: %s\n", ! ca, ERR_error_string( ERR_get_error(), NULL )); ! return( -1 ); } } /* Set level of security expecations */ if ( authlevel == 1 ) { --- 115,140 ---- if ( authlevel == 2 ) { ! /* Set default CA location of not specified */ ! if ( caFile == NULL && caDir == NULL ) { ! caFile = _RADMIND_TLS_CA; ! } ! ! /* Load CA */ ! if ( caFile != NULL ) { ! if ( SSL_CTX_load_verify_locations( ctx, caFile, NULL ) != 1 ) { ! fprintf( stderr, "SSL_CTX_load_verify_locations: %s: %s\n", ! caFile, ERR_error_string( ERR_get_error(), NULL )); ! return( -1 ); ! } ! } ! if ( caDir != NULL ) { ! if ( SSL_CTX_load_verify_locations( ctx, NULL, caDir ) != 1 ) { ! fprintf( stderr, "SSL_CTX_load_verify_locations: %s: %s\n", ! caDir, ERR_error_string( ERR_get_error(), NULL )); ! return( -1 ); ! } } } + /* Set level of security expecations */ if ( authlevel == 1 ) { *************** *** 134,138 **** int ! tls_client_setup( int use_randfile, int authlevel, char *ca, char *cert, char *privatekey ) { extern SSL_CTX *ctx; --- 150,154 ---- int ! tls_client_setup( int use_randfile, int authlevel, char *caFile, char *caDir, char *cert, char *privatekey ) { extern SSL_CTX *ctx; *************** *** 176,184 **** } /* Load CA */ ! if ( SSL_CTX_load_verify_locations( ctx, ca, NULL ) != 1 ) { ! fprintf( stderr, "SSL_CTX_load_verify_locations: %s: %s\n", ! ca, ERR_error_string( ERR_get_error(), NULL )); ! return( -1 ); } --- 192,214 ---- } + /* Set default CA location of not specified */ + if ( caFile == NULL && caDir == NULL ) { + caFile = _RADMIND_TLS_CA; + } + /* Load CA */ ! if ( caFile != NULL ) { ! if ( SSL_CTX_load_verify_locations( ctx, caFile, NULL ) != 1 ) { ! fprintf( stderr, "SSL_CTX_load_verify_locations: %s: %s\n", ! caFile, ERR_error_string( ERR_get_error(), NULL )); ! return( -1 ); ! } ! } ! if ( caDir != NULL ) { ! if ( SSL_CTX_load_verify_locations( ctx, NULL, caDir ) != 1 ) { ! fprintf( stderr, "SSL_CTX_load_verify_locations: %s: %s\n", ! caDir, ERR_error_string( ERR_get_error(), NULL )); ! return( -1 ); ! } } Index: ktcheck.c =================================================================== RCS file: /cvsroot/radmind/radmind/ktcheck.c,v retrieving revision 1.124 retrieving revision 1.125 diff -C2 -d -r1.124 -r1.125 *** ktcheck.c 11 Jul 2007 03:01:42 -0000 1.124 --- ktcheck.c 31 Jul 2007 02:55:36 -0000 1.125 *************** *** 78,82 **** extern struct timeval timeout; extern char *version, *checksumlist; ! extern char *ca, *cert, *privatekey; static void --- 78,82 ---- extern struct timeval timeout; extern char *version, *checksumlist; ! extern char *caFile, *caDir, *cert, *privatekey; static void *************** *** 561,565 **** char **capa = NULL; /* capabilities */ ! while (( c = getopt( argc, argv, "Cc:D:h:iK:np:qrvVw:x:y:z:Z:" )) != EOF ) { switch( c ) { case 'C': /* clean up dir containing command.K */ --- 561,566 ---- char **capa = NULL; /* capabilities */ ! while (( c = getopt( argc, argv, ! "Cc:D:h:iK:np:P:qrvVw:x:y:z:Z:" )) != EOF ) { switch( c ) { case 'C': /* clean up dir containing command.K */ *************** *** 606,609 **** --- 607,614 ---- } break; + + case 'P' : /* ca dir */ + caDir = optarg; + break; case 'q': *************** *** 638,642 **** case 'x' : /* ca file */ ! ca = optarg; break; --- 643,647 ---- case 'x' : /* ca file */ ! caFile = optarg; break; *************** *** 677,681 **** fprintf( stderr, "[ -c checksum ] [ -D radmind_path ] " ); fprintf( stderr, "[ -K command file ] " ); ! fprintf( stderr, "[ -h host ] [ -p port ] " ); fprintf( stderr, "[ -w auth-level ] [ -x ca-pem-file ] " ); fprintf( stderr, "[ -y cert-pem-file] [ -z key-pem-file ] " ); --- 682,686 ---- fprintf( stderr, "[ -c checksum ] [ -D radmind_path ] " ); fprintf( stderr, "[ -K command file ] " ); ! fprintf( stderr, "[ -h host ] [ -p port ] [ -P ca-pem-directory ] " ); fprintf( stderr, "[ -w auth-level ] [ -x ca-pem-file ] " ); fprintf( stderr, "[ -y cert-pem-file] [ -z key-pem-file ] " ); *************** *** 718,722 **** if ( authlevel != 0 ) { ! if ( tls_client_setup( use_randfile, authlevel, ca, cert, privatekey ) != 0 ) { /* error message printed in tls_setup */ --- 723,727 ---- if ( authlevel != 0 ) { ! if ( tls_client_setup( use_randfile, authlevel, caFile, caDir, cert, privatekey ) != 0 ) { /* error message printed in tls_setup */ Index: tls.h =================================================================== RCS file: /cvsroot/radmind/radmind/tls.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tls.h 12 Oct 2004 15:35:45 -0000 1.4 --- tls.h 31 Jul 2007 02:55:37 -0000 1.5 *************** *** 4,8 **** */ ! int tls_server_setup( int use_randfile, int authlevel, char *ca, char *cert, char *privatekey ); ! int tls_client_setup( int use_randfile, int authlevel, char *ca, char *cert, char *privatekey ); int tls_client_start( SNET *sn, char *host, int authlevel ); --- 4,8 ---- */ ! int tls_server_setup( int use_randfile, int authlevel, char *caFile, char *caDir, char *cert, char *privatekey ); ! int tls_client_setup( int use_randfile, int authlevel, char *caFile, char *caDir, char *cert, char *privatekey ); int tls_client_start( SNET *sn, char *host, int authlevel ); Index: lapply.c =================================================================== RCS file: /cvsroot/radmind/radmind/lapply.c,v retrieving revision 1.140 retrieving revision 1.141 diff -C2 -d -r1.140 -r1.141 *** lapply.c 11 Jul 2007 03:01:42 -0000 1.140 --- lapply.c 31 Jul 2007 02:55:36 -0000 1.141 *************** *** 65,69 **** SSL_CTX *ctx; ! extern char *ca, *cert, *privatekey; struct node { --- 65,69 ---- SSL_CTX *ctx; ! extern char *caFile, *caDir, *cert, *privatekey; struct node { *************** *** 254,258 **** while (( c = getopt( argc, argv, ! "%c:CFh:iInp:qru:Vvw:x:y:z:Z:" )) != EOF ) { switch( c ) { case '%': --- 254,258 ---- while (( c = getopt( argc, argv, ! "%c:CFh:iInp:P:qru:Vvw:x:y:z:Z:" )) != EOF ) { switch( c ) { case '%': *************** *** 304,307 **** --- 304,311 ---- break; + case 'P' : /* ca dir */ + caDir = optarg; + break; + case 'q': quiet = 1; *************** *** 339,343 **** case 'x' : /* ca file */ ! ca = optarg; break; --- 343,347 ---- case 'x' : /* ca file */ ! caFile = optarg; break; *************** *** 403,407 **** argv[ 0 ] ); fprintf( stderr, "[ -c checksum ] [ -h host ] [ -p port ] " ); ! fprintf( stderr, "[ -u umask ] " ); fprintf( stderr, "[ -w auth-level ] [ -x ca-pem-file ] " ); fprintf( stderr, "[ -y cert-pem-file ] [ -z key-pem-file ] " ); --- 407,411 ---- argv[ 0 ] ); fprintf( stderr, "[ -c checksum ] [ -h host ] [ -p port ] " ); ! fprintf( stderr, "[ -P ca-pem-directory ] [ -u umask ] " ); fprintf( stderr, "[ -w auth-level ] [ -x ca-pem-file ] " ); fprintf( stderr, "[ -y cert-pem-file ] [ -z key-pem-file ] " ); *************** *** 416,420 **** if ( authlevel != 0 ) { ! if ( tls_client_setup( use_randfile, authlevel, ca, cert, privatekey ) != 0 ) { /* error message printed in tls_setup */ --- 420,424 ---- if ( authlevel != 0 ) { ! if ( tls_client_setup( use_randfile, authlevel, caFile, caDir, cert, privatekey ) != 0 ) { /* error message printed in tls_setup */ Index: lfdiff.c =================================================================== RCS file: /cvsroot/radmind/radmind/lfdiff.c,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** lfdiff.c 11 Jul 2007 03:01:42 -0000 1.60 --- lfdiff.c 31 Jul 2007 02:55:36 -0000 1.61 *************** *** 51,55 **** SSL_CTX *ctx; ! extern char *ca, *cert, *privatekey; static struct transcript * --- 51,55 ---- SSL_CTX *ctx; ! extern char *caFile, *caDir, *cert, *privatekey; static struct transcript * *************** *** 156,161 **** diffargv[ diffargc++ ] = diff; ! while (( c = getopt ( argc, argv, "h:Ip:rST:u:Vvw:x:y:z:Z:bitcefnC:D:sX:" )) ! != EOF ) { switch( c ) { case 'I': --- 156,161 ---- diffargv[ diffargc++ ] = diff; ! while (( c = getopt ( argc, argv, ! "h:Ip:P:rST:u:Vvw:x:y:z:Z:bitcefnC:D:sX:" )) != EOF ) { switch( c ) { case 'I': *************** *** 177,180 **** --- 177,184 ---- break; + case 'P' : /* ca dir */ + caDir = optarg; + break; + case 'r': use_randfile = 1; *************** *** 215,219 **** case 'x' : /* ca file */ ! ca = optarg; break; --- 219,223 ---- case 'x' : /* ca file */ ! caFile = optarg; break; *************** *** 328,332 **** fprintf( stderr, "[ -IrvV ] " ); fprintf( stderr, "[ -T transcript | -S ] " ); ! fprintf( stderr, "[ -h host ] [ -p port ] [ -u umask ] " ); fprintf( stderr, "[ -w auth-level ] [ -x ca-pem-file ] " ); fprintf( stderr, "[ -y cert-pem-file] [ -z key-pem-file ] " ); --- 332,337 ---- fprintf( stderr, "[ -IrvV ] " ); fprintf( stderr, "[ -T transcript | -S ] " ); ! fprintf( stderr, "[ -h host ] [ -p port ] [ -P ca-pem-directory ] " ); ! fprintf( stderr, "[ -u umask ] " ); fprintf( stderr, "[ -w auth-level ] [ -x ca-pem-file ] " ); fprintf( stderr, "[ -y cert-pem-file] [ -z key-pem-file ] " ); *************** *** 340,344 **** if ( authlevel != 0 ) { ! if ( tls_client_setup( use_randfile, authlevel, ca, cert, privatekey ) != 0 ) { /* error message printed in tls_setup */ --- 345,349 ---- if ( authlevel != 0 ) { ! if ( tls_client_setup( use_randfile, authlevel, caFile, caDir, cert, privatekey ) != 0 ) { /* error message printed in tls_setup */ |
From: Patrick M. <ume...@us...> - 2007-07-31 02:55:41
|
Update of /cvsroot/radmind/radmind/man In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6324/man Modified Files: ktcheck.1 lapply.1 lcreate.1 lfdiff.1 radmind.8 repo.1 Log Message: Added -P option that allows you to specifies a directory that contains certificates to be used when verifying the peer. Certificates must be in PEM format and the directory must have been processed with the openssl c_rehash utility. Index: repo.1 =================================================================== RCS file: /cvsroot/radmind/radmind/man/repo.1,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** repo.1 27 Feb 2007 15:36:54 -0000 1.3 --- repo.1 31 Jul 2007 02:55:37 -0000 1.4 *************** *** 53,56 **** --- 53,60 ---- .B 6662. .TP 19 + .BI \-P\ ca-pem-directory + specifies a directory that contains certificates to be used when verifying the server. Certificates must be in PEM format and the directory must have been + processed with the openssl c_rehash utility. + .TP 19 .B \-V displays the version of *************** *** 67,70 **** --- 71,75 ---- .BI \-x\ ca-pem-file Certificate authority's public certificate, by default _RADMIND_TLS_CA. + The default is not used when -P is specified. .TP 19 .BI \-y\ cert-pem-file Index: lcreate.1 =================================================================== RCS file: /cvsroot/radmind/radmind/man/lcreate.1,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** lcreate.1 31 Jan 2006 21:18:24 -0000 1.21 --- lcreate.1 31 Jul 2007 02:55:37 -0000 1.22 *************** *** 15,18 **** --- 15,20 ---- .BI \-p\ port ] [ + .BI \-P\ ca-pem-directory + ] [ .BI \-t\ stored-name ] [ *************** *** 121,124 **** --- 123,130 ---- .BR 6662 . .TP 19 + .BI \-P\ ca-pem-directory + specifies a directory that contains certificates to be used when verifying the server. Certificates must be in PEM format and the directory must have been + processed with the openssl c_rehash utility. + .TP 19 .B \-q suppress all messages. *************** *** 160,163 **** --- 166,170 ---- .BI \-x\ ca-pem-file Certificate authority's public certificate, by default _RADMIND_TLS_CA. + The default is not used when -P is specified. .TP 19 .BI \-y\ cert-pem-file Index: ktcheck.1 =================================================================== RCS file: /cvsroot/radmind/radmind/man/ktcheck.1,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ktcheck.1 26 Mar 2007 18:56:53 -0000 1.18 --- ktcheck.1 31 Jul 2007 02:55:37 -0000 1.19 *************** *** 19,22 **** --- 19,24 ---- .BI \-p\ port ] [ + .BI \-P\ ca-pem-directory + ] [ .BI \-w\ auth-level ] [ *************** *** 99,102 **** --- 101,109 ---- .B 6662. .TP 19 + .BI \-P\ ca-pem-directory + specifies a directory that contains certificates to be used when verifying the + server. Certificates must be in PEM format and the directory must have been + processed with the openssl c_rehash utility. + .TP 19 .B \-q suppress all messages. *************** *** 121,125 **** .TP 19 .BI \-x\ ca-pem-file ! Certificate authority's public certificate, by default _RADMIND_TLS_CA. .TP 19 .BI \-y\ cert-pem-file --- 128,133 ---- .TP 19 .BI \-x\ ca-pem-file ! Certificate authority's public certificate, by default _RADMIND_TLS_CA. ! The default is not used when -P is specified. .TP 19 .BI \-y\ cert-pem-file Index: radmind.8 =================================================================== RCS file: /cvsroot/radmind/radmind/man/radmind.8,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** radmind.8 25 May 2007 14:29:22 -0000 1.40 --- radmind.8 31 Jul 2007 02:55:37 -0000 1.41 *************** *** 20,23 **** --- 20,25 ---- .BI \-m\ max-connections ] [ + .BI \-P\ ca-directory + ] [ .BI \-p\ port ] [ *************** *** 233,236 **** --- 235,242 ---- .BR 6662 . .TP 19 + .BI \-P\ ca-directory + specifies a directory that contains certificates to be used when verifying a client. Certificates must be in PEM format and the directory must have been + processed with the openssl c_rehash utility. + .TP 19 .B \-r use random seed file $RANDFILE if that environment variable is set, *************** *** 258,261 **** --- 264,268 ---- .BI \-x\ ca-pem-file Certificate authority's public certificate, by default _RADMIND_TLS_CA. + The default is not used when -P is specified. .TP 19 .BI \-y\ cert-pem-file Index: lfdiff.1 =================================================================== RCS file: /cvsroot/radmind/radmind/man/lfdiff.1,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** lfdiff.1 31 Jan 2006 21:18:24 -0000 1.14 --- lfdiff.1 31 Jul 2007 02:55:37 -0000 1.15 *************** *** 16,19 **** --- 16,21 ---- .BI \-p\ port ] [ + .BI \-P\ ca-pem-directory + ] [ .BI \-u\ umask ] [ *************** *** 77,80 **** --- 79,86 ---- .BR 6662 . .TP 19 + .BI \-P\ ca-pem-directory + specifies a directory that contains certificates to be used when verifying the server. Certificates must be in PEM format and the directory must have been + processed with the openssl c_rehash utility. + .TP 19 .B \-r use random seed file $RANDFILE if that environment variable is set, *************** *** 115,118 **** --- 121,125 ---- .BI \-y\ cert-pem-file Client's public certificate, by default _RADMIND_TLS_CERT. + The default is not used when -P is specified. .TP 19 .BI \-z\ private-key-file Index: lapply.1 =================================================================== RCS file: /cvsroot/radmind/radmind/man/lapply.1,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** lapply.1 11 Jul 2007 03:01:43 -0000 1.17 --- lapply.1 31 Jul 2007 02:55:37 -0000 1.18 *************** *** 15,18 **** --- 15,20 ---- .BI \-p\ port ] [ + .BI \-P\ ca-pem-directory + ] [ .BI \-u\ umask ] [ *************** *** 108,111 **** --- 110,117 ---- .BR 6662 . .TP 19 + .BI \-P\ ca-pem-directory + specifies a directory that contains certificates to be used when verifying the server. Certificates must be in PEM format and the directory must have been + processed with the openssl c_rehash utility. + .TP 19 .B \-q suppress all messages. *************** *** 133,136 **** --- 139,143 ---- .BI \-x\ ca-pem-file Certificate authority's public certificate, by default _RADMIND_TLS_CA. + The default is not used when -P is specified. .TP 19 .BI \-y\ cert-pem-file |
From: Patrick M. <ume...@us...> - 2007-07-29 17:58:01
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13214 Modified Files: update.c Log Message: Added missing include for mkprefix.h Index: update.c =================================================================== RCS file: /cvsroot/radmind/radmind/update.c,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** update.c 11 Jul 2007 03:01:42 -0000 1.47 --- update.c 29 Jul 2007 17:57:58 -0000 1.48 *************** *** 30,33 **** --- 30,34 ---- #include "progress.h" #include "mkdirs.h" + #include "mkprefix.h" extern int quiet; |