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...> - 2008-04-01 13:39:10
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24080 Modified Files: ra.sh Log Message: If PAGER is set, use it to display difference transcript. Index: ra.sh =================================================================== RCS file: /cvsroot/radmind/radmind/ra.sh,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** ra.sh 19 Nov 2007 02:46:18 -0000 1.41 --- ra.sh 1 Apr 2008 13:39:05 -0000 1.42 *************** *** 28,31 **** --- 28,32 ---- TLSLEVEL="_RADMIND_AUTHLEVEL" EDITOR=${EDITOR:-vi} + PAGER=${PAGER:-cat} USER=${SUDO_USER:-$USER} TMPDIR="${TMPDIR:=/tmp}" *************** *** 188,192 **** fi if [ x"$opt" = x"interactive" ]; then ! cat ${FTMP} infocmp >/dev/null 2>&1 if [ $? -eq 0 ]; then --- 189,193 ---- fi if [ x"$opt" = x"interactive" ]; then ! ${PAGER} ${FTMP} infocmp >/dev/null 2>&1 if [ $? -eq 0 ]; then |
From: Andrew M. <fit...@us...> - 2008-03-30 14:07:40
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6150 Modified Files: RSMLoadsetManager.m Log Message: Fixed destination path construction for loadset checkin. Index: RSMLoadsetManager.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMLoadsetManager.m,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** RSMLoadsetManager.m 18 Mar 2008 21:20:35 -0000 1.48 --- RSMLoadsetManager.m 30 Mar 2008 14:07:30 -0000 1.49 *************** *** 635,639 **** } ! newpath = [ NSString stringWithFormat: @"%@/%@/transcript", [ NSWorkspace radmindServerDirectory ], [ loadsetPath lastPathComponent ]]; --- 635,639 ---- } ! newpath = [ NSString stringWithFormat: @"%@/transcript/%@", [ NSWorkspace radmindServerDirectory ], [ loadsetPath lastPathComponent ]]; |
From: Andrew M. <fit...@us...> - 2008-03-24 18:43:47
|
Update of /cvsroot/radmind/radmind/man In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv400/man Modified Files: radmind.8 Log Message: Accepted patch [ 1919220 ]: Includes in config file. Index: radmind.8 =================================================================== RCS file: /cvsroot/radmind/radmind/man/radmind.8,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** radmind.8 29 Nov 2007 17:21:59 -0000 1.43 --- radmind.8 24 Mar 2008 18:43:42 -0000 1.44 *************** *** 80,83 **** --- 80,106 ---- listed in their base command file as determined by the config file. + .sp + _RADMIND_PATH/config can include other config files using the keyword + "@include", which can be used in two ways. The first is a simple include + of another file. If the path does not begin with a slash (/), the path is + interpreted as being relative to _RADMIND_PATH. For example: + .sp + .br + @include configs/ldap-servers.config + .br + .sp + which would cause every connecting client to be checked against the contents + of _RADMIND_PATH/configs/ldap-servers.config. The @include keyword can also + take an optional third argument, a wildcard pattern limiting which clients + will read the included config file. For example: + .sp + .br + @include configs/kerberos-kdcs.config *.kerberos.example.edu + .br + .sp + would cause only clients with FQDNs matching '*.kerberos.example.edu' to + read the included file. The wildcard is checked, in order, against the + client's certificate CN (if the client presents one), the client's + fully-qualified domain name, and the client's IP address. .SH DIRECTORY STRUCTURE .TP 19 |
From: Andrew M. <fit...@us...> - 2008-03-24 18:43:47
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv400 Modified Files: command.c command.h Log Message: Accepted patch [ 1919220 ]: Includes in config file. Index: command.h =================================================================== RCS file: /cvsroot/radmind/radmind/command.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** command.h 20 Jul 2004 18:45:41 -0000 1.14 --- command.h 24 Mar 2008 18:43:42 -0000 1.15 *************** *** 5,9 **** int cmdloop( int, struct sockaddr_in * ); ! int command_k( char * ); char **special_t( char *, char * ); int keyword( int, char*[] ); --- 5,9 ---- int cmdloop( int, struct sockaddr_in * ); ! int command_k( char *, int ); char **special_t( char *, char * ); int keyword( int, char*[] ); Index: command.c =================================================================== RCS file: /cvsroot/radmind/radmind/command.c,v retrieving revision 1.139 retrieving revision 1.140 diff -C2 -d -r1.139 -r1.140 *** command.c 3 Nov 2007 15:25:45 -0000 1.139 --- command.c 24 Mar 2008 18:43:42 -0000 1.140 *************** *** 58,61 **** --- 58,63 ---- #include "connect.h" + #define RADMIND_MAX_INCLUDE_DEPTH 10 + #define DEFAULT_MODE 0444 #define DEFAULT_UID 0 *************** *** 995,999 **** /* get command file */ ! if ( command_k( "config" ) < 0 ) { /* Client not in config */ commands = noauth; --- 997,1001 ---- /* get command file */ ! if ( command_k( "config", 0 ) < 0 ) { /* Client not in config */ commands = noauth; *************** *** 1212,1223 **** /* sets command file for connected host */ int ! command_k( char *path_config ) { SNET *sn; char **av, *line, *p; char temp[ MAXPATHLEN ]; int ac; int linenum = 0; --- 1214,1241 ---- + static char * + match_config_entry( char *entry ) + { + if (( remote_cn != NULL ) && wildcard( entry, remote_cn, 0 )) { + return( remote_cn ); + } else if ( wildcard( entry, remote_host, 0 )) { + return( remote_host ); + } else if ( wildcard( entry, remote_addr, 1 )) { + return( remote_addr ); + } + + return( NULL ); + } + /* sets command file for connected host */ int ! command_k( char *path_config, int depth ) { SNET *sn; char **av, *line, *p; + char *valid_host; char temp[ MAXPATHLEN ]; int ac; + int rc = -1; int linenum = 0; *************** *** 1232,1236 **** if (( ac = argcargv( line, &av )) < 0 ) { syslog( LOG_ERR, "argvargc: %m" ); ! return( -1 ); } --- 1250,1254 ---- if (( ac = argcargv( line, &av )) < 0 ) { syslog( LOG_ERR, "argvargc: %m" ); ! goto command_k_done; } *************** *** 1238,1244 **** continue; } ! if (( ac < 2 ) || (( ac > 2 ) && ( *av[ 2 ] != '#' ))) { ! syslog( LOG_ERR, "config file: line %d: invalid number of " ! "arguments", linenum ); continue; } --- 1256,1292 ---- continue; } ! if ( ac < 2 ) { ! syslog( LOG_ERR, "%s: line %d: invalid number of arguments", ! path_config, linenum ); ! continue; ! } ! if ( strcmp( av[ 0 ], "@include" ) == 0 ) { ! depth++; ! if ( depth > RADMIND_MAX_INCLUDE_DEPTH ) { ! syslog( LOG_ERR, "%s: line %d: include %s exceeds max depth", ! path_config, linenum, av[ 1 ] ); ! goto command_k_done; ! } ! if ( ac > 3 ) { ! syslog( LOG_ERR, "%s: line %d: invalid number of arguments", ! path_config, linenum ); ! continue; ! } else if ( ac == 3 ) { ! if ( match_config_entry( av[ 2 ] ) == NULL ) { ! /* connecting host doesn't match pattern, skip include. */ ! continue; ! } ! } ! if ( command_k( av[ 1 ], depth ) != 0 ) { ! continue; ! } ! ! rc = 0; ! goto command_k_done; ! } ! ! if (( ac > 2 ) && ( *av[ 2 ] != '#' )) { ! syslog( LOG_ERR, "%s: line %d: invalid number of arguments", ! path_config, linenum ); continue; } *************** *** 1257,1261 **** } ! if (( remote_cn != NULL ) && wildcard( av[ 0 ], remote_cn, 0 )) { if ( strlen( av[ 1 ] ) >= MAXPATHLEN ) { syslog( LOG_ERR, --- 1305,1309 ---- } ! if (( valid_host = match_config_entry( av[ 0 ] )) != NULL ) { if ( strlen( av[ 1 ] ) >= MAXPATHLEN ) { syslog( LOG_ERR, *************** *** 1265,1269 **** strcpy( command_file, av[ 1 ] ); if ( snprintf( temp, MAXPATHLEN, "%s/%s", special_dir, ! remote_cn ) >= MAXPATHLEN ) { syslog( LOG_ERR, "config file: line %d: special dir too long\n", linenum ); --- 1313,1317 ---- strcpy( command_file, av[ 1 ] ); if ( snprintf( temp, MAXPATHLEN, "%s/%s", special_dir, ! valid_host ) >= MAXPATHLEN ) { syslog( LOG_ERR, "config file: line %d: special dir too long\n", linenum ); *************** *** 1271,1315 **** } strcpy( special_dir, temp ); ! return( 0 ); } - if ( wildcard( av[ 0 ], remote_host, 0 )) { - if ( strlen( av[ 1 ] ) >= MAXPATHLEN ) { - syslog( LOG_ERR, - "config file: line %d: command file too long\n", linenum ); - continue; - } - strcpy( command_file, av[ 1 ] ); - if ( snprintf( temp, MAXPATHLEN, "%s/%s", special_dir, - remote_host ) >= MAXPATHLEN ) { - syslog( LOG_ERR, "config file: line %d: special dir too long\n", - linenum ); - continue; - } - strcpy( special_dir, temp ); - return( 0 ); - } - if ( wildcard( av[ 0 ], remote_addr, 1 )) { - if ( strlen( av[ 1 ] ) >= MAXPATHLEN ) { - syslog( LOG_ERR, - "config file: line %d: command file too long\n", linenum ); - continue; - } - strcpy( command_file, av[ 1 ] ); - if ( snprintf( temp, MAXPATHLEN, "%s/%s", special_dir, - remote_addr ) >= MAXPATHLEN ) { - syslog( LOG_ERR, "config file: line %d: special dir too long\n", - linenum ); - continue; - } - strcpy( special_dir, temp ); - return( 0 ); - } } /* If we get here, the host that connected is not in the config file. So screw him. */ - syslog( LOG_ERR, "host not in config file: %s", remote_host ); ! return( -1 ); } --- 1319,1334 ---- } strcpy( special_dir, temp ); ! rc = 0; ! goto command_k_done; } } /* If we get here, the host that connected is not in the config file. So screw him. */ syslog( LOG_ERR, "host not in config file: %s", remote_host ); ! ! command_k_done: ! snet_close( sn ); ! return( rc ); } *************** *** 1514,1518 **** if ( authlevel == 0 ) { /* lookup proper command file based on the hostname, IP or CN */ ! if ( command_k( "config" ) < 0 ) { syslog( LOG_INFO, "%s: Access denied: Not in config file", remote_host ); --- 1533,1537 ---- if ( authlevel == 0 ) { /* lookup proper command file based on the hostname, IP or CN */ ! if ( command_k( "config", 0 ) < 0 ) { syslog( LOG_INFO, "%s: Access denied: Not in config file", remote_host ); |
From: Andrew M. <fit...@us...> - 2008-03-21 20:26:29
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10572 Modified Files: configure aclocal.m4 Log Message: Universal binary builds on OS X 10.5 can now run on 10.4. Removed obsolete CHECK_ZEROCONF macro. Index: aclocal.m4 =================================================================== RCS file: /cvsroot/radmind/radmind/aclocal.m4,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** aclocal.m4 18 Jan 2008 18:46:18 -0000 1.19 --- aclocal.m4 21 Mar 2008 20:26:23 -0000 1.20 *************** *** 88,114 **** ]) - AC_DEFUN([CHECK_ZEROCONF], - [ - AC_MSG_CHECKING(for zeroconf) - zeroconfdirs="/usr /usr/local" - AC_ARG_WITH(zeroconf, - AC_HELP_STRING([--with-zeroconf=DIR], [path to zeroconf]), - zeroconfdirs="$withval") - for dir in $zeroconfdirs; do - zcdir="$dir" - if test -f "$dir/include/DNSServiceDiscovery/DNSServiceDiscovery.h"; then - found_zeroconf="yes"; - CPPFLAGS="$CPPFLAGS -I$zcdir/include"; - break; - fi - done - if test x_$found_zeroconf != x_yes; then - AC_MSG_RESULT(no) - else - AC_DEFINE(HAVE_ZEROCONF) - AC_MSG_RESULT(yes) - fi - ]) - AC_DEFUN([SET_NO_SASL], [ --- 88,91 ---- *************** *** 129,133 **** darwin9*) ! export MACOSX_DEPLOYMENT_TARGET="10.4" macosx_sdk="MacOSX10.5.sdk" ;; --- 106,110 ---- darwin9*) ! dep_target="-mmacosx-version-min=10.4" macosx_sdk="MacOSX10.5.sdk" ;; *************** *** 141,145 **** echo Setting up universal binaries for ${host_os} echo =========================================================== ! OPTOPTS="$OPTOPTS -isysroot /Developer/SDKs/$macosx_sdk -arch i386 -arch ppc" fi ]) --- 118,122 ---- echo Setting up universal binaries for ${host_os} echo =========================================================== ! OPTOPTS="$OPTOPTS -isysroot /Developer/SDKs/$macosx_sdk -arch i386 -arch ppc $dep_target" fi ]) Index: configure =================================================================== RCS file: /cvsroot/radmind/radmind/configure,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** configure 12 Mar 2008 17:15:55 -0000 1.55 --- configure 21 Mar 2008 20:26:23 -0000 1.56 *************** *** 6091,6095 **** darwin9*) ! export MACOSX_DEPLOYMENT_TARGET="10.4" macosx_sdk="MacOSX10.5.sdk" ;; --- 6091,6095 ---- darwin9*) ! dep_target="-mmacosx-version-min=10.4" macosx_sdk="MacOSX10.5.sdk" ;; *************** *** 6105,6109 **** echo Setting up universal binaries for ${host_os} echo =========================================================== ! OPTOPTS="$OPTOPTS -isysroot /Developer/SDKs/$macosx_sdk -arch i386 -arch ppc" fi --- 6105,6109 ---- echo Setting up universal binaries for ${host_os} echo =========================================================== ! OPTOPTS="$OPTOPTS -isysroot /Developer/SDKs/$macosx_sdk -arch i386 -arch ppc $dep_target" fi |
From: Andrew M. <fit...@us...> - 2008-03-18 21:24:06
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv28360 Modified Files: rsmauthtool.c Log Message: Don't make the radmind directory until we've parsed options. Index: rsmauthtool.c =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/rsmauthtool.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** rsmauthtool.c 1 Aug 2006 15:57:02 -0000 1.16 --- rsmauthtool.c 18 Mar 2008 21:23:59 -0000 1.17 *************** *** 563,568 **** } - makedir( radmind_path ); - while (( c = getopt( argc, argv, "A:D:d:U:" )) != EOF ) { switch ( c ) { --- 563,566 ---- *************** *** 593,596 **** --- 591,596 ---- } + makedir( radmind_path ); + if ( user != NULL ) { /* become user for the session, if specified */ |
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26694 Modified Files: RAServerController.h RAServerController.m RSMLoadsetEditor.m RSMLoadsetManager.m Added Files: NSWorkspace-Radmind.h NSWorkspace-Radmind.m Log Message: Eliminated hard-coded references to /var/radmind. Use RadmindServerDirectoryPath preference settings. Index: RAServerController.h =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RAServerController.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RAServerController.h 6 Dec 2007 21:43:18 -0000 1.6 --- RAServerController.h 18 Mar 2008 21:20:35 -0000 1.7 *************** *** 7,12 **** #import "RASTableView.h" - #define SERVERCONF @"/var/radmind/config" - #define RASToolbarRefreshIdentifier @"refresh" #define RASToolbarSaveConfigIdentifier @"saveconfig" --- 7,10 ---- Index: RAServerController.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RAServerController.m,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** RAServerController.m 6 Dec 2007 21:43:18 -0000 1.21 --- RAServerController.m 18 Mar 2008 21:20:35 -0000 1.22 *************** *** 14,17 **** --- 14,18 ---- #import "NSFileManager(mktemp).h" + #import "NSWorkspace-Radmind.h" #include <sys/types.h> *************** *** 170,182 **** - ( void )awakeFromNib { - if ( access( "/var/radmind/config", F_OK ) < 0 ) { - NSRunCriticalAlertPanel( @"No config file found.", - @"You don't seem to have set up this machine to be a radmind server. " - @"To set it up as a server, run the Radmind Assistant, and choose " - @"\"Radmind Setup\" from the Session menu.", - @"Quit", @"", @"" ); - exit( 1 ); - } - [ NSApp setDelegate: self ]; [ loadsetManager setDelegate: self ]; --- 171,174 ---- *************** *** 440,444 **** @"-d", [ self sessionTmpDirectory ], @"--", [ NSString stringWithUTF8String: tmpconfpath ], ! [ NSString stringWithFormat: @"%@/config", @"/var/radmind" ], nil ]]; } --- 432,437 ---- @"-d", [ self sessionTmpDirectory ], @"--", [ NSString stringWithUTF8String: tmpconfpath ], ! [ NSString stringWithFormat: @"%@/config", ! [ NSWorkspace radmindServerDirectory ]], nil ]]; } *************** *** 548,556 **** @"-A", @"RefreshAllPlists", @"-d", [ self sessionTmpDirectory ], ! @"/var/radmind", nil ]]; } - ( IBAction )reloadConfigFile: ( id )sender ! { if ( [ self isConfigFileEdited ] ) { int rc; --- 541,549 ---- @"-A", @"RefreshAllPlists", @"-d", [ self sessionTmpDirectory ], ! [ NSWorkspace radmindServerDirectory ], nil ]]; } - ( IBAction )reloadConfigFile: ( id )sender ! { if ( [ self isConfigFileEdited ] ) { int rc; *************** *** 587,591 **** @"-A", @"RefreshConfig", @"-d", [ self sessionTmpDirectory ], ! @"/var/radmind", nil ]]; } --- 580,584 ---- @"-A", @"RefreshConfig", @"-d", [ self sessionTmpDirectory ], ! [ NSWorkspace radmindServerDirectory ], nil ]]; } --- NEW FILE: NSWorkspace-Radmind.m --- /* * Copyright (c) 2008 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. */ #import "NSWorkspace-Radmind.h" @implementation NSWorkspace(Radmind) + ( NSString * )radmindServerDirectory { NSString *radmindDirectory; radmindDirectory = [[ NSUserDefaults standardUserDefaults ] objectForKey: @"RadmindServerDirectoryPath" ]; if ( radmindDirectory == nil ) { radmindDirectory = @"/var/radmind"; } return( radmindDirectory ); } @end Index: RSMLoadsetEditor.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMLoadsetEditor.m,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** RSMLoadsetEditor.m 6 Dec 2007 21:54:19 -0000 1.21 --- RSMLoadsetEditor.m 18 Mar 2008 21:20:35 -0000 1.22 *************** *** 5,8 **** --- 5,10 ---- #import "RSMTranscriptTitleCell.h" + #import "NSWorkspace-Radmind.h" + #include <sys/types.h> #include <sys/param.h> *************** *** 353,357 **** @"-A", @"RefreshCommandFilePlist", @"-d", [[ self delegate ] sessionTmpDirectory ], ! @"/var/radmind", nil ] controller: self ]; } --- 355,359 ---- @"-A", @"RefreshCommandFilePlist", @"-d", [[ self delegate ] sessionTmpDirectory ], ! [ NSWorkspace radmindServerDirectory ], nil ] controller: self ]; } *************** *** 622,626 **** if ( row < 0 || ( item = [ allCommandFilesTable itemAtRow: row ] ) == nil ) { ! path = [ NSString stringWithFormat: @"%@", @"/var/radmind/command" ]; } else { path = [ item objectForKey: @"RadmindServerItemPath" ]; --- 624,629 ---- if ( row < 0 || ( item = [ allCommandFilesTable itemAtRow: row ] ) == nil ) { ! path = [ NSString stringWithFormat: @"%@/command", ! [ NSWorkspace radmindServerDirectory ]]; } else { path = [ item objectForKey: @"RadmindServerItemPath" ]; *************** *** 837,841 **** [ self dismissNewKFileSheet: nil ]; ! dst = [ NSString stringWithFormat: @"%@/%@", @"/var/radmind/command", [ newCommandFileNameField stringValue ]]; --- 840,845 ---- [ self dismissNewKFileSheet: nil ]; ! dst = [ NSString stringWithFormat: @"%@/command/%@", ! [ NSWorkspace radmindServerDirectory ], [ newCommandFileNameField stringValue ]]; *************** *** 849,853 **** fileArgs = [ NSArray arrayWithObject: dst ]; } else { ! src = [ NSString stringWithFormat: @"%@/%@", @"/var/radmind/command", [ newCommandFileContents titleOfSelectedItem ]]; fileArgs = [ NSArray arrayWithObjects: src, dst, nil ]; --- 853,858 ---- fileArgs = [ NSArray arrayWithObject: dst ]; } else { ! src = [ NSString stringWithFormat: @"%@/command/%@", ! [ NSWorkspace radmindServerDirectory ], [ newCommandFileContents titleOfSelectedItem ]]; fileArgs = [ NSArray arrayWithObjects: src, dst, nil ]; *************** *** 1368,1373 **** if ( realItem == nil ) { ! kfileDir = [ NSString stringWithFormat: ! @"%@/command", @"/var/radmind" ]; realItem = [ NSDictionary dictionaryWithObjectsAndKeys: --- 1373,1378 ---- if ( realItem == nil ) { ! kfileDir = [ NSString stringWithFormat: @"%@/command", ! [ NSWorkspace radmindServerDirectory ]]; realItem = [ NSDictionary dictionaryWithObjectsAndKeys: *************** *** 1398,1403 **** if ( realItem == nil ) { ! kfileDir = [ NSString stringWithFormat: ! @"%@/command", @"/var/radmind" ]; realItem = [ NSDictionary dictionaryWithObjectsAndKeys: --- 1403,1408 ---- if ( realItem == nil ) { ! kfileDir = [ NSString stringWithFormat: @"%@/command", ! [ NSWorkspace radmindServerDirectory ]]; realItem = [ NSDictionary dictionaryWithObjectsAndKeys: *************** *** 1535,1539 **** [ self moveCommandFileAtPath: [ draggedItem objectForKey: @"RadmindServerItemPath" ] toPath: [ NSString stringWithFormat: @"%@/command/%@", ! @"/var/radmind", [ draggedItem objectForKey: @"RadmindServerItemName" ]]]; return( YES ); --- 1540,1544 ---- [ self moveCommandFileAtPath: [ draggedItem objectForKey: @"RadmindServerItemPath" ] toPath: [ NSString stringWithFormat: @"%@/command/%@", ! [ NSWorkspace radmindServerDirectory ], [ draggedItem objectForKey: @"RadmindServerItemName" ]]]; return( YES ); --- NEW FILE: NSWorkspace-Radmind.h --- /* * Copyright (c) 2008 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. */ #import <Cocoa/Cocoa.h> @interface NSWorkspace(Radmind) + ( NSString * )radmindServerDirectory; @end Index: RSMLoadsetManager.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMLoadsetManager.m,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** RSMLoadsetManager.m 18 Mar 2008 19:49:33 -0000 1.47 --- RSMLoadsetManager.m 18 Mar 2008 21:20:35 -0000 1.48 *************** *** 9,12 **** --- 9,13 ---- #import "RSMLoadsetEditor.h" #import "NSTextView(LogMessage).h" + #import "NSWorkspace-Radmind.h" #include <sys/types.h> *************** *** 619,624 **** --- 620,629 ---- { NSString *loadsetPath; + NSString *radmindDirectory; NSString *newpath = nil; + radmindDirectory = [[ NSUserDefaults standardUserDefaults ] + objectForKey: @"RadmindServerDirectoryPath" ]; + if ( [ loadset isKindOfClass: [ NSDictionary class ]] ) { loadsetPath = [ loadset objectForKey: @"RadmindServerItemPath" ]; *************** *** 630,635 **** } ! newpath = [ NSString stringWithFormat: @"%@/%@", @"/var/radmind/transcript", ! [ loadsetPath lastPathComponent ]]; [ self setCurrentCommand: RA_TRANSCRIPT_CHECKIN ]; --- 635,641 ---- } ! newpath = [ NSString stringWithFormat: @"%@/%@/transcript", ! [ NSWorkspace radmindServerDirectory ], ! [ loadsetPath lastPathComponent ]]; [ self setCurrentCommand: RA_TRANSCRIPT_CHECKIN ]; *************** *** 711,715 **** if ( row < 0 || ( item = [ transcriptTable itemAtRow: row ] ) == nil ) { ! path = [ NSString stringWithFormat: @"%@", @"/var/radmind/transcript" ]; } else { path = [ item objectForKey: @"RadmindServerItemPath" ]; --- 717,722 ---- if ( row < 0 || ( item = [ transcriptTable itemAtRow: row ] ) == nil ) { ! path = [ NSString stringWithFormat: @"%@/transcript", ! [ NSWorkspace radmindServerDirectory ]]; } else { path = [ item objectForKey: @"RadmindServerItemPath" ]; *************** *** 1095,1100 **** switch ( mergetype ) { case 1: ! newLoadsetName = [ NSString stringWithFormat: @"/var/radmind/transcript/%@", ! [ newMergeNameField stringValue ]]; [ self setCurrentCommand: RA_LOADSET_MERGE ]; --- 1102,1108 ---- switch ( mergetype ) { case 1: ! newLoadsetName = [ NSString stringWithFormat: @"%@/transcript/%@", ! [ NSWorkspace radmindServerDirectory ], ! [ newMergeNameField stringValue ]]; [ self setCurrentCommand: RA_LOADSET_MERGE ]; *************** *** 1244,1248 **** @"RefreshTranscriptPlist", @"-d", [[ self delegate ] sessionTmpDirectory ], ! @"--", @"/var/radmind", nil ] controller: self ]; } --- 1252,1256 ---- @"RefreshTranscriptPlist", @"-d", [[ self delegate ] sessionTmpDirectory ], ! @"--", [ NSWorkspace radmindServerDirectory ], nil ] controller: self ]; } *************** *** 1537,1544 **** if ( [[ transcriptWindow firstResponder ] isEqual: transcriptTable ] ) { ! transcriptLocation = @"/var/radmind/transcript"; t = _checkedInTranscripts; } else if ( [[ transcriptWindow firstResponder ] isEqual: tmpTranscriptTable ] ) { ! transcriptLocation = @"/var/radmind/tmp/transcript"; t = _tmpTranscripts; } --- 1545,1554 ---- if ( [[ transcriptWindow firstResponder ] isEqual: transcriptTable ] ) { ! transcriptLocation = [ NSString stringWithFormat: @"%@/transcript", ! [ NSWorkspace radmindServerDirectory ]]; t = _checkedInTranscripts; } else if ( [[ transcriptWindow firstResponder ] isEqual: tmpTranscriptTable ] ) { ! transcriptLocation = [ NSString stringWithFormat: @"%@/tmp/transcript", ! [ NSWorkspace radmindServerDirectory ]]; t = _tmpTranscripts; } *************** *** 1853,1860 **** if ( [ ov isEqual: transcriptTable ] ) { tDir = [ NSString stringWithFormat: @"%@/transcript", ! @"/var/radmind" ]; } else if ( [ ov isEqual: tmpTranscriptTable ] ) { tDir = [ NSString stringWithFormat: @"%@/tmp/transcript", ! @"/var/radmind" ]; } i = 0; --- 1863,1870 ---- if ( [ ov isEqual: transcriptTable ] ) { tDir = [ NSString stringWithFormat: @"%@/transcript", ! [ NSWorkspace radmindServerDirectory ]]; } else if ( [ ov isEqual: tmpTranscriptTable ] ) { tDir = [ NSString stringWithFormat: @"%@/tmp/transcript", ! [ NSWorkspace radmindServerDirectory ]]; } i = 0; *************** *** 1892,1899 **** if ( [ ov isEqual: transcriptTable ] ) { tDir = [ NSString stringWithFormat: @"%@/transcript", ! @"/var/radmind" ]; } else if ( [ ov isEqual: tmpTranscriptTable ] ) { tDir = [ NSString stringWithFormat: @"%@/tmp/transcript", ! @"/var/radmind" ]; } i = 0; --- 1902,1909 ---- if ( [ ov isEqual: transcriptTable ] ) { tDir = [ NSString stringWithFormat: @"%@/transcript", ! [ NSWorkspace radmindServerDirectory ]]; } else if ( [ ov isEqual: tmpTranscriptTable ] ) { tDir = [ NSString stringWithFormat: @"%@/tmp/transcript", ! [ NSWorkspace radmindServerDirectory ]]; } i = 0; *************** *** 2009,2013 **** [ self moveLoadsetAtPath: [ draggedItem objectForKey: @"RadmindServerItemPath" ] ! toPath: @"/var/radmind/transcript" ]; return( YES ); } else if ( [[ item objectForKey: @"RadmindServerItemType" ] --- 2019,2024 ---- [ self moveLoadsetAtPath: [ draggedItem objectForKey: @"RadmindServerItemPath" ] ! toPath: [ NSString stringWithFormat: @"%@/transcript", ! [ NSWorkspace radmindServerDirectory ]]]; return( YES ); } else if ( [[ item objectForKey: @"RadmindServerItemType" ] |
From: Andrew M. <fit...@us...> - 2008-03-18 21:20:41
|
Update of /cvsroot/radmind/radmind-assistant/rsm/rsm.xcodeproj In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26694/rsm.xcodeproj Modified Files: project.pbxproj Log Message: Eliminated hard-coded references to /var/radmind. Use RadmindServerDirectoryPath preference settings. Index: project.pbxproj =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/rsm.xcodeproj/project.pbxproj,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** project.pbxproj 18 Mar 2008 19:49:34 -0000 1.12 --- project.pbxproj 18 Mar 2008 21:20:36 -0000 1.13 *************** *** 85,88 **** --- 85,90 ---- 0966F726094E11190061D4EC /* NSPanel(Resizing).m in Sources */ = {isa = PBXBuildFile; fileRef = 0966F724094E11190061D4EC /* NSPanel(Resizing).m */; }; 0966F7A9094E3EF20061D4EC /* serverprefs.png in Resources */ = {isa = PBXBuildFile; fileRef = 0966F7A8094E3EF20061D4EC /* serverprefs.png */; }; + 09B9CFD60D9063EC00F414CB /* NSWorkspace-Radmind.h in Headers */ = {isa = PBXBuildFile; fileRef = 09B9CFD40D9063EC00F414CB /* NSWorkspace-Radmind.h */; }; + 09B9CFD70D9063EC00F414CB /* NSWorkspace-Radmind.m in Sources */ = {isa = PBXBuildFile; fileRef = 09B9CFD50D9063EC00F414CB /* NSWorkspace-Radmind.m */; }; 09EFC1DB099CE40300A7D599 /* genplist.c in Sources */ = {isa = PBXBuildFile; fileRef = 09EFC1C4099CE40300A7D599 /* genplist.c */; }; 09EFC1DD099CE40300A7D599 /* llist.c in Sources */ = {isa = PBXBuildFile; fileRef = 09EFC1C7099CE40300A7D599 /* llist.c */; }; *************** *** 205,208 **** --- 207,212 ---- 09B119EE046CD15F00439ED6 /* RSMTranscriptTitleCell.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RSMTranscriptTitleCell.h; sourceTree = "<group>"; }; 09B119EF046CD15F00439ED6 /* RSMTranscriptTitleCell.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = RSMTranscriptTitleCell.m; sourceTree = "<group>"; }; + 09B9CFD40D9063EC00F414CB /* NSWorkspace-Radmind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSWorkspace-Radmind.h"; sourceTree = "<group>"; }; + 09B9CFD50D9063EC00F414CB /* NSWorkspace-Radmind.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSWorkspace-Radmind.m"; sourceTree = "<group>"; }; 09C83D7A0469673C00A8002B /* rsmauthtool.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = rsmauthtool.c; sourceTree = "<group>"; }; 09C83D7E0469880100A8002B /* RSMLoadsetEditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RSMLoadsetEditor.h; sourceTree = "<group>"; }; *************** *** 381,384 **** --- 385,390 ---- 093B055304F12DF700D5EACC /* NSTextView(LogMessage).h */, 093B055404F12DF700D5EACC /* NSTextView(LogMessage).m */, + 09B9CFD40D9063EC00F414CB /* NSWorkspace-Radmind.h */, + 09B9CFD50D9063EC00F414CB /* NSWorkspace-Radmind.m */, ); name = Categories; *************** *** 497,500 **** --- 503,507 ---- 0966F51009490F6C0061D4EC /* sessionrights.h in Headers */, 0966F725094E11190061D4EC /* NSPanel(Resizing).h in Headers */, + 09B9CFD60D9063EC00F414CB /* NSWorkspace-Radmind.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; *************** *** 642,645 **** --- 649,653 ---- 0966F54709490F6C0061D4EC /* sessionrights.c in Sources */, 0966F726094E11190061D4EC /* NSPanel(Resizing).m in Sources */, + 09B9CFD70D9063EC00F414CB /* NSWorkspace-Radmind.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; |
From: Andrew M. <fit...@us...> - 2008-03-18 20:22:01
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32491 Modified Files: RSMLoadsetEditor.h Log Message: Unused defined string. Index: RSMLoadsetEditor.h =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMLoadsetEditor.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** RSMLoadsetEditor.h 6 Dec 2007 21:54:19 -0000 1.9 --- RSMLoadsetEditor.h 18 Mar 2008 20:21:56 -0000 1.10 *************** *** 4,8 **** #import "RSMNewFolderHelper.h" - #define KFILEDIR "/var/radmind/command" #define RSMKFilePboardType @"RSMKFileFilePboardType" --- 4,7 ---- |
From: Andrew M. <fit...@us...> - 2008-03-18 20:10:08
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27849 Modified Files: RAServerAuth.m Log Message: Unlock before releasing NSLock. Index: RAServerAuth.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RAServerAuth.m,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** RAServerAuth.m 20 Oct 2006 14:11:07 -0000 1.15 --- RAServerAuth.m 18 Mar 2008 20:10:05 -0000 1.16 *************** *** 48,51 **** --- 48,52 ---- [ lock tryLock ]; threadID++; + [ lock unlock ]; [ lock release ]; |
From: Andrew M. <fit...@us...> - 2008-03-18 19:49:37
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16609 Modified Files: RSMLoadsetManager.m RSMTranscriptTitleCell.m Log Message: Fix [ 1810311 ]: Server manager - Ordering Merged files glitch. Improved drag and drop reordering of files in merging sheet. Merging sheet is longer. Merging sheet width may be modified. Index: RSMTranscriptTitleCell.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMTranscriptTitleCell.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RSMTranscriptTitleCell.m 8 Dec 2005 23:00:00 -0000 1.2 --- RSMTranscriptTitleCell.m 18 Mar 2008 19:49:33 -0000 1.3 *************** *** 66,70 **** { NSRect textFrame, imageFrame; ! NSDivideRect( aRect, &imageFrame, &textFrame, ( [ image size ].width + 1 ), NSMinXEdge ); [ super selectWithFrame: textFrame inView: controlView editor: textObj --- 66,70 ---- { NSRect textFrame, imageFrame; ! NSDivideRect( aRect, &imageFrame, &textFrame, ( [ image size ].width + 1 ), NSMinXEdge ); [ super selectWithFrame: textFrame inView: controlView editor: textObj Index: RSMLoadsetManager.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMLoadsetManager.m,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** RSMLoadsetManager.m 1 Aug 2006 22:57:59 -0000 1.46 --- RSMLoadsetManager.m 18 Mar 2008 19:49:33 -0000 1.47 *************** *** 312,316 **** NSWidth( mergeSheetRect ), ( NSHeight( mergeSheetRect ) - mergedNameBoxHeight )) display: NO ]; ! [ transcriptTable setTarget: self ]; [ transcriptTable setDelegate: self ]; --- 312,317 ---- NSWidth( mergeSheetRect ), ( NSHeight( mergeSheetRect ) - mergedNameBoxHeight )) display: NO ]; ! [ mergeSheet setDelegate: self ]; ! [ transcriptTable setTarget: self ]; [ transcriptTable setDelegate: self ]; *************** *** 1762,1765 **** --- 1763,1770 ---- if ( operation == NSTableViewDropOn ) { if ( [ tableView isEqual: loadsetsToMergeTable ] ) { + if ( row == ( [[ self loadsetsToMerge ] count ] - 1 )) { + /* allow drops below last item in table */ + row++; + } [ tableView setDropRow: row dropOperation: NSTableViewDropAbove ]; return( NSDragOperationMove ); *************** *** 1969,1975 **** { if ( item == nil ) { ! return( NSDragOperationCopy ); } ! [ ov setDropItem: item dropChildIndex: NSOutlineViewDropOnItemIndex ]; --- 1974,1980 ---- { if ( item == nil ) { ! return( NSDragOperationMove ); } ! [ ov setDropItem: item dropChildIndex: NSOutlineViewDropOnItemIndex ]; *************** *** 1988,1992 **** return( NO ); } ! draggedObject = [ pb propertyListForType: RSMTranscriptInfoPboardType ]; if ( draggedObject == nil ) { --- 1993,1997 ---- return( NO ); } ! draggedObject = [ pb propertyListForType: RSMTranscriptInfoPboardType ]; if ( draggedObject == nil ) { *************** *** 2059,2062 **** --- 2064,2081 ---- } #endif notdef + + - ( NSSize )windowWillResize: ( NSWindow * )window toSize: ( NSSize )size + { + if ( [ window isEqual: mergeSheet ] && [ mergeMatrix selectedRow ] == 0 ) { + /* + * we don't want to let the user resize the merge panel + * if they're doing a merge into another loadset + */ + return( [ window frame ].size ); + } + + return( size ); + } + - ( void )dealloc { |
From: Andrew M. <fit...@us...> - 2008-03-18 19:49:37
|
Update of /cvsroot/radmind/radmind-assistant/rsm/rsm.xcodeproj In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16609/rsm.xcodeproj Modified Files: project.pbxproj Log Message: Fix [ 1810311 ]: Server manager - Ordering Merged files glitch. Improved drag and drop reordering of files in merging sheet. Merging sheet is longer. Merging sheet width may be modified. Index: project.pbxproj =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/rsm.xcodeproj/project.pbxproj,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** project.pbxproj 6 Dec 2007 21:58:40 -0000 1.11 --- project.pbxproj 18 Mar 2008 19:49:34 -0000 1.12 *************** *** 549,555 **** --- 549,557 ---- isa = PBXProject; buildConfigurationList = 09943E7708980F78001810A0 /* Build configuration list for PBXProject "rsm" */; + compatibilityVersion = "Xcode 2.4"; hasScannedForEncodings = 1; mainGroup = 29B97314FDCFA39411CA2CEA /* rsm */; projectDirPath = ""; + projectRoot = ""; targets = ( 0966F4FB09490F6C0061D4EC /* Radmind Server Manager */, |
From: Andrew M. <fit...@us...> - 2008-03-18 19:49:37
|
Update of /cvsroot/radmind/radmind-assistant/rsm/English.lproj/MainMenu.nib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16609/English.lproj/MainMenu.nib Modified Files: classes.nib info.nib Log Message: Fix [ 1810311 ]: Server manager - Ordering Merged files glitch. Improved drag and drop reordering of files in merging sheet. Merging sheet is longer. Merging sheet width may be modified. Index: info.nib =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/English.lproj/MainMenu.nib/info.nib,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** info.nib 6 Dec 2007 21:58:07 -0000 1.11 --- info.nib 18 Mar 2008 19:49:33 -0000 1.12 *************** *** 1,39 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> - <key>IBDocumentLocation</key> - <string>695 414 371 452 0 0 1440 878 </string> - <key>IBEditorPositions</key> - <dict> - <key>204</key> - <string>148 384 134 84 0 0 1024 746 </string> - <key>267</key> - <string>208 215 206 476 0 0 1024 746 </string> - <key>29</key> - <string>216 596 391 44 0 0 1440 878 </string> - <key>297</key> - <string>64 289 134 84 0 0 1024 746 </string> - <key>311</key> - <string>238 442 365 147 0 0 1024 746 </string> - <key>325</key> - <string>627 523 412 189 0 0 1440 878 </string> - <key>567</key> - <string>312 771 391 44 0 0 1440 878 </string> - </dict> <key>IBFramework Version</key> ! <string>446.1</string> <key>IBOpenObjects</key> <array> ! <integer>567</integer> ! <integer>211</integer> ! <integer>240</integer> ! <integer>294</integer> ! <integer>463</integer> ! <integer>284</integer> ! <integer>29</integer> </array> <key>IBSystem Version</key> ! <string>8S2167</string> </dict> </plist> --- 1,20 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>IBFramework Version</key> ! <string>629</string> ! <key>IBLastKnownRelativeProjectPath</key> ! <string>../../rsm.xcodeproj</string> ! <key>IBOldestOS</key> ! <integer>5</integer> <key>IBOpenObjects</key> <array> ! <integer>221</integer> </array> <key>IBSystem Version</key> ! <string>9C31</string> ! <key>targetFramework</key> ! <string>IBCocoaFramework</string> </dict> </plist> Index: classes.nib =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/English.lproj/MainMenu.nib/classes.nib,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** classes.nib 6 Dec 2007 21:58:07 -0000 1.5 --- classes.nib 18 Mar 2008 19:49:33 -0000 1.6 *************** *** 1,94 **** ! { ! IBClasses = ( ! {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, ! {CLASS = RAOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, ! {CLASS = RASTableView; LANGUAGE = ObjC; SUPERCLASS = NSTableView; }, ! { ! ACTIONS = { ! addHost = id; ! saveConfigFile = id; ! showPreferences = id; ! showToolProgressDetails = id; ! }; ! CLASS = RAServerController; ! LANGUAGE = ObjC; ! OUTLETS = { ! gatheringProgBar = NSProgressIndicator; ! gatheringSheet = NSPanel; ! hostsTable = NSTableView; ! loadsetEditor = RSMLoadsetEditor; ! loadsetManager = RSMLoadsetManager; ! progBar = NSProgressIndicator; ! serverWindow = NSWindow; ! toolProgressBox = NSBox; ! }; ! SUPERCLASS = NSObject; ! }, ! {CLASS = RASplitView; LANGUAGE = ObjC; SUPERCLASS = NSSplitView; }, ! { ! ACTIONS = { ! addSpecialFile = id; ! cancelAddSpecialFile = id; ! createNewKFile = id; ! deleteKFileEntry = id; ! dismissDeleteKFileSheet = id; ! dismissNewKFileSheet = id; ! getDeleteKFileSheet = id; ! }; ! CLASS = RSMLoadsetEditor; ! LANGUAGE = ObjC; ! OUTLETS = { ! allCommandFilesTable = RASTableView; ! currentKFileTable = NSTableView; ! loadsetWindow = NSWindow; ! newCommandFileContents = NSPopUpButton; ! newCommandFileNameField = NSTextField; ! newCommandFileSheet = NSPanel; ! serverController = RAServerController; ! specialClientName = NSTextField; ! specialSheet = NSPanel; ! specialTranscriptPopUp = NSPopUpButton; ! transcriptManager = RSMLoadsetManager; ! }; ! SUPERCLASS = NSObject; ! }, ! { ! ACTIONS = { ! cancelMerge = id; ! killCurrentTask = id; ! mergeLoadsets = id; ! mergeTypeToggle = id; ! openTranscriptInEditor = id; ! toggleToolProgressDetails = id; ! updateTranscript = id; ! verifyTranscript = id; ! }; ! CLASS = RSMLoadsetManager; ! LANGUAGE = ObjC; ! OUTLETS = { ! loadsetEditor = RSMLoadsetEditor; ! loadsetsToMergeTable = RASTableView; ! mergeMatrix = NSMatrix; ! mergeSheet = NSPanel; ! mergedNameBox = NSBox; ! mergedNameView = NSView; ! newMergeNameField = NSTextField; ! progBar = NSProgressIndicator; ! progMessage = NSTextField; ! progSheet = NSPanel; ! tmpTableMenu = NSMenu; ! tmpTranscriptBox = NSBox; ! tmpTranscriptTable = RASTableView; ! toolProgressDetailsBox = NSBox; ! toolProgressDetailsTextView = NSTextView; ! toolProgressDetailsView = NSView; ! transcriptBox = NSBox; ! transcriptTable = RASTableView; ! transcriptTableMenu = NSMenu; ! transcriptWindow = NSWindow; ! }; ! SUPERCLASS = NSObject; ! } ! ); ! IBVersion = 1; ! } \ No newline at end of file --- 1,257 ---- ! <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> ! <plist version="1.0"> ! <dict> ! <key>IBClasses</key> ! <array> ! <dict> ! <key>ACTIONS</key> ! <dict> ! <key>addHost</key> ! <string>id</string> ! <key>addNewClientToConfigFile</key> ! <string>id</string> ! <key>deleteClientFromConfigFile</key> ! <string>id</string> ! <key>reloadServerInformation</key> ! <string>id</string> ! <key>saveConfigFile</key> ! <string>id</string> ! <key>showPreferences</key> ! <string>id</string> ! <key>showToolProgressDetails</key> ! <string>id</string> ! </dict> ! <key>CLASS</key> ! <string>RAServerController</string> ! <key>LANGUAGE</key> ! <string>ObjC</string> ! <key>OUTLETS</key> ! <dict> ! <key>gatheringProgBar</key> ! <string>NSProgressIndicator</string> ! <key>gatheringSheet</key> ! <string>NSPanel</string> ! <key>hostsTable</key> ! <string>RASTableView</string> ! <key>loadsetEditor</key> ! <string>RSMLoadsetEditor</string> ! <key>loadsetManager</key> ! <string>RSMLoadsetManager</string> ! <key>progBar</key> ! <string>NSProgressIndicator</string> ! <key>serverWindow</key> ! <string>NSWindow</string> ! <key>toolProgressBox</key> ! <string>NSBox</string> ! </dict> ! <key>SUPERCLASS</key> ! <string>NSObject</string> ! </dict> ! <dict> ! <key>ACTIONS</key> ! <dict> ! <key>addSpecialFile</key> ! <string>id</string> ! <key>cancelAddSpecialFile</key> ! <string>id</string> ! <key>createNewKFile</key> ! <string>id</string> ! <key>deleteCommandFile</key> ! <string>id</string> ! <key>deleteCommandFileEntry</key> ! <string>id</string> ! <key>deleteKFileEntry</key> ! <string>id</string> ! <key>dismissDeleteKFileSheet</key> ! <string>id</string> ! <key>dismissNewKFileSheet</key> ! <string>id</string> ! <key>getDeleteKFileSheet</key> ! <string>id</string> ! <key>newCommandFile</key> ! <string>id</string> ! <key>readSelectedCommandFile</key> ! <string>id</string> ! <key>saveCommandFile</key> ! <string>id</string> ! </dict> ! <key>CLASS</key> ! <string>RSMLoadsetEditor</string> ! <key>LANGUAGE</key> ! <string>ObjC</string> ! <key>OUTLETS</key> ! <dict> ! <key>allCommandFilesTable</key> ! <string>RAOutlineView</string> ! <key>currentKFileTable</key> ! <string>RASTableView</string> ! <key>loadsetWindow</key> ! <string>NSWindow</string> ! <key>newCommandFileContents</key> ! <string>NSPopUpButton</string> ! <key>newCommandFileNameField</key> ! <string>NSTextField</string> ! <key>newCommandFileSheet</key> ! <string>NSPanel</string> ! <key>serverController</key> ! <string>RAServerController</string> ! <key>specialClientName</key> ! <string>NSTextField</string> ! <key>specialSheet</key> ! <string>NSPanel</string> ! <key>specialTranscriptPopUp</key> ! <string>NSPopUpButton</string> ! <key>transcriptManager</key> ! <string>RSMLoadsetManager</string> ! </dict> ! <key>SUPERCLASS</key> ! <string>NSObject</string> ! </dict> ! <dict> ! <key>ACTIONS</key> ! <dict> ! <key>cancelMerge</key> ! <string>id</string> ! <key>deleteTranscript</key> ! <string>id</string> ! <key>getNewSubdirectorySheet</key> ! <string>id</string> ! <key>killCurrentTask</key> ! <string>id</string> ! <key>mergeLoadsets</key> ! <string>id</string> ! <key>mergeTypeToggle</key> ! <string>id</string> ! <key>openTranscriptInEditor</key> ! <string>id</string> ! <key>readAvailableCheckedInTranscripts</key> ! <string>id</string> ! <key>readAvailableTmpTranscripts</key> ! <string>id</string> ! <key>refreshTranscriptListing</key> ! <string>id</string> ! <key>toggleToolProgressDetails</key> ! <string>id</string> ! <key>updateTranscript</key> ! <string>id</string> ! <key>verifyTranscript</key> ! <string>id</string> ! </dict> ! <key>CLASS</key> ! <string>RSMLoadsetManager</string> ! <key>LANGUAGE</key> ! <string>ObjC</string> ! <key>OUTLETS</key> ! <dict> ! <key>createNewSubDirectoryButton</key> ! <string>NSButton</string> ! <key>loadsetEditor</key> ! <string>RSMLoadsetEditor</string> ! <key>loadsetsToMergeTable</key> ! <string>RASTableView</string> ! <key>mergeMatrix</key> ! <string>NSMatrix</string> ! <key>mergeSheet</key> ! <string>NSPanel</string> ! <key>mergedNameBox</key> ! <string>NSBox</string> ! <key>mergedNameView</key> ! <string>NSView</string> ! <key>newMergeNameField</key> ! <string>NSTextField</string> ! <key>newSubDirectoryInfoField</key> ! <string>NSTextField</string> ! <key>newSubDirectoryNameField</key> ! <string>NSTextField</string> ! <key>newSubDirectorySheet</key> ! <string>NSPanel</string> ! <key>progBar</key> ! <string>NSProgressIndicator</string> ! <key>progMessage</key> ! <string>NSTextField</string> ! <key>progSheet</key> ! <string>NSPanel</string> ! <key>tmpTableMenu</key> ! <string>NSMenu</string> ! <key>tmpTranscriptBox</key> ! <string>NSBox</string> ! <key>tmpTranscriptTable</key> ! <string>RAOutlineView</string> ! <key>toolProgressDetailsBox</key> ! <string>NSBox</string> ! <key>toolProgressDetailsTextView</key> ! <string>NSTextView</string> ! <key>toolProgressDetailsView</key> ! <string>NSView</string> ! <key>transcriptBox</key> ! <string>NSBox</string> ! <key>transcriptTable</key> ! <string>RAOutlineView</string> ! <key>transcriptTableMenu</key> ! <string>NSMenu</string> ! <key>transcriptWindow</key> ! <string>NSWindow</string> ! </dict> ! <key>SUPERCLASS</key> ! <string>NSObject</string> ! </dict> ! <dict> ! <key>CLASS</key> ! <string>RASTableView</string> ! <key>LANGUAGE</key> ! <string>ObjC</string> ! <key>SUPERCLASS</key> ! <string>NSTableView</string> ! </dict> ! <dict> ! <key>CLASS</key> ! <string>NSTextView</string> ! <key>LANGUAGE</key> ! <string>ObjC</string> ! <key>SUPERCLASS</key> ! <string>NSText</string> ! </dict> ! <dict> ! <key>CLASS</key> ! <string>FirstResponder</string> ! <key>LANGUAGE</key> ! <string>ObjC</string> ! <key>SUPERCLASS</key> ! <string>NSObject</string> ! </dict> ! <dict> ! <key>CLASS</key> ! <string>NSObject</string> ! <key>LANGUAGE</key> ! <string>ObjC</string> ! </dict> ! <dict> ! <key>CLASS</key> ! <string>RAOutlineView</string> ! <key>LANGUAGE</key> ! <string>ObjC</string> ! <key>SUPERCLASS</key> ! <string>NSOutlineView</string> ! </dict> ! <dict> ! <key>CLASS</key> ! <string>RASplitView</string> ! <key>LANGUAGE</key> ! <string>ObjC</string> ! <key>SUPERCLASS</key> ! <string>NSSplitView</string> ! </dict> ! <dict> ! <key>CLASS</key> ! <string>NSPanel</string> ! <key>LANGUAGE</key> ! <string>ObjC</string> ! <key>SUPERCLASS</key> ! <string>NSWindow</string> ! </dict> ! </array> ! <key>IBVersion</key> ! <string>1</string> ! </dict> ! </plist> |
From: Andrew M. <fit...@us...> - 2008-03-12 17:16:21
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2767 Modified Files: config.h.in configure configure.ac transcript.c update.c Log Message: Feature request 1834497: symlink ownership should be recorded and set. Support for lchown and lchmod. Expanded 'l' type to include mode, owner and group in transcript output. Index: configure.ac =================================================================== RCS file: /cvsroot/radmind/radmind/configure.ac,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** configure.ac 18 Jan 2008 18:46:18 -0000 1.43 --- configure.ac 12 Mar 2008 17:15:55 -0000 1.44 *************** *** 51,54 **** --- 51,56 ---- AC_CHECK_LIB(resolv, inet_aton) fi + AC_CHECK_LIB(c, lchown) + AC_CHECK_LIB(c, lchmod) AC_CHECK_LIB(nsl, gethostbyaddr) AC_CHECK_LIB([socket], [socket]) Index: transcript.c =================================================================== RCS file: /cvsroot/radmind/radmind/transcript.c,v retrieving revision 1.125 retrieving revision 1.126 diff -C2 -d -r1.125 -r1.126 *** transcript.c 15 Jan 2008 20:04:03 -0000 1.125 --- transcript.c 12 Mar 2008 17:15:55 -0000 1.126 *************** *** 163,166 **** --- 163,187 ---- case 'l': /* link */ + if ( ac == 3 ) { /* link without owner, group, mode */ + tran->t_pinfo.pi_stat.st_mode = 0777; + tran->t_pinfo.pi_stat.st_uid = 0; + tran->t_pinfo.pi_stat.st_gid = 0; + } else if ( ac == 6 ) { /* link with owner, group, mode */ + tran->t_pinfo.pi_stat.st_mode = strtol( argv[ 2 ], NULL, 8 ); + tran->t_pinfo.pi_stat.st_uid = atoi( argv[ 3 ] ); + tran->t_pinfo.pi_stat.st_gid = atoi( argv[ 4 ] ); + } else { + fprintf( stderr, "%s: line %d: expected 3 or 6 arguments, got %d\n", + tran->t_fullname, tran->t_linenum, ac ); + exit( 2 ); + } + if (( epath = decode( argv[ ac - 1 ] )) == NULL ) { + fprintf( stderr, "%s: line %d: target path too long\n", + tran->t_fullname, tran->t_linenum ); + exit( 2 ); + } + strcpy( tran->t_pinfo.pi_link, epath ); + break; + case 'h': /* hard */ if ( ac != 3 ) { *************** *** 299,302 **** --- 320,333 ---- case 'l': + fprintf( outtran, "%c %-37s\t%.4lo %5d %5d ", cur->pi_type, epath, + (unsigned long)( T_MODE & cur->pi_stat.st_mode ), + (int)cur->pi_stat.st_uid, (int)cur->pi_stat.st_gid ); + if (( epath = encode( cur->pi_link )) == NULL ) { + fprintf( stderr, "Filename too long: %s\n", cur->pi_link ); + exit( 2 ); + } + fprintf( outtran, "%s\n", epath ); + break; + case 'h': fprintf( outtran, "%c %-37s\t", cur->pi_type, epath ); *************** *** 504,508 **** case 'l': /* link */ if ( tran->t_type != T_NEGATIVE ) { ! if ( strcmp( fs->pi_link, tran->t_pinfo.pi_link ) != 0 ) { t_print( fs, tran, PR_STATUS ); } --- 535,547 ---- case 'l': /* link */ if ( tran->t_type != T_NEGATIVE ) { ! if (( strcmp( fs->pi_link, tran->t_pinfo.pi_link ) != 0 ) ! #ifdef HAVE_LCHOWN ! || ( fs->pi_stat.st_uid != tran->t_pinfo.pi_stat.st_uid ) || ! ( fs->pi_stat.st_gid != tran->t_pinfo.pi_stat.st_gid ) ! #endif /* HAVE_LCHOWN */ ! #ifdef HAVE_LCHMOD ! || ( mode != tran_mode ) ! #endif /* HAVE_LCHMOD */ ! /* strcmp */ ) { t_print( fs, tran, PR_STATUS ); } Index: config.h.in =================================================================== RCS file: /cvsroot/radmind/radmind/config.h.in,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** config.h.in 18 Jun 2007 19:40:05 -0000 1.10 --- config.h.in 12 Mar 2008 17:15:55 -0000 1.11 *************** *** 27,30 **** --- 27,32 ---- #undef HAVE_DNSSD + #undef HAVE_LCHOWN + #undef HAVE_LCHMOD #undef HAVE_ZLIB Index: configure =================================================================== RCS file: /cvsroot/radmind/radmind/configure,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** configure 18 Jan 2008 18:46:18 -0000 1.54 --- configure 12 Mar 2008 17:15:55 -0000 1.55 *************** *** 4665,4668 **** --- 4665,4810 ---- fi + { echo "$as_me:$LINENO: checking for lchown in -lc" >&5 + echo $ECHO_N "checking for lchown in -lc... $ECHO_C" >&6; } + if test "${ac_cv_lib_c_lchown+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lc $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char lchown (); + int + main () + { + return lchown (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_c_lchown=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_c_lchown=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi + { echo "$as_me:$LINENO: result: $ac_cv_lib_c_lchown" >&5 + echo "${ECHO_T}$ac_cv_lib_c_lchown" >&6; } + if test $ac_cv_lib_c_lchown = yes; then + cat >>confdefs.h <<_ACEOF + #define HAVE_LIBC 1 + _ACEOF + + LIBS="-lc $LIBS" + + fi + + + { echo "$as_me:$LINENO: checking for lchmod in -lc" >&5 + echo $ECHO_N "checking for lchmod in -lc... $ECHO_C" >&6; } + if test "${ac_cv_lib_c_lchmod+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lc $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char lchmod (); + int + main () + { + return lchmod (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_c_lchmod=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_c_lchmod=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi + { echo "$as_me:$LINENO: result: $ac_cv_lib_c_lchmod" >&5 + echo "${ECHO_T}$ac_cv_lib_c_lchmod" >&6; } + if test $ac_cv_lib_c_lchmod = yes; then + cat >>confdefs.h <<_ACEOF + #define HAVE_LIBC 1 + _ACEOF + + LIBS="-lc $LIBS" + + fi + + { echo "$as_me:$LINENO: checking for gethostbyaddr in -lnsl" >&5 echo $ECHO_N "checking for gethostbyaddr in -lnsl... $ECHO_C" >&6; } Index: update.c =================================================================== RCS file: /cvsroot/radmind/radmind/update.c,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** update.c 14 Dec 2007 19:32:10 -0000 1.49 --- update.c 12 Mar 2008 17:15:55 -0000 1.50 *************** *** 37,40 **** --- 37,49 ---- extern int create_prefix; + /* + * lchmod is only available on Mac OS X 10.5 + * right now. we use weak linking to avoid + * two different builds for 10.4 and 10.5. + */ + #ifdef HAVE_LCHMOD + extern int lchmod( const char *, mode_t ) __attribute__(( weak )); + #endif /* HAVE_LCHMOD */ + int update( char *path, char *displaypath, int present, int newfile, *************** *** 165,171 **** case 'l': ! if ( tac != 3 ) { ! fprintf( stderr, ! "%d: incorrect number of arguments\n", linenum ); return( 1 ); } --- 174,189 ---- case 'l': ! if ( tac == 3 ) { ! /* legacy symlink entries get defaults */ ! mode = ( mode_t )0777; ! uid = 0; ! gid = 0; ! } else if ( tac == 6 ) { ! /* symlink with mode, uid, gid */ ! mode = ( mode_t )strtol( targv[ 2 ], NULL, 8 ); ! uid = atoi( targv[ 3 ] ); ! gid = atoi( targv[ 4 ] ); ! } else { ! fprintf( stderr, "%d: incorrect number of arguments\n", linenum ); return( 1 ); } *************** *** 177,181 **** present = 0; } ! if (( d_target = decode( targv[ 2 ] )) == NULL ) { fprintf( stderr, "line %d: target path too long\n", linenum ); return( 1 ); --- 195,199 ---- present = 0; } ! if (( d_target = decode( targv[ tac - 1 ] )) == NULL ) { fprintf( stderr, "line %d: target path too long\n", linenum ); return( 1 ); *************** *** 197,202 **** } } ! if ( !quiet && !showprogress ) printf( "%s: symbolic linked to %s", ! displaypath, d_target ); goto done; --- 215,260 ---- } } ! if ( !quiet && !showprogress ) { ! printf( "%s: symbolic linked to %s", displaypath, d_target ); ! } ! #if defined( HAVE_LCHOWN ) || defined( HAVE_LCHMOD ) ! if ( !quiet && !showprogress ) { ! printf( " updating" ); ! } ! #ifdef HAVE_LCHOWN ! if ( uid != st->st_uid || gid != st->st_gid ) { ! if ( lchown( path, uid, gid ) != 0 ) { ! perror( path ); ! return( 1 ); ! } ! } ! if ( uid != st->st_uid && !quiet && !showprogress ) { ! printf( " uid" ); ! } ! if ( gid != st->st_gid && !quiet && !showprogress ) { ! printf( " gid" ); ! } ! #endif /* HAVE_LCHOWN */ ! ! #ifdef HAVE_LCHMOD ! /* ! * if we compiled with weak linking and lchmod ! * isn't in the library, the symbol may be NULL. ! */ ! if ( lchmod != NULL ) { ! if (( mode != ( T_MODE & st->st_mode )) || ! (( uid != st->st_uid || gid != st->st_gid ) && ! (( mode & ( S_ISUID | S_ISGID )) != 0 ))) { ! if ( lchmod( path, mode ) != 0 ) { ! perror( path ); ! return( 1 ); ! } ! if ( !quiet && !showprogress ) { ! printf( " mode" ); ! } ! } ! } ! #endif /* HAVE_LCHMOD */ ! #endif /* defined( HAVE_LCHOWN ) || defined( HAVE_LCHMOD ) */ goto done; |
From: Dustin K. <da...@us...> - 2008-02-15 23:30:26
|
Update of /cvsroot/radmind/radmind-pc/reg In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25257 Modified Files: transcript.c Log Message: Fixed bug in handling of REG_DWORD registry values in keys being managed by value. Index: transcript.c =================================================================== RCS file: /cvsroot/radmind/radmind-pc/reg/transcript.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** transcript.c 13 Jun 2007 16:17:41 -0000 1.13 --- transcript.c 15 Feb 2008 23:30:21 -0000 1.14 *************** *** 1319,1332 **** chksum_pt = chksum_pt + strlen( chksum_pt ); strcat( chksum_pt, "dword:" ); ! for ( i = 3; i >= 0; i-- ) { chksum_pt = chksum_pt + strlen( chksum_pt ); ! if ( i != 0 ) { ! sprintf( temp_buf, "%02x", (unsigned int)cur->pi_value[ i ] ); strcat( chksum_pt, temp_buf ); } else { ! sprintf( temp_buf, "%02x\r\n", (unsigned int)cur->pi_value[ i ] ); strcat( chksum_pt, temp_buf ); } --- 1319,1332 ---- chksum_pt = chksum_pt + strlen( chksum_pt ); strcat( chksum_pt, "dword:" ); ! for ( i = 4; i > 0; i-- ) { chksum_pt = chksum_pt + strlen( chksum_pt ); ! if ( i != 1 ) { ! sprintf( temp_buf, "%02x", (unsigned int)cur->pi_value[ i - 1 ] ); strcat( chksum_pt, temp_buf ); } else { ! sprintf( temp_buf, "%02x\r\n", (unsigned int)cur->pi_value[ i - 1 ] ); strcat( chksum_pt, temp_buf ); } |
From: Andrew M. <fit...@us...> - 2008-01-18 18:46:23
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23131 Modified Files: aclocal.m4 configure.ac configure Log Message: Reorganized universal binary setup. (Mac OS X) Set MACOSX_DEPLOYMENT_TARGET to 10.4 so builds on 10.5 work on 10.4. (Mac OS X) Fixed complaint from configure script resulting from unquoted variable. (common) Index: aclocal.m4 =================================================================== RCS file: /cvsroot/radmind/radmind/aclocal.m4,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** aclocal.m4 17 Jan 2008 04:08:26 -0000 1.18 --- aclocal.m4 18 Jan 2008 18:46:18 -0000 1.19 *************** *** 123,127 **** ,[enable_universal_binaries=no]) if test "${enable_universal_binaries}" = "yes"; then - AC_CANONICAL_SYSTEM case "${host_os}" in darwin8*) --- 123,126 ---- *************** *** 130,150 **** darwin9*) macosx_sdk="MacOSX10.5.sdk" ;; *) ;; esac ! case "${host_os}" in ! darwin*) ! echo =========================================================== ! echo Setting up universal binaries for ${host_os} ! echo =========================================================== ! OPTOPTS="$OPTOPTS -isysroot /Developer/SDKs/$macosx_sdk -arch i386 -arch ppc" ! ;; ! *) ! AC_MSG_ERROR([Building universal binaries on ${host_os} is not supported]) ! esac fi ]) --- 129,145 ---- darwin9*) + export MACOSX_DEPLOYMENT_TARGET="10.4" macosx_sdk="MacOSX10.5.sdk" ;; *) + AC_MSG_ERROR([Building universal binaries on ${host_os} is not supported]) ;; esac ! echo =========================================================== ! echo Setting up universal binaries for ${host_os} ! echo =========================================================== ! OPTOPTS="$OPTOPTS -isysroot /Developer/SDKs/$macosx_sdk -arch i386 -arch ppc" fi ]) Index: configure.ac =================================================================== RCS file: /cvsroot/radmind/radmind/configure.ac,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** configure.ac 18 Jun 2007 19:40:05 -0000 1.42 --- configure.ac 18 Jan 2008 18:46:18 -0000 1.43 *************** *** 32,36 **** #AC_SUBST(certdir) ! CHECK_UNIVERSAL_BINARIES # Checks for programs. --- 32,36 ---- #AC_SUBST(certdir) ! AC_CANONICAL_SYSTEM # Checks for programs. *************** *** 72,75 **** --- 72,76 ---- CHECK_ZLIB + CHECK_UNIVERSAL_BINARIES # HPUX lacks wait4 and strtoll *************** *** 77,81 **** # Miscellaneous: ! if test x_$OPTOPTS = x_; then if test x_$GCC = x_yes; then OPTOPTS="$OPTOPTS -Wall -Wmissing-prototypes" --- 78,82 ---- # Miscellaneous: ! if test x_"$OPTOPTS" = x_; then if test x_$GCC = x_yes; then OPTOPTS="$OPTOPTS -Wall -Wmissing-prototypes" Index: configure =================================================================== RCS file: /cvsroot/radmind/radmind/configure,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** configure 17 Jan 2008 04:09:51 -0000 1.53 --- configure 18 Jan 2008 18:46:18 -0000 1.54 *************** *** 1281,1287 **** --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-universal-binaries build universal binaries (default=no) - --disable-largefile omit support for large files Optional Packages: --- 1281,1287 ---- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-largefile omit support for large files --enable-universal-binaries build universal binaries (default=no) Optional Packages: *************** *** 1924,1937 **** ! ! # Check whether --enable-universal_binaries was given. ! if test "${enable_universal_binaries+set}" = set; then ! enableval=$enable_universal_binaries; ! else ! enable_universal_binaries=no ! fi ! ! if test "${enable_universal_binaries}" = "yes"; then ! { echo "$as_me:$LINENO: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6; } if test "${ac_cv_target+set}" = set; then --- 1924,1928 ---- ! { echo "$as_me:$LINENO: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6; } if test "${ac_cv_target+set}" = set; then *************** *** 1976,2006 **** NONENONEs,x,x, && program_prefix=${target_alias}- - case "${host_os}" in - darwin8*) - macosx_sdk="MacOSX10.4u.sdk" - ;; - - darwin9*) - macosx_sdk="MacOSX10.5.sdk" - ;; - - *) - ;; - esac - - case "${host_os}" in - darwin*) - echo =========================================================== - echo Setting up universal binaries for ${host_os} - echo =========================================================== - OPTOPTS="$OPTOPTS -isysroot /Developer/SDKs/$macosx_sdk -arch i386 -arch ppc" - ;; - *) - { { echo "$as_me:$LINENO: error: Building universal binaries on ${host_os} is not supported" >&5 - echo "$as_me: error: Building universal binaries on ${host_os} is not supported" >&2;} - { (exit 1); exit 1; }; } - esac - fi - # Checks for programs. --- 1967,1970 ---- *************** *** 5971,5974 **** --- 5935,5970 ---- + # Check whether --enable-universal_binaries was given. + if test "${enable_universal_binaries+set}" = set; then + enableval=$enable_universal_binaries; + else + enable_universal_binaries=no + fi + + if test "${enable_universal_binaries}" = "yes"; then + case "${host_os}" in + darwin8*) + macosx_sdk="MacOSX10.4u.sdk" + ;; + + darwin9*) + export MACOSX_DEPLOYMENT_TARGET="10.4" + macosx_sdk="MacOSX10.5.sdk" + ;; + + *) + { { echo "$as_me:$LINENO: error: Building universal binaries on ${host_os} is not supported" >&5 + echo "$as_me: error: Building universal binaries on ${host_os} is not supported" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + echo =========================================================== + echo Setting up universal binaries for ${host_os} + echo =========================================================== + OPTOPTS="$OPTOPTS -isysroot /Developer/SDKs/$macosx_sdk -arch i386 -arch ppc" + fi + + # HPUX lacks wait4 and strtoll *************** *** 6069,6073 **** # Miscellaneous: ! if test x_$OPTOPTS = x_; then if test x_$GCC = x_yes; then OPTOPTS="$OPTOPTS -Wall -Wmissing-prototypes" --- 6065,6069 ---- # Miscellaneous: ! if test x_"$OPTOPTS" = x_; then if test x_$GCC = x_yes; then OPTOPTS="$OPTOPTS -Wall -Wmissing-prototypes" |
From: Andrew M. <fit...@us...> - 2008-01-18 18:44:05
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22697 Modified Files: Makefile.in Log Message: Added datarootdir variable to make autoconf >= 2.60 happy. Index: Makefile.in =================================================================== RCS file: /cvsroot/radmind/radmind/Makefile.in,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -d -r1.108 -r1.109 *** Makefile.in 15 Jan 2008 19:40:51 -0000 1.108 --- Makefile.in 18 Jan 2008 18:43:59 -0000 1.109 *************** *** 9,12 **** --- 9,14 ---- prefix=@prefix@ exec_prefix=@exec_prefix@ + datarootdir=@datarootdir@ + datadir=@datadir@ MANDIR=@mandir@ BINDIR=@bindir@ |
From: Andrew M. <fit...@us...> - 2008-01-17 04:09:56
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30522 Modified Files: configure Log Message: Fix universal binary builds on Mac OS X 10.5. Lots of cruft as a result of upgraded autoconf on 10.5. Index: configure =================================================================== RCS file: /cvsroot/radmind/radmind/configure,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** configure 18 Jun 2007 19:40:05 -0000 1.52 --- configure 17 Jan 2008 04:09:51 -0000 1.53 *************** *** 1,9 **** #! /bin/sh # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.59 for radmind VERSION. # # Report bugs to <ra...@um...>. # ! # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. --- 1,10 ---- [...10898 lines suppressed...] ! { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 ! echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. ! eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ ! --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} *************** *** 6880,6884 **** fi ! cd $ac_popdir done fi --- 7387,7391 ---- fi ! cd "$ac_popdir" done fi |
From: Andrew M. <fit...@us...> - 2008-01-17 04:08:30
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30283 Modified Files: aclocal.m4 Log Message: Fix universal binary builds on Mac OS X 10.5. Index: aclocal.m4 =================================================================== RCS file: /cvsroot/radmind/radmind/aclocal.m4,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** aclocal.m4 18 Jun 2007 19:40:05 -0000 1.17 --- aclocal.m4 17 Jan 2008 04:08:26 -0000 1.18 *************** *** 125,133 **** AC_CANONICAL_SYSTEM case "${host_os}" in darwin*) echo =========================================================== echo Setting up universal binaries for ${host_os} echo =========================================================== ! OPTOPTS="$OPTOPTS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" ;; *) --- 125,146 ---- AC_CANONICAL_SYSTEM case "${host_os}" in + darwin8*) + macosx_sdk="MacOSX10.4u.sdk" + ;; + + darwin9*) + macosx_sdk="MacOSX10.5.sdk" + ;; + + *) + ;; + esac + + case "${host_os}" in darwin*) echo =========================================================== echo Setting up universal binaries for ${host_os} echo =========================================================== ! OPTOPTS="$OPTOPTS -isysroot /Developer/SDKs/$macosx_sdk -arch i386 -arch ppc" ;; *) |
From: Andrew M. <fit...@us...> - 2008-01-15 21:01:14
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18678 Modified Files: root.c Log Message: Use >= MAXPATHLEN instead of > MAXPATHEN - 1. Bounds checking in edge case. Index: root.c =================================================================== RCS file: /cvsroot/radmind/radmind/root.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** root.c 20 Jan 2006 21:27:27 -0000 1.6 --- root.c 15 Jan 2008 21:01:10 -0000 1.7 *************** *** 39,43 **** if ( snprintf( test_path, MAXPATHLEN, "%s/tmp/transcript", ! radmind_real_path ) > MAXPATHLEN - 1 ) { fprintf( stderr, "%s/tmp/transcirpt: path too long\n", radmind_real_path ); --- 39,43 ---- if ( snprintf( test_path, MAXPATHLEN, "%s/tmp/transcript", ! radmind_real_path ) >= MAXPATHLEN ) { fprintf( stderr, "%s/tmp/transcirpt: path too long\n", radmind_real_path ); *************** *** 48,52 **** if ( snprintf( file_root, MAXPATHLEN, "%s/tmp/file%s", radmind_real_path, &real_path[ strlen( test_path ) ]) ! > MAXPATHLEN - 1 ) { fprintf( stderr, "%s/tmp/file%s: path too long\n", radmind_real_path, &real_path[ strlen( test_path )] ); --- 48,52 ---- if ( snprintf( file_root, MAXPATHLEN, "%s/tmp/file%s", radmind_real_path, &real_path[ strlen( test_path ) ]) ! >= MAXPATHLEN ) { fprintf( stderr, "%s/tmp/file%s: path too long\n", radmind_real_path, &real_path[ strlen( test_path )] ); *************** *** 55,59 **** if ( snprintf( tran_root, MAXPATHLEN, "%s/tmp/transcript%s", radmind_real_path, &real_path[ strlen( test_path ) ]) ! > MAXPATHLEN - 1 ) { fprintf( stderr, "%s/tmp/transcript%s: path too long\n", radmind_real_path, &real_path[ strlen( test_path )] ); --- 55,59 ---- if ( snprintf( tran_root, MAXPATHLEN, "%s/tmp/transcript%s", radmind_real_path, &real_path[ strlen( test_path ) ]) ! >= MAXPATHLEN ) { fprintf( stderr, "%s/tmp/transcript%s: path too long\n", radmind_real_path, &real_path[ strlen( test_path )] ); *************** *** 62,66 **** } else { if ( snprintf( test_path, MAXPATHLEN, "%s/transcript", ! radmind_real_path ) > MAXPATHLEN - 1 ) { fprintf( stderr, "%s/transcript: path too long\n", radmind_real_path ); --- 62,66 ---- } else { if ( snprintf( test_path, MAXPATHLEN, "%s/transcript", ! radmind_real_path ) >= MAXPATHLEN ) { fprintf( stderr, "%s/transcript: path too long\n", radmind_real_path ); *************** *** 71,75 **** if ( snprintf( file_root, MAXPATHLEN, "%s/file%s", radmind_real_path, &real_path[ strlen( test_path ) ]) ! > MAXPATHLEN - 1 ) { fprintf( stderr, "%s/file%s: path too long\n", radmind_real_path, &real_path[ strlen( test_path ) ]); --- 71,75 ---- if ( snprintf( file_root, MAXPATHLEN, "%s/file%s", radmind_real_path, &real_path[ strlen( test_path ) ]) ! >= MAXPATHLEN ) { fprintf( stderr, "%s/file%s: path too long\n", radmind_real_path, &real_path[ strlen( test_path ) ]); *************** *** 78,82 **** if ( snprintf( tran_root, MAXPATHLEN, "%s/transcript%s", radmind_real_path, &real_path[ strlen( test_path ) ]) ! > MAXPATHLEN - 1 ) { fprintf( stderr, "%s/transcript%s: path too long\n", radmind_real_path, &real_path[ strlen( test_path )] ); --- 78,82 ---- if ( snprintf( tran_root, MAXPATHLEN, "%s/transcript%s", radmind_real_path, &real_path[ strlen( test_path ) ]) ! >= MAXPATHLEN ) { fprintf( stderr, "%s/transcript%s: path too long\n", radmind_real_path, &real_path[ strlen( test_path )] ); *************** *** 84,89 **** } } else { ! sprintf( file_root, "%s/../file", real_path ); ! sprintf( tran_root, "%s", real_path ); } } --- 84,89 ---- } } else { ! snprintf( file_root, MAXPATHLEN, "%s/../file", real_path ); ! snprintf( tran_root, MAXPATHLEN, "%s", real_path ); } } |
From: Andrew M. <fit...@us...> - 2008-01-15 20:04:09
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29055 Modified Files: t2pkg.c transcript.c transcript.h Log Message: t2pkg builds successfully without hacking now. Index: transcript.h =================================================================== RCS file: /cvsroot/radmind/radmind/transcript.h,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** transcript.h 3 Nov 2007 15:25:45 -0000 1.42 --- transcript.h 15 Jan 2008 20:04:03 -0000 1.43 *************** *** 66,69 **** --- 66,70 ---- void transcript_parse( struct transcript * ); void transcript_free( void ); + void t_new( int, char *, char *, char * ); int t_exclude( char *path ); void t_print( struct pathinfo *, struct transcript *, int ); Index: transcript.c =================================================================== RCS file: /cvsroot/radmind/radmind/transcript.c,v retrieving revision 1.124 retrieving revision 1.125 diff -C2 -d -r1.124 -r1.125 *** transcript.c 7 Jan 2008 01:51:35 -0000 1.124 --- transcript.c 15 Jan 2008 20:04:03 -0000 1.125 *************** *** 30,34 **** int read_kfile( char *kfile, int location ); - static void t_new( int type, char *fullname, char *shortname, char *kfile ); static void t_remove( int type, char *shortname ); static void t_display( void ); --- 30,33 ---- *************** *** 721,725 **** } ! static void t_new( int type, char *fullname, char *shortname, char *kfile ) { --- 720,724 ---- } ! void t_new( int type, char *fullname, char *shortname, char *kfile ) { Index: t2pkg.c =================================================================== RCS file: /cvsroot/radmind/radmind/t2pkg.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** t2pkg.c 15 Jan 2008 19:38:57 -0000 1.1 --- t2pkg.c 15 Jan 2008 20:04:02 -0000 1.2 *************** *** 37,46 **** --- 37,50 ---- extern int showprogress; extern off_t lsize; + extern char *version; int cksum = 0; int force = 0; int case_sensitive = 1; + int verbose = 0; const EVP_MD *md; + void (*logger)( char * ) = NULL; + int copy_file( struct transcript *t, char *dst, char *src, int where ); int local_update( struct transcript *t, char *dst, char *src, int where ); *************** *** 563,567 **** FILE *f; ! while (( c = getopt( ac, av, "%c:D:d:FIr:s" )) != EOF ) { switch ( c ) { case '%': /* % done progress */ --- 567,571 ---- FILE *f; ! while (( c = getopt( ac, av, "%c:D:d:FIr:sV" )) != EOF ) { switch ( c ) { case '%': /* % done progress */ *************** *** 611,614 **** --- 615,622 ---- break; + case 'V': /* version */ + printf( "%s\n", version ); + exit( 0 ); + default: err++; |
From: Andrew M. <fit...@us...> - 2008-01-15 19:40:56
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19836 Modified Files: Makefile.in Log Message: Added t2pkg targets. Not part of default bin build. Index: Makefile.in =================================================================== RCS file: /cvsroot/radmind/radmind/Makefile.in,v retrieving revision 1.107 retrieving revision 1.108 diff -C2 -d -r1.107 -r1.108 *** Makefile.in 3 Nov 2007 15:25:45 -0000 1.107 --- Makefile.in 15 Jan 2008 19:40:51 -0000 1.108 *************** *** 84,87 **** --- 84,91 ---- REPO_OBJ= version.o repo.o report.o argcargv.o connect.o code.o tls.o + T2PKG_OBJ= version.o t2pkg.o argcargv.o transcript.o connect.o code.o \ + hardlink.o cksum.o base64.o pathcmp.o radstat.o applefile.o \ + list.o rmdirs.o mkdirs.o wildcard.o progress.o + 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 \ *************** *** 175,178 **** --- 179,188 ---- -c ${srcdir}/root.c + t2pkg.o : t2pkg.c + ${CC} ${CFLAGS} \ + -D_RADMIND_COMMANDFILE=\"${COMMANDFILE}\" \ + -D_RADMIND_PATH=\"${RADMINDDIR}\" \ + -c ${srcdir}/t2pkg.c + twhich.o : twhich.c ${CC} ${CFLAGS} \ *************** *** 217,220 **** --- 227,233 ---- ${CC} ${CFLAGS} -o repo ${REPO_OBJ} ${LDFLAGS} + t2pkg: ${T2PKG_OBJ} + ${CC} ${CFLAGS} -o t2pkg ${T2PKG_OBJ} ${LDFLAGS} + twhich: ${TWHICH_OBJ} ${CC} ${CFLAGS} -o twhich ${TWHICH_OBJ} ${LDFLAGS} |
From: Andrew M. <fit...@us...> - 2008-01-15 19:39:25
|
Update of /cvsroot/radmind/radmind/contrib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19381 Removed Files: t2pkg.c Log Message: Moved out of contrib. --- t2pkg.c DELETED --- |
From: Andrew M. <fit...@us...> - 2008-01-15 19:39:02
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18995 Added Files: t2pkg.c Log Message: Moved out of contrib. Not part of default bin targets. --- 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...> - 2008-01-14 17:03:24
|
Update of /cvsroot/radmind/radmind/man In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7697 Modified Files: fsdiff.1 Log Message: Clarify current exclude behavior. Index: fsdiff.1 =================================================================== RCS file: /cvsroot/radmind/radmind/man/fsdiff.1,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** fsdiff.1 3 Nov 2007 15:25:45 -0000 1.14 --- fsdiff.1 14 Jan 2008 17:03:18 -0000 1.15 *************** *** 203,210 **** 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. --- 203,211 ---- 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 on disk 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. Exclude patterns will not affect things already in a ! transcript. .sp If there is no command file, the transcript used is the null transcript. |