- if (action < 0 && device == NULL && uid == 0)
- consolekit_called(argv[optind], &uid, &uid2, &remove_session_id, &action);
+ if (action < 0 && device == NULL && !uid_given)
+ if (!consolekit_called(argv[optind], &uid, &uid2, &remove_session_id, &action))
+ uid_given = true;