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-07-16 03:19:51
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17106 Modified Files: RAServerAuth.m RAServerController.m RSMLoadsetEditor.m Log Message: Fix three possible leaks. Initialize execargs to NULL. Index: RAServerAuth.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RAServerAuth.m,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** RAServerAuth.m 24 Jun 2008 20:25:19 -0000 1.19 --- RAServerAuth.m 16 Jul 2008 03:19:44 -0000 1.20 *************** *** 104,108 **** NSString *output = nil; char buf[ MAXPATHLEN ]; ! char **execargs; NSMutableArray *av = nil; NSString *authToolPath; --- 104,108 ---- NSString *output = nil; char buf[ MAXPATHLEN ]; ! char **execargs = NULL; NSMutableArray *av = nil; NSString *authToolPath; *************** *** 149,154 **** if (( ac = [ av argv: &execargs ] ) == 0 ) { ! error = [ NSString stringWithFormat: ! @"chdir / failed: %s", strerror( errno ) ]; goto execute_command_cleanup; } --- 149,153 ---- if (( ac = [ av argv: &execargs ] ) == 0 ) { ! error = [ NSString stringWithString: @"argv creation failed" ]; goto execute_command_cleanup; } Index: RSMLoadsetEditor.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMLoadsetEditor.m,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** RSMLoadsetEditor.m 24 Jun 2008 20:25:19 -0000 1.24 --- RSMLoadsetEditor.m 16 Jul 2008 03:19:44 -0000 1.25 *************** *** 1004,1013 **** } - newEntry = [ entry mutableCopy ]; - if ( [ _allCommandFiles count ] != 1 ) { return( NO ); } [ allCommandFilesTable selectRow: 0 byExtendingSelection: NO ]; [ self setCurrentCommandFileName: [[ _allCommandFiles objectAtIndex: 0 ] --- 1004,1013 ---- } if ( [ _allCommandFiles count ] != 1 ) { return( NO ); } + newEntry = [ entry mutableCopy ]; + [ allCommandFilesTable selectRow: 0 byExtendingSelection: NO ]; [ self setCurrentCommandFileName: [[ _allCommandFiles objectAtIndex: 0 ] *************** *** 1071,1075 **** NSArray *items; NSString *newPath, *oldPath; ! NSString *newstring = [ text copy ]; NSRange range; id item; --- 1071,1075 ---- NSArray *items; NSString *newPath, *oldPath; ! NSString *newstring; NSRange range; id item; *************** *** 1105,1108 **** --- 1105,1109 ---- [ self moveCommandFileAtPath: oldPath toPath: newPath ]; } else if ( [ table isEqual: currentKFileTable ] ) { + newstring = [ text retain ]; items = _currentCommandFile; if ( row >= [ items count ] ) { Index: RAServerController.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RAServerController.m,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** RAServerController.m 24 Jun 2008 20:25:19 -0000 1.24 --- RAServerController.m 16 Jul 2008 03:19:44 -0000 1.25 *************** *** 787,791 **** int row; NSMutableDictionary *dict; ! NSString *newstring = [ text copy ]; if (( row = [ tv editedRow ] ) < 0 ) { --- 787,791 ---- int row; NSMutableDictionary *dict; ! NSString *newstring; if (( row = [ tv editedRow ] ) < 0 ) { *************** *** 795,798 **** --- 795,800 ---- return; } + + newstring = [ text retain ]; if ( ! [[ dict objectForKey: @"host" ] isEqualToString: newstring ] ) { |
From: Patrick M. <ume...@us...> - 2008-07-14 20:50:53
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15994 Modified Files: lmerge.c Log Message: Added -T option to only merge transcripts, not files. [Patch #2014521] Thanks to Eric Garver from the University of Michigan for the patch. Index: lmerge.c =================================================================== RCS file: /cvsroot/radmind/radmind/lmerge.c,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** lmerge.c 24 Apr 2008 18:32:02 -0000 1.56 --- lmerge.c 14 Jul 2008 20:50:50 -0000 1.57 *************** *** 179,182 **** --- 179,183 ---- int c, i, j, cmpval, err = 0, tcount = 0, candidate = 0; int force = 0, ofd, fileloc = 0, match = 0; + int merge_trans_only = 0; char *file = NULL; char npath[ 2 * MAXPATHLEN ]; *************** *** 195,199 **** mode_t mask; ! while ( ( c = getopt( argc, argv, "D:fInu:Vv" ) ) != EOF ) { switch( c ) { case 'D': --- 196,200 ---- mode_t mask; ! while ( ( c = getopt( argc, argv, "D:fInTu:Vv" ) ) != EOF ) { switch( c ) { case 'D': *************** *** 224,227 **** --- 225,231 ---- verbose = 1; break; + case 'T': + merge_trans_only = 1; + break; default: err++; *************** *** 232,235 **** --- 236,242 ---- tcount = argc - ( optind + 1 ); /* "+ 1" accounts for dest tran */ + if ( merge_trans_only && force ) { + err++; + } if ( noupload && ( tcount > 2 ) ) { err++; *************** *** 247,251 **** if ( err ) { ! fprintf( stderr, "Usage: %s [-vIV] [ -D path ] [ -u umask ] ", argv[ 0 ] ); fprintf( stderr, "transcript... dest\n" ); --- 254,258 ---- if ( err ) { ! fprintf( stderr, "Usage: %s [-vIVT] [ -D path ] [ -u umask ] ", argv[ 0 ] ); fprintf( stderr, "transcript... dest\n" ); *************** *** 253,257 **** argv[ 0 ] ); fprintf( stderr, "transcript1 transcript2\n" ); ! fprintf( stderr, " %s -n [-vIV] [ -D path ] [ -u umask ] ", argv[ 0 ] ); fprintf( stderr, "transcript1 transcript2 dest\n" ); --- 260,264 ---- argv[ 0 ] ); fprintf( stderr, "transcript1 transcript2\n" ); ! fprintf( stderr, " %s -n [-vIVT] [ -D path ] [ -u umask ] ", argv[ 0 ] ); fprintf( stderr, "transcript1 transcript2 dest\n" ); *************** *** 366,372 **** exit( 2 ); } ! if ( mkdir( npath, (mode_t)0777 ) != 0 ) { ! perror( npath ); ! exit( 2 ); } } --- 373,382 ---- exit( 2 ); } ! /* don't bother creating file/tname if only merging trans */ ! if ( !merge_trans_only ) { ! if ( mkdir( npath, (mode_t)0777 ) != 0 ) { ! perror( npath ); ! exit( 2 ); ! } } } *************** *** 474,480 **** goto skipline; } ! /* output non-files */ ! if ( *trans[ candidate ]->t_argv[ 0 ] != 'f' ! && *trans[ candidate ]->t_argv[ 0 ] != 'a' ) { goto outputline; } --- 484,493 ---- goto skipline; } ! /* output non-files, or if we're only merging transcripts ! * and there is no file linking necessary ! */ ! if (( *trans[ candidate ]->t_argv[ 0 ] != 'f' ! && *trans[ candidate ]->t_argv[ 0 ] != 'a') ! || merge_trans_only ) { goto outputline; } *************** *** 681,687 **** exit( 2 ); } ! if ( rename( opath, npath ) != 0 ) { ! perror( npath ); ! exit( 2 ); } } --- 694,705 ---- exit( 2 ); } ! /* don't try and move file/tname if doing client only merge, ! * it was never created. ! */ ! if ( !merge_trans_only ) { ! if ( rename( opath, npath ) != 0 ) { ! perror( npath ); ! exit( 2 ); ! } } } |
From: Patrick M. <ume...@us...> - 2008-07-14 20:50:53
|
Update of /cvsroot/radmind/radmind/man In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15994/man Modified Files: lmerge.1 Log Message: Added -T option to only merge transcripts, not files. [Patch #2014521] Thanks to Eric Garver from the University of Michigan for the patch. Index: lmerge.1 =================================================================== RCS file: /cvsroot/radmind/radmind/man/lmerge.1,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** lmerge.1 26 Mar 2007 18:56:53 -0000 1.9 --- lmerge.1 14 Jul 2008 20:50:50 -0000 1.10 *************** *** 5,9 **** .SH SYNOPSIS .B lmerge ! .RB [ \-IiVv ] [ .BI \-D\ path --- 5,9 ---- .SH SYNOPSIS .B lmerge ! .RB [ \-IiVvT ] [ .BI \-D\ path *************** *** 26,30 **** .B lmerge .B \-n ! .RB [ \-IiVv ] [ .BI \-D\ path --- 26,30 ---- .B lmerge .B \-n ! .RB [ \-IiVvT ] [ .BI \-D\ path *************** *** 99,102 **** --- 99,106 ---- transcript. .TP 19 + .B \-T + merge transcripts only. Do not perform file system linking. + May not be used with the \-f option. + .TP 19 .BI \-u\ umask use |
From: Andrew M. <fit...@us...> - 2008-06-27 17:00:33
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29935 Modified Files: ktcheck.c Log Message: Fix leak. Index: ktcheck.c =================================================================== RCS file: /cvsroot/radmind/radmind/ktcheck.c,v retrieving revision 1.134 retrieving revision 1.135 diff -C2 -d -r1.134 -r1.135 *** ktcheck.c 7 Jun 2008 14:26:54 -0000 1.134 --- ktcheck.c 27 Jun 2008 17:00:30 -0000 1.135 *************** *** 238,241 **** --- 238,242 ---- while (( node = list_pop_head( kfile_seen )) != NULL ) { expand_kfile( &khead, node->n_path ); + free( node ); } |
From: Andrew M. <fit...@us...> - 2008-06-24 20:49:32
|
Update of /cvsroot/radmind/radmind-assistant/rte In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29281 Modified Files: rteauthexec.c Log Message: Increase max open files before executing tools. Handles large K files. Index: rteauthexec.c =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/rteauthexec.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** rteauthexec.c 26 Apr 2006 14:01:10 -0000 1.11 --- rteauthexec.c 24 Jun 2008 20:49:29 -0000 1.12 *************** *** 72,77 **** rte_exec( int ac, char *av[] ) { ! int status; ! pid_t pid; switch ( fork()) { --- 72,87 ---- rte_exec( int ac, char *av[] ) { ! int status; ! pid_t pid; ! struct rlimit rl; ! ! /* increase maximum number of open fds for long command files */ ! rl.rlim_max = rl.rlim_cur = 1024; ! ! if ( setrlimit( RLIMIT_NOFILE, &rl ) < 0 ) { ! fprintf( stderr, "Using setrlimit to increase number of open files " ! "returned an error: %s\n", strerror( errno )); ! exit( 2 ); ! } switch ( fork()) { |
From: Andrew M. <fit...@us...> - 2008-06-24 20:26:01
|
Update of /cvsroot/radmind/radmind-assistant/rsm/rsm.xcodeproj In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18583 Modified Files: project.pbxproj Log Message: Removed authtools.c and authtools.h from project. Index: project.pbxproj =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/rsm.xcodeproj/project.pbxproj,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** project.pbxproj 24 Jun 2008 06:17:37 -0000 1.14 --- project.pbxproj 24 Jun 2008 20:25:58 -0000 1.15 *************** *** 15,19 **** 0966F50009490F6C0061D4EC /* RASplitView.h in Headers */ = {isa = PBXBuildFile; fileRef = 09718B030466E89B003C81A3 /* RASplitView.h */; }; 0966F50109490F6C0061D4EC /* RASTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 09718B050466E89C003C81A3 /* RASTableView.h */; }; - 0966F50209490F6C0061D4EC /* authtools.h in Headers */ = {isa = PBXBuildFile; fileRef = 097966E30468BFF100A8002B /* authtools.h */; }; 0966F50409490F6C0061D4EC /* argcargv.h in Headers */ = {isa = PBXBuildFile; fileRef = 097966EB0468C08C00A8002B /* argcargv.h */; }; 0966F50509490F6C0061D4EC /* RSMLoadsetEditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 09C83D7E0469880100A8002B /* RSMLoadsetEditor.h */; }; --- 15,18 ---- *************** *** 66,70 **** 0966F53709490F6C0061D4EC /* RASplitView.m in Sources */ = {isa = PBXBuildFile; fileRef = 09718B040466E89C003C81A3 /* RASplitView.m */; }; 0966F53809490F6C0061D4EC /* RASTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 09718B060466E89C003C81A3 /* RASTableView.m */; }; - 0966F53909490F6C0061D4EC /* authtools.c in Sources */ = {isa = PBXBuildFile; fileRef = 097966E20468BFF100A8002B /* authtools.c */; }; 0966F53B09490F6C0061D4EC /* argcargv.c in Sources */ = {isa = PBXBuildFile; fileRef = 097966EA0468C08C00A8002B /* argcargv.c */; }; 0966F53C09490F6C0061D4EC /* RSMLoadsetEditor.m in Sources */ = {isa = PBXBuildFile; fileRef = 09C83D7F0469880100A8002B /* RSMLoadsetEditor.m */; }; --- 65,68 ---- *************** *** 176,181 **** 09773132048C53C6007C46D8 /* code.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = code.h; sourceTree = "<group>"; }; 097966E00468BFAE00A8002B /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; }; - 097966E20468BFF100A8002B /* authtools.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = authtools.c; sourceTree = "<group>"; }; - 097966E30468BFF100A8002B /* authtools.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = authtools.h; sourceTree = "<group>"; }; 097966EA0468C08C00A8002B /* argcargv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = argcargv.c; sourceTree = "<group>"; }; 097966EB0468C08C00A8002B /* argcargv.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = argcargv.h; sourceTree = "<group>"; }; --- 174,177 ---- *************** *** 443,448 **** 09FBAD1D064ABA9D0089C37B /* srvprocinfo.h */, 29B97316FDCFA39411CA2CEA /* main.m */, - 097966E20468BFF100A8002B /* authtools.c */, - 097966E30468BFF100A8002B /* authtools.h */, 097966EA0468C08C00A8002B /* argcargv.c */, 097966EB0468C08C00A8002B /* argcargv.h */, --- 439,442 ---- *************** *** 487,491 **** 0966F50009490F6C0061D4EC /* RASplitView.h in Headers */, 0966F50109490F6C0061D4EC /* RASTableView.h in Headers */, - 0966F50209490F6C0061D4EC /* authtools.h in Headers */, 0966F50409490F6C0061D4EC /* argcargv.h in Headers */, 0966F50509490F6C0061D4EC /* RSMLoadsetEditor.h in Headers */, --- 481,484 ---- *************** *** 633,637 **** 0966F53709490F6C0061D4EC /* RASplitView.m in Sources */, 0966F53809490F6C0061D4EC /* RASTableView.m in Sources */, - 0966F53909490F6C0061D4EC /* authtools.c in Sources */, 0966F53B09490F6C0061D4EC /* argcargv.c in Sources */, 0966F53C09490F6C0061D4EC /* RSMLoadsetEditor.m in Sources */, --- 626,629 ---- |
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18085 Modified Files: RAServerAuth.m RAServerController.m RSMLoadsetEditor.m RSMLoadsetManager.m RSMPreferences.m Removed Files: authtools.c authtools.h Log Message: Removed useless C functions. Fixed type mismatch. Index: RAServerAuth.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RAServerAuth.m,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** RAServerAuth.m 24 Jun 2008 20:07:05 -0000 1.18 --- RAServerAuth.m 24 Jun 2008 20:25:19 -0000 1.19 *************** *** 20,25 **** #include <unistd.h> - #include "authtools.h" - @class RSMLoadsetManager; --- 20,23 ---- Index: RAServerController.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RAServerController.m,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** RAServerController.m 24 Jun 2008 20:14:11 -0000 1.23 --- RAServerController.m 24 Jun 2008 20:25:19 -0000 1.24 *************** *** 22,26 **** #include "argcargv.h" - #include "authtools.h" extern int errno; --- 22,25 ---- Index: RSMPreferences.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMPreferences.m,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** RSMPreferences.m 24 Jun 2008 20:18:40 -0000 1.17 --- RSMPreferences.m 24 Jun 2008 20:25:19 -0000 1.18 *************** *** 15,19 **** #include <unistd.h> - #include "authtools.h" #include "sessionrights.h" #include "srvprocinfo.h" --- 15,18 ---- Index: RSMLoadsetEditor.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMLoadsetEditor.m,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** RSMLoadsetEditor.m 24 Jun 2008 20:13:41 -0000 1.23 --- RSMLoadsetEditor.m 24 Jun 2008 20:25:19 -0000 1.24 *************** *** 15,19 **** #include "argcargv.h" - #include "authtools.h" #define RSMLEToolbarRefreshIdentifier @"rsmlerefresh" --- 15,18 ---- --- authtools.c DELETED --- Index: RSMLoadsetManager.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMLoadsetManager.m,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** RSMLoadsetManager.m 24 Jun 2008 20:17:21 -0000 1.50 --- RSMLoadsetManager.m 24 Jun 2008 20:25:19 -0000 1.51 *************** *** 18,22 **** #include "argcargv.h" - #include "authtools.h" /* toolbar identifiers */ --- 18,21 ---- *************** *** 1471,1476 **** } ! [ _rsmLogger addText: [ NSString stringWithUTF8String: error ] ! isError: YES ]; NSRunAlertPanel( NSLocalizedString( @"Error", @"Error" ), --- 1470,1474 ---- } ! [ _rsmLogger addText: error isError: YES ]; NSRunAlertPanel( NSLocalizedString( @"Error", @"Error" ), --- authtools.h DELETED --- |
From: Andrew M. <fit...@us...> - 2008-06-24 20:18:43
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15208 Modified Files: RSMPreferences.m Log Message: Using ObjC calls to locate resources. Index: RSMPreferences.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMPreferences.m,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** RSMPreferences.m 3 Jun 2007 03:24:31 -0000 1.16 --- RSMPreferences.m 24 Jun 2008 20:18:40 -0000 1.17 *************** *** 756,759 **** --- 756,760 ---- { NSArray *args = nil; + NSString *authToolPath; pid_t pid; fd_set readmask; *************** *** 761,765 **** int status; int wfd[ 2 ], efd[ 2 ]; - char authtool[ MAXPATHLEN ] = { 0 }; char **execargs = NULL, buf[ MAXPATHLEN ]; AuthorizationRef authRef; --- 762,765 ---- *************** *** 797,807 **** } ! if ( pathfortool( "rsmauthtool", authtool ) != 0 ) { ! [ self preferencesError: @"Failed to locate authorized tool." ]; ! return; } ! args = [ NSArray arrayWithObject: ! [ NSString stringWithUTF8String: authtool ]]; args = [ args arrayByAddingObjectsFromArray: authorizedTaskParameters ]; --- 797,808 ---- } ! if (( authToolPath = [[ NSBundle mainBundle ] ! pathForResource: @"rsmauthtool" ! ofType: nil ] ) == nil ) { ! NSLog( @"rsmauthtool couldn't be found." ); ! return; } ! args = [ NSArray arrayWithObject: authToolPath ]; args = [ args arrayByAddingObjectsFromArray: authorizedTaskParameters ]; |
From: Andrew M. <fit...@us...> - 2008-06-24 20:18:05
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14754 Modified Files: RSMLogger.h RSMLogger.m Log Message: Improved task logging Can now handle variable args. Index: RSMLogger.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMLogger.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RSMLogger.m 23 Dec 2003 15:36:38 -0000 1.1 --- RSMLogger.m 24 Jun 2008 20:18:02 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- #import "RSMLogger.h" + #import "NSTextView(LogMessage).h" @implementation RSMLogger *************** *** 43,46 **** --- 44,69 ---- } + - ( void )logArguments: ( NSArray * )arguments + { + [ rsmLoggerTextView logRadmindTask: arguments ]; + } + + - ( void )logMessage: ( NSString * )fmt, ... + { + NSString *msg = nil; + va_list val; + + va_start( val, fmt ); + + msg = [[[ NSString alloc ] initWithFormat: fmt + arguments: val ] autorelease ]; + + va_end( val ); + + [ rsmLoggerTextView setEditable: YES ]; + [ rsmLoggerTextView insertText: msg ]; + [ rsmLoggerTextView setEditable: NO ]; + } + - ( void )showLogWindow: ( id )sender { Index: RSMLogger.h =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMLogger.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RSMLogger.h 23 Dec 2003 15:36:38 -0000 1.1 --- RSMLogger.h 24 Jun 2008 20:18:02 -0000 1.2 *************** *** 10,13 **** --- 10,15 ---- - ( void )addText: ( NSString * )text isError: ( BOOL )error; + - ( void )logArguments: ( NSArray * )arguments; + - ( void )logMessage: ( NSString * )fmt, ...; - ( void )showLogWindow: ( id )sender; |
From: Andrew M. <fit...@us...> - 2008-06-24 20:17:24
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13353 Modified Files: RSMLoadsetManager.m Log Message: Improved task cancellation. Improved task logging. Improved discovery of radmind tools. Improved error reporting. Index: RSMLoadsetManager.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMLoadsetManager.m,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** RSMLoadsetManager.m 30 Mar 2008 14:07:30 -0000 1.49 --- RSMLoadsetManager.m 24 Jun 2008 20:17:21 -0000 1.50 *************** *** 5,9 **** #import "RAOutlineView.h" #import "RAEditorLauncher.h" - #import "RAAuthKiller.h" #import "RAServerController.h" #import "RSMLoadsetEditor.h" --- 5,8 ---- *************** *** 493,497 **** NSEnumerator *en; BOOL caseInsensitive = NO; - char toolpath[ MAXPATHLEN ]; id activeTable = [ transcriptWindow firstResponder ]; id item, rowNumber; --- 492,495 ---- *************** *** 519,529 **** message = [ NSString stringWithFormat: @"Verifying %@...", [ transcript lastPathComponent ]]; ! if ( pathfortool( "lcksum", toolpath ) != 0 ) { ! NSLog( @"access lcksum: %s", strerror( errno )); ! return; ! } ! args = [ NSArray arrayWithObjects: @"-A", @"ExecuteCommand", ! @"-d", [[ self delegate ] sessionTmpDirectory ], @"--", ! [ NSString stringWithUTF8String: toolpath ], nil ]; if ( caseInsensitive ) { args = [ args arrayByAddingObject: @"-I" ]; --- 517,524 ---- message = [ NSString stringWithFormat: @"Verifying %@...", [ transcript lastPathComponent ]]; ! args = [ NSArray arrayWithObjects: @"-A", @"ExecuteCommand", @"-d", ! [[ self delegate ] sessionTmpDirectory ], @"--", ! [[ NSWorkspace sharedWorkspace ] ! pathForRadmindTool: @"lcksum" ], nil ]; if ( caseInsensitive ) { args = [ args arrayByAddingObject: @"-I" ]; *************** *** 532,551 **** [ NSArray arrayWithObjects: @"-n", @"-i", @"-%", @"-csha1", transcript, nil ]]; ! ! [ toolProgressDetailsTextView logMessage: @"# %s -n -i -%% -c sha1 %@\n", ! toolpath, transcript ]; break; case RA_TRANSCRIPT_UPDATE: - if ( pathfortool( "lcksum", toolpath ) != 0 ) { - NSLog( @"access lcksum: %s", strerror( errno )); - return; - } message = [ NSString stringWithFormat: @"Updating %@...", [ transcript lastPathComponent ]]; ! args = [ NSArray arrayWithObjects: @"-A", @"ExecuteCommand", ! @"-d", [[ self delegate ] sessionTmpDirectory ], @"--", ! [ NSString stringWithUTF8String: toolpath ], nil ]; if ( caseInsensitive ) { args = [ args arrayByAddingObject: @"-I" ]; --- 527,542 ---- [ NSArray arrayWithObjects: @"-n", @"-i", @"-%", @"-csha1", transcript, nil ]]; ! [ toolProgressDetailsTextView logRadmindTask: args ]; ! [ _rsmLogger logArguments: args ]; break; case RA_TRANSCRIPT_UPDATE: message = [ NSString stringWithFormat: @"Updating %@...", [ transcript lastPathComponent ]]; ! args = [ NSArray arrayWithObjects: @"-A", @"ExecuteCommand", @"-d", ! [[ self delegate ] sessionTmpDirectory ], @"--", ! [[ NSWorkspace sharedWorkspace ] ! pathForRadmindTool: @"lcksum" ], nil ]; if ( caseInsensitive ) { args = [ args arrayByAddingObject: @"-I" ]; *************** *** 555,575 **** @"-i", @"-%", @"-csha1", transcript, nil ]]; ! [ toolProgressDetailsTextView logMessage: @"# %s -i -%% -c sha1 %@\n", ! toolpath, transcript ]; break; case RA_TRANSCRIPT_LOCAL_BACKUP: - if ( pathfortool( "lmerge", toolpath ) != 0 ) { - NSBeep(); - NSLog( @"access lmerge: %s", strerror( errno )); - return; - } - message = [ NSString stringWithFormat: @"Making local backup of %@...", [ transcript lastPathComponent ]]; ! args = [ NSArray arrayWithObjects: @"-A", @"ExecuteCommand", ! @"-d", [[ self delegate ] sessionTmpDirectory ], @"--", ! [ NSString stringWithUTF8String: toolpath ], nil ]; if ( caseInsensitive ) { args = [ args arrayByAddingObject: @"-I" ]; --- 546,561 ---- @"-i", @"-%", @"-csha1", transcript, nil ]]; ! [ toolProgressDetailsTextView logRadmindTask: args ]; ! [ _rsmLogger logArguments: args ]; break; case RA_TRANSCRIPT_LOCAL_BACKUP: message = [ NSString stringWithFormat: @"Making local backup of %@...", [ transcript lastPathComponent ]]; ! args = [ NSArray arrayWithObjects: @"-A", @"ExecuteCommand", @"-d", ! [[ self delegate ] sessionTmpDirectory ], @"--", ! [[ NSWorkspace sharedWorkspace ] ! pathForRadmindTool: @"lmerge" ], nil ]; if ( caseInsensitive ) { args = [ args arrayByAddingObject: @"-I" ]; *************** *** 582,588 **** timeZone: nil locale: nil ]], nil ]]; ! [ toolProgressDetailsTextView logMessage: ! @"# %s -u 077 %@ %@ %@.backup\n", ! toolpath, transcript, transcript, transcript ]; break; --- 568,573 ---- timeZone: nil locale: nil ]], nil ]]; ! [ toolProgressDetailsTextView logRadmindTask: args ]; ! [ _rsmLogger logArguments: args ]; break; *************** *** 1083,1088 **** NSArray *args = nil; NSDictionary *mergeInfo = nil; - char lmerge[ MAXPATHLEN ] = { 0 }; - NSString *lmergePath = nil; BOOL caseInsensitive = NO; --- 1068,1071 ---- *************** *** 1127,1136 **** return; } - - if ( pathfortool( "lmerge", lmerge ) != 0 ) { - NSLog( @"access lmerge: %s", strerror( errno )); - return; - } - lmergePath = [ NSString stringWithUTF8String: lmerge ]; [ progBar setUsesThreadedAnimation: YES ]; --- 1110,1113 ---- *************** *** 1142,1148 **** contextInfo: nil ]; ! args = [ NSArray arrayWithObjects: @"-A", @"ExecuteCommand", ! @"-d", [[ self delegate ] sessionTmpDirectory ], @"--", ! lmergePath, nil ]; if ( caseInsensitive ) { args = [ args arrayByAddingObject: @"-I" ]; --- 1119,1126 ---- contextInfo: nil ]; ! args = [ NSArray arrayWithObjects: @"-A", @"ExecuteCommand", @"-d", ! [[ self delegate ] sessionTmpDirectory ], @"--", ! [[ NSWorkspace sharedWorkspace ] ! pathForRadmindTool: @"lmerge" ], nil ]; if ( caseInsensitive ) { args = [ args arrayByAddingObject: @"-I" ]; *************** *** 1172,1175 **** --- 1150,1155 ---- controller: self ]; } + + [ _rsmLogger logArguments: args ]; } *************** *** 1330,1333 **** --- 1310,1314 ---- { BOOL refreshLoadsetListing = NO; + pid_t pid = [ self currentCommandPID ]; if ( ID != [ self loadsetManagerHelperThreadID ] ) { *************** *** 1354,1358 **** NULL, NULL, NULL, NSLocalizedString( @"Task with process id number %d cancelled.", @"Task with process id number %d cancelled." ), ! [ self currentCommandPID ] ); currentProcessKilled = NO; return; --- 1335,1339 ---- NULL, NULL, NULL, NSLocalizedString( @"Task with process id number %d cancelled.", @"Task with process id number %d cancelled." ), ! pid ); currentProcessKilled = NO; return; *************** *** 1437,1441 **** } ! NSLog( @"%@ deleted", [ self transcript ] ); refreshLoadsetListing = YES; --- 1418,1422 ---- } ! [ _rsmLogger logMessage: @"%@ deleted", [ self transcript ]]; refreshLoadsetListing = YES; *************** *** 1447,1451 **** } ! NSLog( @"checked in %@", [[ self transcript ] lastPathComponent ] ); refreshLoadsetListing = YES; break; --- 1428,1433 ---- } ! [ _rsmLogger logMessage: @"Checked in %@", ! [[ self transcript ] lastPathComponent ]]; refreshLoadsetListing = YES; break; *************** *** 1466,1470 **** } ! NSLog( @"%@ backed up.", [[ self transcript ] lastPathComponent ] ); refreshLoadsetListing = YES; break; --- 1448,1453 ---- } ! [ _rsmLogger logMessage: ! @"%@ hardlink snapshot created", [ self transcript ]]; refreshLoadsetListing = YES; break; *************** *** 1479,1486 **** TASK_ERROR: ! NSLog( @"Error: exit status %d", status ); } ! - ( void )toolError: ( char * )error fromThreadWithID: ( int )ID { if ( ID != [ self loadsetManagerHelperThreadID ] ) { --- 1462,1469 ---- TASK_ERROR: ! [ _rsmLogger logMessage: @"Error: exit status %d", status ]; } ! - ( oneway void )toolError: ( NSString * )error fromThreadWithID: ( int )ID { if ( ID != [ self loadsetManagerHelperThreadID ] ) { *************** *** 1492,1496 **** NSRunAlertPanel( NSLocalizedString( @"Error", @"Error" ), ! @"%s", NSLocalizedString( @"OK", @"OK" ), @"", @"", error ); } --- 1475,1479 ---- NSRunAlertPanel( NSLocalizedString( @"Error", @"Error" ), ! @"%@", NSLocalizedString( @"OK", @"OK" ), @"", @"", error ); } *************** *** 1587,1591 **** int rc; pid_t pid; ! RAAuthKiller *akill = nil; rc = NSRunAlertPanel( @"Are you sure you want to cancel?", --- 1570,1575 ---- int rc; pid_t pid; ! NSString *error = nil; ! RAServerAuth *akill = nil; rc = NSRunAlertPanel( @"Are you sure you want to cancel?", *************** *** 1609,1615 **** currentProcessKilled = YES; ! akill = [[ RAAuthKiller alloc ] init ]; ! [ akill killTool: pid forController: self ]; [ akill release ]; } --- 1593,1602 ---- currentProcessKilled = YES; ! akill = [[ RAServerAuth alloc ] init ]; ! rc = [ akill cancelTask: pid error: &error ]; [ akill release ]; + if ( error != nil ) { + NSRunAlertPanel( @"Could not cancel", error, @"OK", @"", @"" ); + } } |
From: Andrew M. <fit...@us...> - 2008-06-24 20:14:14
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv12924 Modified Files: RAServerController.h RAServerController.m Log Message: Improved error reporting. Index: RAServerController.h =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RAServerController.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RAServerController.h 18 Mar 2008 21:20:35 -0000 1.7 --- RAServerController.h 24 Jun 2008 20:14:11 -0000 1.8 *************** *** 79,83 **** - ( void )readRadmindServerConfigFile; ! - ( void )toolError: ( char * )error fromThreadWithID: ( int )ID; - ( void )authorizationFailedInThreadWithID: ( int )ID; --- 79,83 ---- - ( void )readRadmindServerConfigFile; ! - ( oneway void )toolError: ( NSString * )error fromThreadWithID: ( int )ID; - ( void )authorizationFailedInThreadWithID: ( int )ID; Index: RAServerController.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RAServerController.m,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** RAServerController.m 18 Mar 2008 21:20:35 -0000 1.22 --- RAServerController.m 24 Jun 2008 20:14:11 -0000 1.23 *************** *** 7,11 **** #import "RAServerAuth.h" #import "RAEditorLauncher.h" - #import "RAAuthKiller.h" #import "RSMLoadsetEditor.h" #import "RSMLoadsetManager.h" --- 7,10 ---- *************** *** 720,724 **** } ! - ( void )toolError: ( char * )error fromThreadWithID: ( int )ID { if ( ID != [ self configHelperThreadID ] ) { --- 719,723 ---- } ! - ( oneway void )toolError: ( NSString * )error fromThreadWithID: ( int )ID { if ( ID != [ self configHelperThreadID ] ) { *************** *** 727,731 **** NSRunAlertPanel( NSLocalizedString( @"Error", @"Error" ), ! @"%s", NSLocalizedString( @"OK", @"OK" ), @"", @"", error ); } --- 726,730 ---- NSRunAlertPanel( NSLocalizedString( @"Error", @"Error" ), ! @"%@", NSLocalizedString( @"OK", @"OK" ), @"", @"", error ); } |
From: Andrew M. <fit...@us...> - 2008-06-24 20:13:44
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv12851 Modified Files: RSMLoadsetEditor.m Log Message: Improved error reporting. Index: RSMLoadsetEditor.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMLoadsetEditor.m,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** RSMLoadsetEditor.m 18 Mar 2008 21:20:35 -0000 1.22 --- RSMLoadsetEditor.m 24 Jun 2008 20:13:41 -0000 1.23 *************** *** 511,515 **** } ! - ( void )toolError: ( char * )error fromThreadWithID: ( int )ID { if ( ID != [ self loadsetEditorHelperThreadID ] ) { --- 511,515 ---- } ! - ( oneway void )toolError: ( NSString * )error fromThreadWithID: ( int )ID { if ( ID != [ self loadsetEditorHelperThreadID ] ) { *************** *** 518,522 **** NSRunAlertPanel( NSLocalizedString( @"Error", @"Error" ), ! @"%s", NSLocalizedString( @"OK", @"OK" ), @"", @"", error ); } --- 518,522 ---- NSRunAlertPanel( NSLocalizedString( @"Error", @"Error" ), ! @"%@", NSLocalizedString( @"OK", @"OK" ), @"", @"", error ); } |
From: Andrew M. <fit...@us...> - 2008-06-24 20:07:08
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9993 Modified Files: RAServerAuth.h RAServerAuth.m Log Message: Using AMAuthorization. Improved resource cleanup and error reporting. Index: RAServerAuth.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RAServerAuth.m,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** RAServerAuth.m 24 Jun 2008 06:18:35 -0000 1.17 --- RAServerAuth.m 24 Jun 2008 20:07:05 -0000 1.18 *************** *** 26,30 **** extern int errno; static int threadID = 0; - static AuthorizationRef rsmAuthRef = NULL; @implementation RAServerAuth --- 26,29 ---- *************** *** 79,83 **** { self = [ super init ]; ! rascontroller = nil; return( self ); --- 78,82 ---- { self = [ super init ]; ! rascontroller = nil; return( self ); *************** *** 98,130 **** } ! - ( oneway void )executeCommand: ( int )cmd withArguments: ( NSArray * )args controller: ( id )controller { ! AuthorizationItem right = { "edu.umich.radmind.generic", 0, ! NULL, 0 }; ! int rc; ! ! if ( rascontroller ) { ! rascontroller = nil; ! } ! rascontroller = controller; ! ! rc = [ self prepareAuthorizedCommand: cmd withRight: right ! andArguments: args ]; ! ! if ( rc == -2 ) { ! [ rascontroller authorizationFailedInThreadWithID: [ self threadID ]]; ! return; ! } ! ! [ rascontroller command: cmd finishedWithStatus: rc ! inThread: [ self threadID ]]; ! } ! ! - ( int )executeAuthorizedCommand: ( int )command ! withRef: ( AuthorizationRef )authRef ! andArguments: ( NSArray * )args; ! { char buf[ MAXPATHLEN ]; char **execargs; --- 97,108 ---- } ! - ( oneway void )executeCommand: ( int )command withArguments: ( NSArray * )args controller: ( id )controller { ! AMAuthorization *auth; ! AuthorizationExternalForm externalForm; ! NSString *error = nil; ! NSString *output = nil; char buf[ MAXPATHLEN ]; char **execargs; *************** *** 132,269 **** NSString *authToolPath; int wfd[ 2 ], rfd[ 2 ], efd[ 2 ]; ! int status, ac, i; pid_t pid; fd_set readmask; FILE *rf = NULL, *ef = NULL; - - AuthorizationExternalForm extAuth; if (( authToolPath = [[ NSBundle mainBundle ] pathForResource: @"rsmauthtool" ofType: nil ] ) == nil ) { ! NSLog( @"rsmauthtool couldn't be found." ); ! return( -1 ); } ! av = [[ NSMutableArray alloc ] init ]; [ av addObject: authToolPath ]; [ av addObjectsFromArray: args ]; - - if ( AuthorizationMakeExternalForm( authRef, &extAuth ) != 0 ) { - NSLog( @"Failed to make external auth form" ); - return( -1 ); - } ! if ( pipe( wfd ) != 0 ) { ! NSLog( @"pipe failed: %s", strerror( errno )); ! return( -1 ); ! } ! if ( pipe( rfd ) != 0 ) { ! NSLog( @"pipe failed: %s", strerror( errno )); ! return( -1 ); ! } ! if ( pipe( efd ) != 0 ) { ! NSLog( @"pipe failed: %s", strerror( errno )); ! return( -1 ); } if ( chdir( "/" ) != 0 ) { ! NSLog( @"chdir to / failed: %s\n", strerror( errno )); ! return( -1 ); } if (( ac = [ av argv: &execargs ] ) == 0 ) { ! [ rascontroller toolError: "Nothing to execute." ! fromThreadWithID: [ self threadID ]]; ! /* XXXX cleanup */ ! return( -1 ); } - [ av release ]; switch (( pid = fork())) { case 0: ! ( void )close( wfd[ 1 ] ); ! if ( dup2( wfd[ 0 ], 0 ) < 0 ) { ! syslog( LOG_ERR, "dup2 failed: %s", strerror( errno )); ! _exit( 2 ); ! } ! ! ( void )close( rfd[ 0 ] ); ! if ( dup2( rfd[ 1 ], 1 ) < 0 ) { ! syslog( LOG_ERR, "dup2 failed: %s", strerror( errno )); ! _exit( 2 ); } setvbuf( stdout, NULL, _IONBF, 0 ); ! ( void )close( efd[ 0 ] ); ! if ( dup2( efd[ 1 ], 2 ) < 0 ) { ! syslog( LOG_ERR, "dup2 failed: %s", strerror( errno )); ! _exit( 2 ); ! } ! ( void )close( efd[ 1 ] ); ! ( void )close( wfd[ 0 ] ); ! ( void )close( rfd[ 1 ] ); if ( setpgid( getpid(), getpid()) < 0 ) { ! syslog( LOG_ERR, "setpgid failed: %s", strerror( errno )); ! _exit( 2 ); } execve( execargs[ 0 ], execargs, NULL ); ! syslog( LOG_ERR, "execve: %s: %s", execargs[ 0 ], strerror( errno )); _exit( 2 ); case -1: ! syslog( LOG_ERR, "fork() failed: %s", strerror( errno )); ! ( void )close( wfd[ 0 ] ); ! ( void )close( wfd[ 1 ] ); ! ( void )close( efd[ 0 ] ); ! ( void )close( efd[ 1 ] ); ! ( void )close( rfd[ 0 ] ); ! ( void )close( rfd[ 1 ] ); ! ! return( -1 ); default: break; } - - for ( i = 0; i <= ac; i++ ) { - free( execargs[ i ] ); - } - free( execargs ); - - signal( SIGPIPE, SIG_IGN ); ! [ rascontroller setCurrentCommandPID: pid threadID: [ self threadID ]]; ! ( void )close( wfd[ 0 ] ); ! ( void )close( rfd[ 1 ] ); ! ( void )close( efd[ 1 ] ); ! if ( write( wfd[ 1 ], &extAuth, sizeof( extAuth )) != sizeof( extAuth )) { ! syslog( LOG_ERR, "write failed: %s", strerror( errno )); ! ( void )close( wfd[ 1 ] ); ! return( -1 ); } ! ( void )close( wfd[ 1 ] ); ! ! if ( fcntl( rfd[ 0 ], F_SETFL, O_NONBLOCK ) < 0 ) { ! [ rascontroller toolError: ! "Failed to set non-blocking I/O on read descriptor." ! fromThreadWithID: [ self threadID ]]; ! return( -1 ); ! } ! if ( fcntl( efd[ 0 ], F_SETFL, O_NONBLOCK ) < 0 ) { ! NSLog( @"non-block: %s", strerror( errno )); ! return( -1 ); } ! if (( rf = fdopen( rfd[ 0 ], "r" )) == NULL ) { ! NSLog( @"fdopen rfd[ 0 ]: %s", strerror( errno )); ! return( -1 ); } ! if (( ef = fdopen( efd[ 0 ], "r" )) == NULL ) { ! NSLog( @"fdopen efd[ 0 ]: %s", strerror( errno )); ! return( -1 ); } --- 110,238 ---- NSString *authToolPath; int wfd[ 2 ], rfd[ 2 ], efd[ 2 ]; ! int status, i, ac = -1; ! int rc = -1; pid_t pid; fd_set readmask; FILE *rf = NULL, *ef = NULL; + auth = [ AMAuthorization authorizationWithName: @"edu.umich.radmind.generic" + preAuthorize: YES allowInteraction: YES + extendRights: YES ]; + if ( auth == nil ) { + [ controller authorizationFailedInThreadWithID: [ self threadID ]]; + return; + } + [ auth externalForm: &externalForm ]; + if (( authToolPath = [[ NSBundle mainBundle ] pathForResource: @"rsmauthtool" ofType: nil ] ) == nil ) { ! error = [ NSString stringWithString: ! @"rsmauthtool couldn't be found." ]; ! goto execute_command_cleanup; } ! av = [[[ NSMutableArray alloc ] init ] autorelease ]; [ av addObject: authToolPath ]; [ av addObjectsFromArray: args ]; ! wfd[ 0 ] = wfd[ 1 ] = rfd[ 0 ] = rfd[ 1 ] = efd[ 0 ] = efd[ 1 ] = -1; ! if ( pipe( wfd ) != 0 || pipe( rfd ) != 0 || pipe( efd ) != 0 ) { ! error = [ NSString stringWithFormat: ! @"pipe failed: %s", strerror( errno ) ]; ! goto execute_command_cleanup; } if ( chdir( "/" ) != 0 ) { ! error = [ NSString stringWithFormat: ! @"chdir / failed: %s", strerror( errno ) ]; ! goto execute_command_cleanup; } if (( ac = [ av argv: &execargs ] ) == 0 ) { ! error = [ NSString stringWithFormat: ! @"chdir / failed: %s", strerror( errno ) ]; ! goto execute_command_cleanup; } switch (( pid = fork())) { case 0: ! if ( close( wfd[ 1 ] ) != 0 || close( rfd[ 0 ] ) != 0 || ! close( efd[ 0 ] ) != 0 ) { ! fprintf( stderr, "child: close failed: %s\n", strerror( errno )); ! fflush( stderr ); ! exit( 2 ); ! } ! if ( dup2( wfd[ 0 ], 0 ) < 0 || dup2( rfd[ 1 ], 1 ) < 0 || ! dup2( efd[ 1 ], 2 ) < 0 ) { ! fprintf( stderr, "child: dup2 failed: %s\n", strerror( errno )); ! fflush( stderr ); ! exit( 2 ); } setvbuf( stdout, NULL, _IONBF, 0 ); ! ! if ( close( wfd[ 0 ] ) != 0 || close( rfd[ 1 ] ) != 0 || ! close( efd[ 1 ] ) != 0 ) { ! fprintf( stderr, "child: close failed: %s\n", strerror( errno )); ! fflush( stderr ); ! exit( 2 ); ! } if ( setpgid( getpid(), getpid()) < 0 ) { ! fprintf( stderr, "child: setpgid failed: %s", strerror( errno )); ! fflush( stderr ); ! exit( 2 ); } execve( execargs[ 0 ], execargs, NULL ); ! fprintf( stderr, "execve %s: %s\n", execargs[ 0 ], strerror( errno )); ! fflush( stderr ); _exit( 2 ); case -1: ! error = [ NSString stringWithFormat: @"fork failed: %s", ! strerror( errno ) ]; ! goto execute_command_cleanup; default: break; } ! signal( SIGPIPE, SIG_IGN ); ! [ controller setCurrentCommandPID: pid threadID: [ self threadID ]]; ! if ( close( wfd[ 0 ] ) != 0 || close( rfd[ 1 ] ) != 0 || ! close( efd[ 1 ] ) != 0 ) { ! error = [ NSString stringWithFormat: ! @"close failed: %s", strerror( errno ) ]; ! goto execute_command_cleanup; ! } ! wfd[ 0 ] = rfd[ 1 ] = efd[ 1 ] = -1; ! if ( write( wfd[ 1 ], &externalForm, sizeof( AuthorizationExternalForm )) ! != sizeof( AuthorizationExternalForm )) { ! error = [ NSString stringWithFormat: ! @"write failed: %s", strerror( errno ) ]; ! goto execute_command_cleanup; } ! if ( close( wfd[ 1 ] ) != 0 ) { ! error = [ NSString stringWithFormat: ! @"close failed: %s", strerror( errno ) ]; ! goto execute_command_cleanup; } ! wfd[ 1 ] = -1; ! ! if ( fcntl( rfd[ 0 ], F_SETFL, O_NONBLOCK ) < 0 || ! fcntl( efd[ 0 ], F_SETFL, O_NONBLOCK ) < 0 ) { ! error = [ NSString stringWithFormat: ! @"fcntl failed: %s", strerror( errno ) ]; ! goto execute_command_cleanup; } ! if (( rf = fdopen( rfd[ 0 ], "r" )) == NULL || ! ( ef = fdopen( efd[ 0 ], "r" )) == NULL ) { ! error = [ NSString stringWithFormat: ! @"fdopen failed: %s", strerror( errno ) ]; ! goto execute_command_cleanup; } *************** *** 287,292 **** &readmask, NULL, NULL, &tv )) { case -1: ! NSLog( @"select: %s", strerror( errno )); ! return( -1 ); case 0: --- 256,262 ---- &readmask, NULL, NULL, &tv )) { case -1: ! error = [ NSString stringWithFormat: ! @"select failed: %s", strerror( errno ) ]; ! goto execute_command_cleanup; case 0: *************** *** 302,318 **** if ( FD_ISSET( rfd[ 0 ], &readmask )) { - NSString *s = nil; - ! while ( fgets(( char * )buf, MAXPATHLEN, rf ) != NULL ) { buf[ strlen( buf ) - 1 ] = '\0'; ! s = [ NSString stringWithUTF8String: buf ]; ! if ( [ s characterAtIndex: 0 ] == '%' ) { ! [ rascontroller updateToolProgressWithString: s threadID: [ self threadID ]]; } else { ! [ rascontroller updateDisplayWithString: s threadID: [ self threadID ]]; } --- 272,286 ---- if ( FD_ISSET( rfd[ 0 ], &readmask )) { ! while ( fgets( buf, MAXPATHLEN, rf ) != NULL ) { buf[ strlen( buf ) - 1 ] = '\0'; ! output = [ NSString stringWithUTF8String: buf ]; ! if ( [ output characterAtIndex: 0 ] == '%' ) { ! [ controller updateToolProgressWithString: output threadID: [ self threadID ]]; } else { ! [ controller updateDisplayWithString: output threadID: [ self threadID ]]; } *************** *** 322,386 **** } } else if ( FD_ISSET( efd[ 0 ], &readmask )) { ! if ( fgets(( char * )buf, MAXPATHLEN, ef ) != NULL ) { ! [ rascontroller toolError: buf fromThreadWithID: [ self threadID ]]; ! } } } ! ( void )close( efd[ 0 ] ); ! ( void )close( rfd[ 0 ] ); pid = wait( &status ); ! return( WEXITSTATUS( status )); ! } ! ! ! - ( int )prepareAuthorizedCommand: ( int )command ! withRight: ( AuthorizationItem )right ! andArguments: ( NSArray * )args ! { ! int err; ! AuthorizationRights rights = { 1, &right }; ! OSStatus status; ! AuthorizationFlags flags = ! kAuthorizationFlagDefaults | ! kAuthorizationFlagPreAuthorize | ! kAuthorizationFlagInteractionAllowed | ! kAuthorizationFlagExtendRights; ! ! if ( rsmAuthRef == NULL ) { ! status = AuthorizationCreate( ! NULL, ! kAuthorizationEmptyEnvironment, ! kAuthorizationFlagDefaults, ! &rsmAuthRef ); ! ! if ( status != errAuthorizationSuccess ) { ! NSLog( @"AuthorizationCreate failed: error %d", (int)status ); ! return( -1 ); } } ! status = AuthorizationCopyRights( ! rsmAuthRef, ! &rights, ! kAuthorizationEmptyEnvironment, ! flags, ! NULL ); ! ! if ( status != errAuthorizationSuccess ) { ! NSLog( @"AuthorizationCopyRights failed: error %d", (int)status ); ! AuthorizationFree( rsmAuthRef, kAuthorizationFlagDefaults ); ! rsmAuthRef = NULL; ! return( -2 ); } - - err = [ self executeAuthorizedCommand: command withRef: rsmAuthRef - andArguments: args ]; - - //AuthorizationFree( authRef, kAuthorizationFlagDefaults ); ! return( err ); } --- 290,351 ---- } } else if ( FD_ISSET( efd[ 0 ], &readmask )) { ! /* just get the first line of error output */ ! fgets( buf, MAXPATHLEN, ef ); ! if ( ferror( ef )) { ! error = [ NSString stringWithFormat: ! @"fgets: %s", strerror( errno ) ]; ! goto execute_command_cleanup; ! } ! error = [ NSString stringWithUTF8String: buf ]; ! break; } } ! if ( close( rfd[ 0 ] ) != 0 || close( efd[ 0 ] ) != 0 ) { ! error = [ NSString stringWithFormat: ! @"close failed: %s", strerror( errno ) ]; ! goto execute_command_cleanup; ! } ! rfd[ 0 ] = efd[ 0 ] = -1; pid = wait( &status ); ! rc = WEXITSTATUS( status ); ! ! execute_command_cleanup: ! if ( execargs != NULL ) { ! for ( i = 0; i <= ac; i++ ) { ! free( execargs[ i ] ); } + free( execargs ); } ! for ( i = 0; i < 2; i++ ) { ! if ( wfd[ i ] != -1 && close( wfd[ i ] ) != 0 ) { ! error = [ NSString stringWithFormat: ! @"close: %s", strerror( errno ) ]; ! break; ! } ! } ! for ( i = 0; i < 2; i++ ) { ! if ( rfd[ i ] != -1 && close( rfd[ i ] ) != 0 ) { ! error = [ NSString stringWithFormat: ! @"close: %s", strerror( errno ) ]; ! break; ! } ! } ! for ( i = 0; i < 2; i++ ) { ! if ( efd[ i ] != -1 && close( efd[ i ] ) != 0 ) { ! error = [ NSString stringWithFormat: ! @"close: %s", strerror( errno ) ]; ! break; ! } } ! if ( error ) { ! [ controller toolError: error fromThreadWithID: [ self threadID ]]; ! } ! [ controller command: command finishedWithStatus: rc ! inThread: [ self threadID ]]; } Index: RAServerAuth.h =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RAServerAuth.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RAServerAuth.h 24 Jun 2008 06:18:35 -0000 1.7 --- RAServerAuth.h 24 Jun 2008 20:07:05 -0000 1.8 *************** *** 57,68 **** - ( int )threadID; - - ( int )executeAuthorizedCommand: ( int )command - withRef: ( AuthorizationRef )authRef - andArguments: ( NSArray * )args; - - - ( int )prepareAuthorizedCommand: ( int )command - withRight: ( AuthorizationItem )right - andArguments: ( NSArray * )args; - - ( int )cancelTask: ( pid_t )pidno error: ( NSString ** )error; --- 57,60 ---- |
From: Andrew M. <fit...@us...> - 2008-06-24 18:56:17
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv12925 Modified Files: AMAuthorization.h AMAuthorization.m Log Message: Implement initWithAuthorizationItem:authorizationFlags: Index: AMAuthorization.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/AMAuthorization.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AMAuthorization.m 24 Jun 2008 01:19:19 -0000 1.1 --- AMAuthorization.m 24 Jun 2008 18:56:13 -0000 1.2 *************** *** 49,53 **** _amAuthRights_.items = &_amAuthItem_; ! _amAuthFlags_ |= kAuthorizationFlagDefaults; if ( preAuthorize ) { _amAuthFlags_ |= kAuthorizationFlagPreAuthorize; --- 49,53 ---- _amAuthRights_.items = &_amAuthItem_; ! _amAuthFlags_ = kAuthorizationFlagDefaults; if ( preAuthorize ) { _amAuthFlags_ |= kAuthorizationFlagPreAuthorize; *************** *** 79,86 **** /* advanced interface */ ! - ( AMAuthorization * )initWithAuthorizationItem: ( AuthorizationItem )item authorizationFlags: ( AuthorizationFlags )flags { ! return( nil ); } --- 79,109 ---- /* advanced interface */ ! - ( AMAuthorization * )initWithAuthorizationItem: ( AuthorizationItem * )item authorizationFlags: ( AuthorizationFlags )flags { ! OSStatus status; ! ! memcpy( &_amAuthItem_, item, sizeof( AuthorizationItem )); ! _amAuthRights_.count = 1; ! _amAuthRights_.items = &_amAuthItem_; ! ! _amAuthFlags_ = flags; ! ! _amAuthRef_ = NULL; ! status = AuthorizationCreate( NULL, kAuthorizationEmptyEnvironment, ! kAuthorizationFlagDefaults, &_amAuthRef_ ); ! if ( status != errAuthorizationSuccess ) { ! return( nil ); ! } ! ! status = AuthorizationCopyRights( _amAuthRef_, &_amAuthRights_, ! kAuthorizationEmptyEnvironment, ! _amAuthFlags_, NULL ); ! if ( status != errAuthorizationSuccess ) { ! AuthorizationFree( _amAuthRef_, kAuthorizationFlagDefaults ); ! return( nil ); ! } ! ! return( self ); } Index: AMAuthorization.h =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/AMAuthorization.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AMAuthorization.h 24 Jun 2008 01:19:19 -0000 1.1 --- AMAuthorization.h 24 Jun 2008 18:56:13 -0000 1.2 *************** *** 31,35 **** /* advanced interface */ ! - ( AMAuthorization * )initWithAuthorizationItem: ( AuthorizationItem )item authorizationFlags: ( AuthorizationFlags )flags; --- 31,35 ---- /* advanced interface */ ! - ( AMAuthorization * )initWithAuthorizationItem: ( AuthorizationItem * )item authorizationFlags: ( AuthorizationFlags )flags; |
From: Andrew M. <fit...@us...> - 2008-06-24 06:18:39
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19998 Modified Files: RAServerAuth.h RAServerAuth.m Log Message: Absorbed RAAuthKiller class. Clean up next. Index: RAServerAuth.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RAServerAuth.m,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** RAServerAuth.m 18 Mar 2008 20:10:05 -0000 1.16 --- RAServerAuth.m 24 Jun 2008 06:18:35 -0000 1.17 *************** *** 7,12 **** #import "RAServerController.h" #import "NSArray(CreateArgv).h" ! ! #include <Security/AuthorizationTags.h> #include <sys/types.h> --- 7,11 ---- #import "RAServerController.h" #import "NSArray(CreateArgv).h" ! #import "AMAuthorization.h" #include <sys/types.h> *************** *** 128,134 **** andArguments: ( NSArray * )args; { ! char authpath[ MAXPATHLEN ], buf[ MAXPATHLEN ]; char **execargs; NSMutableArray *av = nil; int wfd[ 2 ], rfd[ 2 ], efd[ 2 ]; int status, ac, i; --- 127,134 ---- andArguments: ( NSArray * )args; { ! char buf[ MAXPATHLEN ]; char **execargs; NSMutableArray *av = nil; + NSString *authToolPath; int wfd[ 2 ], rfd[ 2 ], efd[ 2 ]; int status, ac, i; *************** *** 139,149 **** AuthorizationExternalForm extAuth; ! if ( pathfortool( "rsmauthtool", authpath ) != 0 ) { ! NSLog( @"rsmauthtool couldn't be found." ); ! return( -1 ); } ! av = [[ NSMutableArray alloc ] init ]; ! [ av addObject: [ NSString stringWithUTF8String: authpath ]]; // XXXX [ av addObjectsFromArray: args ]; --- 139,151 ---- AuthorizationExternalForm extAuth; ! if (( authToolPath = [[ NSBundle mainBundle ] ! pathForResource: @"rsmauthtool" ! ofType: nil ] ) == nil ) { ! NSLog( @"rsmauthtool couldn't be found." ); ! return( -1 ); } ! av = [[ NSMutableArray alloc ] init ]; ! [ av addObject: authToolPath ]; [ av addObjectsFromArray: args ]; *************** *** 383,385 **** --- 385,532 ---- } + - ( int )cancelTask: ( pid_t )pidno error: ( NSString ** )error + { + AMAuthorization *auth; + AuthorizationExternalForm externalForm; + NSArray *args = nil; + NSString *authToolPath; + FILE *ef; + char buf[ MAXPATHLEN ]; + char **argv = NULL; + int wfd[ 2 ] = { -1, -1 }; + int efd[ 2 ] = { -1, -1 }; + int status, i, ac = -1; + pid_t pid; + int rc = -1; + + auth = [ AMAuthorization authorizationWithName: @"edu.umich.radmind.kill" + preAuthorize: YES allowInteraction: YES + extendRights: YES ]; + if ( auth == nil ) { + *error = [ NSString stringWithString: @"Authorization failed" ]; + return( -1 ); + } + [ auth externalForm: &externalForm ]; + + if (( authToolPath = [[ NSBundle mainBundle ] + pathForResource: @"rsmauthtool" + ofType: nil ] ) == nil ) { + *error = [ NSString stringWithString: + @"Could not locate authorized tool" ]; + goto cancel_task_cleanup; + } + + args = [ NSArray arrayWithObjects: authToolPath, + @"-A", @"KillProcess", @"-d", @"/private/tmp", + @"--", [ NSString stringWithFormat: @"%d", pidno ], nil ]; + + if (( ac = [ args argv: &argv ] ) <= 0 ) { + *error = [ NSString stringWithString: @"Failed to create argv" ]; + goto cancel_task_cleanup; + } + + if ( pipe( wfd ) != 0 || pipe( efd ) != 0 ) { + *error = [ NSString stringWithFormat: + @"pipe failed: %s", strerror( errno ) ]; + goto cancel_task_cleanup; + } + + switch ( fork()) { + case 0: + if ( close( wfd[ 1 ] ) != 0 || close( efd[ 0 ] ) != 0 ) { + fprintf( stderr, "child: close failed: %s\n", strerror( errno )); + fflush( stderr ); + exit( 2 ); + } + if ( dup2( wfd[ 0 ], 0 ) < 0 || dup2( efd[ 1 ], 2 ) < 0 ) { + fprintf( stderr, "child: dup2 failed: %s", strerror( errno )); + fflush( stderr ); + exit( 2 ); + } + if ( close( wfd[ 0 ] ) != 0 || close( efd[ 1 ] ) != 0 ) { + fprintf( stderr, "child: close failed: %s\n", strerror( errno )); + fflush( stderr ); + exit( 2 ); + } + + execve( argv[ 0 ], argv, NULL ); + fprintf( stderr, "execve: %s: %s", argv[ 0 ], strerror( errno )); + fflush( stderr ); + _exit( 2 ); + + case -1: + *error = [ NSString stringWithFormat: + @"fork failed: %s", strerror( errno ) ]; + goto cancel_task_cleanup; + + default: + break; + } + + signal( SIGPIPE, SIG_IGN ); + + if ( close( wfd[ 0 ] ) != 0 || close( efd[ 1 ] ) != 0 ) { + *error = [ NSString stringWithFormat: + @"close failed: %s", strerror( errno ) ]; + goto cancel_task_cleanup; + } + wfd[ 0 ] = efd[ 1 ] = -1; + + if ( write( wfd[ 1 ], &externalForm, sizeof( AuthorizationExternalForm )) + != sizeof( AuthorizationExternalForm )) { + *error = [ NSString stringWithFormat: + @"write failed: %s", strerror( errno ) ]; + goto cancel_task_cleanup; + } + + if (( ef = fdopen( efd[ 0 ], "r" )) == NULL ) { + *error = [ NSString stringWithFormat: + @"fdopen failed: %s", strerror( errno ) ]; + goto cancel_task_cleanup; + } + if ( fgets( buf, sizeof( buf ), ef ) == NULL ) { + if ( ferror( ef )) { + *error = [ NSString stringWithFormat: + @"fgets: %s", strerror( errno ) ]; + goto cancel_task_cleanup; + } + } else { + *error = [ NSString stringWithFormat: + @"Cancel task with pid %d failed: %s", pidno, buf ]; + } + + if ( close( wfd[ 1 ] ) != 0 || close( efd[ 0 ] ) != 0 ) { + *error = [ NSString stringWithFormat: + @"close failed: %s", strerror( errno ) ]; + goto cancel_task_cleanup; + } + wfd[ 1 ] = efd[ 0 ] = -1; + + pid = wait( &status ); + rc = WEXITSTATUS( status ); + + cancel_task_cleanup: + if ( argv != NULL ) { + for ( i = 0; i < ac; i++ ) { + free( argv[ i ] ); + } + free( argv ); + } + + for ( i = 0; i < 2; i++ ) { + if ( wfd[ i ] != -1 && close( wfd[ i ] ) != 0 ) { + *error = [ NSString stringWithFormat: + @"close: %s", strerror( errno ) ]; + } + } + for ( i = 0; i < 2; i++ ) { + if ( efd[ i ] != -1 && close( efd[ i ] ) != 0 ) { + *error = [ NSString stringWithFormat: + @"close: %s", strerror( errno ) ]; + } + } + + return( rc ); + } + @end Index: RAServerAuth.h =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RAServerAuth.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RAServerAuth.h 5 May 2005 18:04:27 -0000 1.6 --- RAServerAuth.h 24 Jun 2008 06:18:35 -0000 1.7 *************** *** 65,67 **** --- 65,69 ---- andArguments: ( NSArray * )args; + - ( int )cancelTask: ( pid_t )pidno error: ( NSString ** )error; + @end |
From: Andrew M. <fit...@us...> - 2008-06-24 06:17:40
|
Update of /cvsroot/radmind/radmind-assistant/rsm/rsm.xcodeproj In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19643 Modified Files: project.pbxproj Log Message: Removed RAAuthKiller class from project. Index: project.pbxproj =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/rsm.xcodeproj/project.pbxproj,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** project.pbxproj 18 Mar 2008 21:20:36 -0000 1.13 --- project.pbxproj 24 Jun 2008 06:17:37 -0000 1.14 *************** *** 8,11 **** --- 8,13 ---- /* Begin PBXBuildFile section */ + 0947879C0E10498E003EB973 /* AMAuthorization.h in Headers */ = {isa = PBXBuildFile; fileRef = 0947879A0E10498E003EB973 /* AMAuthorization.h */; }; + 0947879D0E10498E003EB973 /* AMAuthorization.m in Sources */ = {isa = PBXBuildFile; fileRef = 0947879B0E10498E003EB973 /* AMAuthorization.m */; }; 0966F4FD09490F6C0061D4EC /* RAEditorLauncher.h in Headers */ = {isa = PBXBuildFile; fileRef = 0923510604605AC3004E6B00 /* RAEditorLauncher.h */; }; 0966F4FE09490F6C0061D4EC /* RAServerAuth.h in Headers */ = {isa = PBXBuildFile; fileRef = 0923510804605AC3004E6B00 /* RAServerAuth.h */; }; *************** *** 14,18 **** 0966F50109490F6C0061D4EC /* RASTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 09718B050466E89C003C81A3 /* RASTableView.h */; }; 0966F50209490F6C0061D4EC /* authtools.h in Headers */ = {isa = PBXBuildFile; fileRef = 097966E30468BFF100A8002B /* authtools.h */; }; - 0966F50309490F6C0061D4EC /* RAAuthKiller.h in Headers */ = {isa = PBXBuildFile; fileRef = 097966E60468C07300A8002B /* RAAuthKiller.h */; }; 0966F50409490F6C0061D4EC /* argcargv.h in Headers */ = {isa = PBXBuildFile; fileRef = 097966EB0468C08C00A8002B /* argcargv.h */; }; 0966F50509490F6C0061D4EC /* RSMLoadsetEditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 09C83D7E0469880100A8002B /* RSMLoadsetEditor.h */; }; --- 16,19 ---- *************** *** 66,70 **** 0966F53809490F6C0061D4EC /* RASTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 09718B060466E89C003C81A3 /* RASTableView.m */; }; 0966F53909490F6C0061D4EC /* authtools.c in Sources */ = {isa = PBXBuildFile; fileRef = 097966E20468BFF100A8002B /* authtools.c */; }; - 0966F53A09490F6C0061D4EC /* RAAuthKiller.m in Sources */ = {isa = PBXBuildFile; fileRef = 097966E70468C07300A8002B /* RAAuthKiller.m */; }; 0966F53B09490F6C0061D4EC /* argcargv.c in Sources */ = {isa = PBXBuildFile; fileRef = 097966EA0468C08C00A8002B /* argcargv.c */; }; 0966F53C09490F6C0061D4EC /* RSMLoadsetEditor.m in Sources */ = {isa = PBXBuildFile; fileRef = 09C83D7F0469880100A8002B /* RSMLoadsetEditor.m */; }; --- 67,70 ---- *************** *** 154,157 **** --- 154,159 ---- 09426A4F06395DF4009C9F1A /* RAOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RAOutlineView.h; sourceTree = "<group>"; }; 09426A5006395DF4009C9F1A /* RAOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RAOutlineView.m; sourceTree = "<group>"; }; + 0947879A0E10498E003EB973 /* AMAuthorization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMAuthorization.h; sourceTree = "<group>"; }; + 0947879B0E10498E003EB973 /* AMAuthorization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMAuthorization.m; sourceTree = "<group>"; }; 09485C35062C24740019D70B /* folder.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = folder.png; sourceTree = "<group>"; }; 0949B5590725EBE5000F93DD /* servermanager.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = servermanager.icns; sourceTree = "<group>"; }; *************** *** 176,181 **** 097966E20468BFF100A8002B /* authtools.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = authtools.c; sourceTree = "<group>"; }; 097966E30468BFF100A8002B /* authtools.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = authtools.h; sourceTree = "<group>"; }; - 097966E60468C07300A8002B /* RAAuthKiller.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RAAuthKiller.h; sourceTree = "<group>"; }; - 097966E70468C07300A8002B /* RAAuthKiller.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = RAAuthKiller.m; sourceTree = "<group>"; }; 097966EA0468C08C00A8002B /* argcargv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = argcargv.c; sourceTree = "<group>"; }; 097966EB0468C08C00A8002B /* argcargv.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = argcargv.h; sourceTree = "<group>"; }; --- 178,181 ---- *************** *** 277,280 **** --- 277,282 ---- isa = PBXGroup; children = ( + 0947879A0E10498E003EB973 /* AMAuthorization.h */, + 0947879B0E10498E003EB973 /* AMAuthorization.m */, 0952D10C0802367500BF8531 /* RSMNewFolderHelper.h */, 0952D10D0802367500BF8531 /* RSMNewFolderHelper.m */, *************** *** 287,292 **** 0923510A04605AC3004E6B00 /* RAServerController.h */, 0923510B04605AC3004E6B00 /* RAServerController.m */, - 097966E60468C07300A8002B /* RAAuthKiller.h */, - 097966E70468C07300A8002B /* RAAuthKiller.m */, 09C83D7E0469880100A8002B /* RSMLoadsetEditor.h */, 09C83D7F0469880100A8002B /* RSMLoadsetEditor.m */, --- 289,292 ---- *************** *** 488,492 **** 0966F50109490F6C0061D4EC /* RASTableView.h in Headers */, 0966F50209490F6C0061D4EC /* authtools.h in Headers */, - 0966F50309490F6C0061D4EC /* RAAuthKiller.h in Headers */, 0966F50409490F6C0061D4EC /* argcargv.h in Headers */, 0966F50509490F6C0061D4EC /* RSMLoadsetEditor.h in Headers */, --- 488,491 ---- *************** *** 504,507 **** --- 503,507 ---- 0966F725094E11190061D4EC /* NSPanel(Resizing).h in Headers */, 09B9CFD60D9063EC00F414CB /* NSWorkspace-Radmind.h in Headers */, + 0947879C0E10498E003EB973 /* AMAuthorization.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; *************** *** 634,638 **** 0966F53809490F6C0061D4EC /* RASTableView.m in Sources */, 0966F53909490F6C0061D4EC /* authtools.c in Sources */, - 0966F53A09490F6C0061D4EC /* RAAuthKiller.m in Sources */, 0966F53B09490F6C0061D4EC /* argcargv.c in Sources */, 0966F53C09490F6C0061D4EC /* RSMLoadsetEditor.m in Sources */, --- 634,637 ---- *************** *** 650,653 **** --- 649,653 ---- 0966F726094E11190061D4EC /* NSPanel(Resizing).m in Sources */, 09B9CFD70D9063EC00F414CB /* NSWorkspace-Radmind.m in Sources */, + 0947879D0E10498E003EB973 /* AMAuthorization.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; |
From: Andrew M. <fit...@us...> - 2008-06-24 06:16:23
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19193 Removed Files: RAAuthKiller.m RAAuthKiller.h Log Message: Merged with RAServerAuth class. --- RAAuthKiller.h DELETED --- --- RAAuthKiller.m DELETED --- |
From: Andrew M. <fit...@us...> - 2008-06-24 01:19:22
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24489 Added Files: AMAuthorization.h AMAuthorization.m Log Message: New Obj-C class wrapping Authorization API. --- NEW FILE: AMAuthorization.m --- // // AMAuthorization.m // rsm // // Created by Andrew Mortensen on 6/23/08. // Copyright 2008 University of Michigan, The. All rights reserved. // #import "AMAuthorization.h" @implementation AMAuthorization + ( AMAuthorization * )authorizationWithName: ( NSString * )name { return( [ AMAuthorization authorizationWithName: name preAuthorize: NO allowInteraction: NO extendRights: NO ] ); } + ( AMAuthorization * )authorizationWithName: ( NSString * )name preAuthorize: ( BOOL )preAuthorize allowInteraction: ( BOOL )allowInteraction extendRights: ( BOOL )extendRights { AMAuthorization *auth; auth = [[[ AMAuthorization alloc ] init ] autorelease ]; return( [ auth initWithName: name preAuthorize: preAuthorize allowInteraction: allowInteraction extendRights: extendRights ]); } - ( AMAuthorization * )initWithName: ( NSString * )name { return( [ self initWithName: name preAuthorize: NO allowInteraction: NO extendRights: NO ] ); } - ( AMAuthorization * )initWithName: ( NSString * )name preAuthorize: ( BOOL )preAuthorize allowInteraction: ( BOOL )allowInteraction extendRights: ( BOOL )extendRights { OSStatus status; memset( &_amAuthItem_, 0, sizeof( AuthorizationItem )); _amAuthItem_.name = [ name UTF8String ]; _amAuthRights_.count = 1; _amAuthRights_.items = &_amAuthItem_; _amAuthFlags_ |= kAuthorizationFlagDefaults; if ( preAuthorize ) { _amAuthFlags_ |= kAuthorizationFlagPreAuthorize; } if ( allowInteraction ) { _amAuthFlags_ |= kAuthorizationFlagInteractionAllowed; } if ( extendRights ) { _amAuthFlags_ |= kAuthorizationFlagExtendRights; } _amAuthRef_ = NULL; status = AuthorizationCreate( NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &_amAuthRef_ ); if ( status != errAuthorizationSuccess ) { return( nil ); } status = AuthorizationCopyRights( _amAuthRef_, &_amAuthRights_, kAuthorizationEmptyEnvironment, _amAuthFlags_, NULL ); if ( status != errAuthorizationSuccess ) { AuthorizationFree( _amAuthRef_, kAuthorizationFlagDefaults ); return( nil ); } return( self ); } /* advanced interface */ - ( AMAuthorization * )initWithAuthorizationItem: ( AuthorizationItem )item authorizationFlags: ( AuthorizationFlags )flags { return( nil ); } - ( BOOL )externalForm: ( AuthorizationExternalForm * )externalForm { if ( AuthorizationMakeExternalForm( _amAuthRef_, externalForm ) != errAuthorizationSuccess ) { return( NO ); } return( YES ); } - ( void )dealloc { if ( _amAuthRef_ != NULL ) { AuthorizationFree( _amAuthRef_, kAuthorizationFlagDefaults ); } [ super dealloc ]; } @end --- NEW FILE: AMAuthorization.h --- // // AMAuthorization.h // rsm // // Created by Andrew Mortensen on 6/23/08. // Copyright 2008 University of Michigan, The. All rights reserved. // #import <Cocoa/Cocoa.h> #import <Security/Authorization.h> @interface AMAuthorization : NSObject { @private AuthorizationItem _amAuthItem_; AuthorizationRef _amAuthRef_; AuthorizationRights _amAuthRights_; AuthorizationFlags _amAuthFlags_; } + ( AMAuthorization * )authorizationWithName: ( NSString * )name; + ( AMAuthorization * )authorizationWithName: ( NSString * )name preAuthorize: ( BOOL )preAuthorize allowInteraction: ( BOOL )allowInteraction extendRights: ( BOOL )extendRights; - ( AMAuthorization * )initWithName: ( NSString * )name; - ( AMAuthorization * )initWithName: ( NSString * )name preAuthorize: ( BOOL )preAuthorize allowInteraction: ( BOOL )allowInteraction extendRights: ( BOOL )extendRights; /* advanced interface */ - ( AMAuthorization * )initWithAuthorizationItem: ( AuthorizationItem )item authorizationFlags: ( AuthorizationFlags )flags; - ( BOOL )externalForm: ( AuthorizationExternalForm * )externalForm; @end |
From: Andrew M. <fit...@us...> - 2008-06-23 21:02:26
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18724 Modified Files: NSWorkspace-Radmind.h NSWorkspace-Radmind.m Log Message: Added -pathForRadmindTool: Index: NSWorkspace-Radmind.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/NSWorkspace-Radmind.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NSWorkspace-Radmind.m 18 Mar 2008 21:20:35 -0000 1.1 --- NSWorkspace-Radmind.m 23 Jun 2008 21:02:13 -0000 1.2 *************** *** 21,23 **** --- 21,51 ---- } + - ( NSString * )pathForRadmindTool: ( NSString * )radmindTool + { + static NSArray *searchPaths = nil; + + NSString *toolPath = nil; + NSString *binDir = @"bin"; + int i; + + if ( searchPaths == nil ) { + searchPaths = [[ NSArray alloc ] initWithObjects: @"/usr", + @"/usr/local", @"/usr/radmind", nil ]; + } + if ( [ radmindTool isEqualToString: @"radmind" ] ) { + binDir = @"sbin"; + } + + for ( i = 0; i < [ searchPaths count ]; i++ ) { + toolPath = [ NSString stringWithFormat: @"%@/%@/%@", + [ searchPaths objectAtIndex: i ], binDir, radmindTool ]; + + if ( [[ NSFileManager defaultManager ] fileExistsAtPath: toolPath ] ) { + break; + } + } + + return( toolPath ); + } + @end Index: NSWorkspace-Radmind.h =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/NSWorkspace-Radmind.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NSWorkspace-Radmind.h 18 Mar 2008 21:20:34 -0000 1.1 --- NSWorkspace-Radmind.h 23 Jun 2008 21:02:13 -0000 1.2 *************** *** 9,12 **** --- 9,13 ---- + ( NSString * )radmindServerDirectory; + - ( NSString * )pathForRadmindTool: ( NSString * )radmindTool; @end |
From: Andrew M. <fit...@us...> - 2008-06-23 21:01:04
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18316 Modified Files: NSTextView(LogMessage).h NSTextView(LogMessage).m Log Message: Improved task logging. Index: NSTextView(LogMessage).h =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/NSTextView(LogMessage).h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NSTextView(LogMessage).h 5 Apr 2005 19:50:14 -0000 1.2 --- NSTextView(LogMessage).h 23 Jun 2008 21:01:00 -0000 1.3 *************** *** 9,12 **** --- 9,13 ---- - ( void )logMessage: ( NSString * )fmt, ...; + - ( void )logRadmindTask: ( NSArray * )taskArguments; @end Index: NSTextView(LogMessage).m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/NSTextView(LogMessage).m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NSTextView(LogMessage).m 5 Apr 2005 19:50:14 -0000 1.3 --- NSTextView(LogMessage).m 23 Jun 2008 21:01:00 -0000 1.4 *************** *** 23,25 **** --- 23,46 ---- } + - ( void )logRadmindTask: ( NSArray * )taskArguments + { + int index = [ taskArguments indexOfObject: @"--" ]; + int i; + + if ( index < 0 ) { + return; + } + + [ self setEditable: YES ]; + + index++; + for ( i = index; i < [ taskArguments count ]; i++ ) { + [ self insertText: [ taskArguments objectAtIndex: i ]]; + [ self insertText: @" " ]; + } + [ self insertText: @"\n" ]; + + [ self setEditable: NO ]; + } + @end |
From: Andrew M. <fit...@us...> - 2008-06-23 21:00:33
|
Update of /cvsroot/radmind/radmind-assistant/Radmind Assistant.xcodeproj In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18284 Modified Files: project.pbxproj Log Message: Updated settings. Index: project.pbxproj =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/Radmind Assistant.xcodeproj/project.pbxproj,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** project.pbxproj 24 Apr 2006 15:18:33 -0000 1.7 --- project.pbxproj 23 Jun 2008 21:00:29 -0000 1.8 *************** *** 140,168 **** /* End PBXBuildFile section */ - /* Begin PBXBuildStyle section */ - 4A9504CCFFE6A4B311CA0CBA /* Development */ = { - isa = PBXBuildStyle; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - OPTIMIZATION_CFLAGS = "-O0"; - ZERO_LINK = YES; - }; - name = Development; - }; - 4A9504CDFFE6A4B311CA0CBA /* Deployment */ = { - isa = PBXBuildStyle; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - ZERO_LINK = NO; - }; - name = Deployment; - }; - /* End PBXBuildStyle section */ - /* Begin PBXContainerItemProxy section */ 097B791D09A61B2500427C2C /* PBXContainerItemProxy */ = { --- 140,143 ---- *************** *** 740,751 **** buildRules = ( ); - buildSettings = { - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - INSTALL_PATH = "$(HOME)/bin"; - PREBINDING = NO; - PRODUCT_NAME = rumd; - ZERO_LINK = YES; - }; dependencies = ( ); --- 715,718 ---- *************** *** 766,787 **** buildRules = ( ); - buildSettings = { - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; - INFOPLIST_FILE = "Radmind Update Monitor-Info.plist"; - INSTALL_PATH = "$(HOME)/Applications"; - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; - PRODUCT_NAME = "Radmind Update Monitor"; - WRAPPER_EXTENSION = app; - ZERO_LINK = YES; - }; dependencies = ( ); --- 733,736 ---- *************** *** 789,817 **** productName = "Radmind Update Monitor"; productReference = 097B796909A6329C00427C2C /* RadmindUpdateMonitor.app */; - productSettingsXML = "<?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>CFBundleDevelopmentRegion</key> - <string>English</string> - <key>CFBundleExecutable</key> - <string>${EXECUTABLE_NAME}</string> - <key>CFBundleIdentifier</key> - <string>com.yourcompany.Radmind Update Monitor</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundlePackageType</key> - <string>APPL</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleVersion</key> - <string>1.0</string> - <key>NSMainNibFile</key> - <string>MainMenu</string> - <key>NSPrincipalClass</key> - <string>NSApplication</string> - </dict> - </plist> - "; productType = "com.apple.product-type.application"; }; --- 738,741 ---- *************** *** 830,861 **** buildRules = ( ); - buildSettings = { - CC = /usr/bin/gcc; - CPLUSPLUS = "/usr/bin/g++"; - CURRENT_PROJECT_VERSION = 97.2; - FRAMEWORK_SEARCH_PATHS = ""; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 2; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_USE_GCC3_PFE_SUPPORT = YES; - GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; - GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = NO; - GCC_WARN_SHADOW = NO; - GCC_WARN_UNKNOWN_PRAGMAS = NO; - HEADER_SEARCH_PATHS = ""; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - JAVA_COMPILER_DEBUGGING_SYMBOLS = NO; - LIBRARY_SEARCH_PATHS = ""; - MACOSX_DEPLOYMENT_TARGET = 10.2; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - PREBINDING = NO; - PRODUCT_NAME = "Radmind Assistant"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost"; - WRAPPER_EXTENSION = app; - }; dependencies = ( 09EFC3A0099D14CC00A7D599 /* PBXTargetDependency */, --- 754,757 ---- *************** *** 878,889 **** buildRules = ( ); - buildSettings = { - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - INSTALL_PATH = "$(HOME)/bin"; - PREBINDING = NO; - PRODUCT_NAME = rmauthexec; - ZERO_LINK = YES; - }; dependencies = ( ); --- 774,777 ---- *************** *** 899,911 **** isa = PBXProject; buildConfigurationList = 09943E46088F5D8C001810A0 /* Build configuration list for PBXProject "Radmind Assistant" */; ! buildSettings = { ! }; ! buildStyles = ( ! 4A9504CCFFE6A4B311CA0CBA /* Development */, ! 4A9504CDFFE6A4B311CA0CBA /* Deployment */, ! ); hasScannedForEncodings = 1; mainGroup = 29B97314FDCFA39411CA2CEA /* Radmind Client Manager */; projectDirPath = ""; targets = ( 09B3F059054D917300D8F843 /* Radmind Assistant */, --- 787,795 ---- isa = PBXProject; buildConfigurationList = 09943E46088F5D8C001810A0 /* Build configuration list for PBXProject "Radmind Assistant" */; ! compatibilityVersion = "Xcode 2.4"; hasScannedForEncodings = 1; mainGroup = 29B97314FDCFA39411CA2CEA /* Radmind Client Manager */; projectDirPath = ""; + projectRoot = ""; targets = ( 09B3F059054D917300D8F843 /* Radmind Assistant */, *************** *** 1322,1326 **** LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.2; - OPTIMIZATION_CFLAGS = "-O0"; OTHER_CFLAGS = ""; OTHER_LDFLAGS = ""; --- 1206,1209 ---- |
From: Andrew M. <fit...@us...> - 2008-06-23 20:58:15
|
Update of /cvsroot/radmind/radmind-assistant/Radmind Assistant.pbproj In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17244 Removed Files: project.pbxproj Log Message: Ancient --- project.pbxproj DELETED --- |
From: Andrew M. <fit...@us...> - 2008-06-23 20:55:32
|
Update of /cvsroot/radmind/radmind-assistant In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16274 Modified Files: userdelete.sh Log Message: Updated for 10.5. Index: userdelete.sh =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/userdelete.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** userdelete.sh 9 Dec 2003 22:17:52 -0000 1.1 --- userdelete.sh 23 Jun 2008 20:55:29 -0000 1.2 *************** *** 15,23 **** fi ! niutil -destroy . /users/${D_USER} 2>/dev/null ! niutil -destroy . /groups/${D_USER} 2>/dev/null ! if [ -d ${D_HOME} ]; then ! rm -rf ${D_HOME} fi --- 15,25 ---- fi ! dscl . <<EOF ! delete "/users/${D_USER}" ! delete "/groups/${D_USER}" ! EOF ! if [ -d "${D_HOME}" ]; then ! rm -rf "${D_HOME}" fi |
From: Andrew M. <fit...@us...> - 2008-06-23 20:55:05
|
Update of /cvsroot/radmind/radmind-assistant In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15503 Modified Files: useradd.sh Log Message: Updated for 10.5. Thanks to Ann Schwartz for her persistence. Index: useradd.sh =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/useradd.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** useradd.sh 5 Aug 2005 15:40:11 -0000 1.2 --- useradd.sh 23 Jun 2008 20:55:00 -0000 1.3 *************** *** 22,26 **** # make sure the uid and gid are available while [ true ]; do ! user="`niutil -read . /users/uid=${N_UID} 2>/dev/null`" if [ -z "${user}" ]; then --- 22,26 ---- # make sure the uid and gid are available while [ true ]; do ! user="`dscl . -search /users UniqueID ${N_UID} 2>/dev/null`" if [ -z "${user}" ]; then *************** *** 32,36 **** while [ true ]; do ! group=`niutil -read . /groups/gid=${N_GID} 2>/dev/null` if [ -z "${group}" ]; then --- 32,36 ---- while [ true ]; do ! group=`dscl . -search /groups PrimaryGroupID ${N_GID} 2>/dev/null` if [ -z "${group}" ]; then *************** *** 42,85 **** # create user ! niutil -create . "/users/${N_USERNAME}" 2>/dev/null ! if [ $? -ne 0 ]; then logger -is Creation of ${N_USERNAME} failed. exit 2 fi - niutil -createprop . "/users/${N_USERNAME}" uid ${N_UID} 2>/dev/null - niutil -createprop . "/users/${N_USERNAME}" gid ${N_GID} 2>/dev/null - niutil -createprop . "/users/${N_USERNAME}" passwd "*" 2>/dev/null - niutil -createprop . "/users/${N_USERNAME}" name ${N_USERNAME} 2>/dev/null - niutil -createprop . "/users/${N_USERNAME}" home ${N_HOME} 2>/dev/null - niutil -createprop . "/users/${N_USERNAME}" _writers_passwd ${N_USERNAME} - niutil -createprop . "/users/${N_USERNAME}" _writers_hint ${N_USERNAME} - niutil -createprop . "/users/${N_USERNAME}" realname "Template User" - niutil -createprop . "/users/${N_USERNAME}" shell /bin/tcsh - # create group ! niutil -create . "/groups/${N_USERNAME}" ! ! # destroy user if group creation fails if [ $? -ne 0 ]; then ! niutil -destroy . "/users/{N_USERNAME}" ! logger -is Creation of group ${N_USERNAME} failed. exit 2 fi - niutil -createprop . "/groups/${N_USERNAME}" name ${N_USERNAME} - niutil -createprop . "/groups/${N_USERNAME}" gid ${N_GID} - niutil -createprop . "/groups/${N_USERNAME}" passwd "*" - niutil -createprop . "/groups/${N_USERNAME}" users ${N_USERNAME} - # make home directory mkdir -m 0700 -p ${N_HOME} ! ditto -rsrcFork "${SYSHOMETEMPLATE}" "${N_HOME}" if [ $? -ne 0 ]; then ! niutil -destroy . "/users/${N_USERNAME}" ! niutil -destroy . "/groups/${N_USERNAME}" ! logger -is Creation of ${N_HOME} failed. exit 2 fi --- 42,96 ---- # create user ! dscl . <<EOF ! create "/users/${N_USERNAME}" ! create "/users/${N_USERNAME}" AppleMetaNodeLocation /Local/Default ! create "/users/${N_USERNAME}" GeneratedUID `uuidgen` ! create "/users/${N_USERNAME}" UniqueID ${N_UID} ! create "/users/${N_USERNAME}" PrimaryGroupID ${N_GID} ! create "/users/${N_USERNAME}" Password "*" ! create "/users/${N_USERNAME}" RecordName ${N_USERNAME} ! create "/users/${N_USERNAME}" RecordType dsRecTypeNative:users ! create "/users/${N_USERNAME}" NFSHomeDirectory ${N_HOME} ! create "/users/${N_USERNAME}" RealName "Template User" ! create "/users/${N_USERNAME}" UserShell /bin/bash ! EOF if [ $? -ne 0 ]; then logger -is Creation of ${N_USERNAME} failed. + + # destroy account + dscl . -delete "/users/${N_USERNAME}" 2>/dev/null exit 2 fi # create group ! dscl . <<EOF ! create "/groups/${N_USERNAME}" ! create "/groups/${N_USERNAME}" AppleMetaNodeLocation /Local/Default ! create "/groups/${N_USERNAME}" GeneratedUID `uuidgen` ! create "/groups/${N_USERNAME}" PrimaryGroupID ${N_GID} ! create "/groups/${N_USERNAME}" RecordName ${N_USERNAME} ! create "/groups/${N_USERNAME}" RecordType dsRecTypeNative:groups ! create "/groups/${N_USERNAME}" Password "*" ! create "/groups/${N_USERNAME}" GroupMembership ${N_USERNAME} ! EOF if [ $? -ne 0 ]; then ! logger -is Creation of ${N_USERNAME} failed. ! ! # destroy account ! dscl . -delete "/users/${N_USERNAME}" 2>/dev/null ! dscl . -delete "/groups/${N_USERNAME}" 2>/dev/null exit 2 fi # make home directory mkdir -m 0700 -p ${N_HOME} ! ditto --rsrc "${SYSHOMETEMPLATE}" "${N_HOME}" if [ $? -ne 0 ]; then ! logger -is Creation of ${N_USERNAME} failed. ! ! # destroy account ! dscl . -delete "/users/${N_USERNAME}" 2>/dev/null ! dscl . -delete "/groups/${N_USERNAME}" 2>/dev/null exit 2 fi |
From: Andrew M. <fit...@us...> - 2008-06-23 20:53:43
|
Update of /cvsroot/radmind/radmind-assistant In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15458 Modified Files: RCMPreferences.m Log Message: Unused default. Index: RCMPreferences.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/RCMPreferences.m,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** RCMPreferences.m 27 Oct 2006 02:44:31 -0000 1.46 --- RCMPreferences.m 23 Jun 2008 20:53:40 -0000 1.47 *************** *** 234,239 **** { NSUserDefaults *defaults = [ NSUserDefaults standardUserDefaults ]; - NSString *radmind = [ defaults objectForKey: - @"radmindhost" ]; NSArray *defaultHosts = [ defaults objectForKey: @"radmindhosts" ]; NSString *editor = [ defaults objectForKey: --- 234,237 ---- |