title: Multiple sudo commands in cocoa
body: <p>After some reading I finally found out how to do sudo commands through cocoa. But when I try to do multiple commands, it only does the first one. My code: </p>
  
  <pre><code>AuthorizationRef authorizationRef;
  OSStatus status;
  
  status = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment,
                               kAuthorizationFlagDefaults, &amp;authorizationRef);
  
  /* Step one: Rename current trash icon files */
  // Rename trashempty icon
  NSLog(@"Renaming trashempty icon");
  char *trashempty_tool = "/bin/mv";
  char *trashempty_args[] = {"/System/Library/CoreServices/Dock.app/Contents/Resources/trashempty.png","/System/Library/CoreServices/Dock.app/Contents/Resources/trashempty_backup.png"};
  
  status = AuthorizationExecuteWithPrivileges(authorizationRef, trashempty_tool,
                                              kAuthorizationFlagDefaults, trashempty_args, NULL);
  
  NSLog(@"Authorization Result Code: %d", status);
  // Check for status TODO
  
  NSLog(@"Renaming trashfull icon");
  char *trashfull_tool = "/bin/mv";
  char *trashfull_args[] = {"/System/Library/CoreServices/Dock.app/Contents/Resources/trashfull.png","/System/Library/CoreServices/Dock.app/Contents/Resources/trashfull_backup.png"};
  
  status = AuthorizationExecuteWithPrivileges(authorizationRef, trashfull_tool,
                                              kAuthorizationFlagDefaults, trashfull_args, NULL);
  
  NSLog(@"Authorization Result Code: %d", status);
  </code></pre>
  
  <p>Can you help me? </p>