From: Andrew M. <fit...@us...> - 2006-04-26 15:14:49
|
Update of /cvsroot/radmind/radmind-assistant In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2523 Modified Files: rmauthexec.c RAAuthExec.m RAAuthKiller.m Log Message: Use appropriate right name. Index: rmauthexec.c =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rmauthexec.c,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** rmauthexec.c 18 Nov 2005 15:19:25 -0000 1.44 --- rmauthexec.c 26 Apr 2006 15:14:45 -0000 1.45 *************** *** 686,690 **** main( int argc, char *argv[] ) { ! const char *rightname = "edu.umich.rmauthexec"; AuthorizationRef authref; AuthorizationExternalForm extauth; --- 686,690 ---- main( int argc, char *argv[] ) { ! const char *rightname = "edu.umich.radmind.generic"; AuthorizationRef authref; AuthorizationExternalForm extauth; Index: RAAuthKiller.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/RAAuthKiller.m,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** RAAuthKiller.m 12 Aug 2005 20:16:44 -0000 1.8 --- RAAuthKiller.m 26 Apr 2006 15:14:45 -0000 1.9 *************** *** 34,38 **** - ( void )killTool: ( int )tool forController: ( id )controller { ! AuthorizationItem right = { "edu.umich.rmauthexec", 0, NULL, 0 }; int rc; --- 34,39 ---- - ( void )killTool: ( int )tool forController: ( id )controller { ! AuthorizationItem right = { "edu.umich.radmind.generic", ! 0, NULL, 0 }; int rc; Index: RAAuthExec.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/RAAuthExec.m,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** RAAuthExec.m 5 Aug 2005 15:19:24 -0000 1.46 --- RAAuthExec.m 26 Apr 2006 15:14:45 -0000 1.47 *************** *** 111,115 **** controller: ( id )controller { ! AuthorizationItem right = { "edu.umich.rmauthexec", 0, NULL, 0 }; int rc; --- 111,115 ---- controller: ( id )controller { ! AuthorizationItem right = { "edu.umich.radmind.generic", 0, NULL, 0 }; int rc; *************** *** 136,140 **** displayInPane: NO ]; } ! /* execute command */ rc = authorize_and_exec( right, --- 136,140 ---- displayInPane: NO ]; } ! /* execute command */ rc = authorize_and_exec( right, *************** *** 456,460 **** { int err; ! AuthorizationRef authRef; AuthorizationRights rights = { 1, &right }; OSStatus status; --- 456,460 ---- { int err; ! AuthorizationRef authRef = NULL; AuthorizationRights rights = { 1, &right }; OSStatus status; *************** *** 471,475 **** if ( status != errAuthorizationSuccess ) { ! [ rae reportError: @"AuthorizationCreate failed: error %d\n", ( int )status ]; return( -1 ); } --- 471,476 ---- if ( status != errAuthorizationSuccess ) { ! [ rae reportError: @"AuthorizationCreate failed: error %d\n", ! ( int )status ]; return( -1 ); } *************** *** 484,489 **** if ( status != errAuthorizationSuccess ) { ! [ rae reportError: @"AuthorizationCopyRights failed: %d\n", ( int )status ]; ! AuthorizationFree( authRef, kAuthorizationFlagDefaults ); return( -2 ); } --- 485,493 ---- if ( status != errAuthorizationSuccess ) { ! [ rae reportError: @"AuthorizationCopyRights failed: %d\n", ! ( int )status ]; ! if ( authRef != NULL ) { ! AuthorizationFree( authRef, kAuthorizationFlagDefaults ); ! } return( -2 ); } *************** *** 495,501 **** } ! if (( status = AuthorizationFree( authRef, kAuthorizationFlagDefaults )) ! != errAuthorizationSuccess ) { ! [ rae reportError: @"AuthorizationFree failed: error %d\n", ( int )status ]; } --- 499,508 ---- } ! if ( authRef != NULL ) { ! if (( status = AuthorizationFree( authRef, kAuthorizationFlagDefaults )) ! != errAuthorizationSuccess ) { ! [ rae reportError: @"AuthorizationFree failed: error %d\n", ! ( int )status ]; ! } } |