summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2012-07-16 12:18:46 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-07-16 10:25:26 -0400
commit8e520758e2325c10d153bd2e3f57330b37545817 (patch)
treee1e612a29d28996d2da8cfbbaef78d8274f556ef
parent58b335985e75672e4de699351ab1182cbd7aa990 (diff)
downloadsssd-8e520758e2325c10d153bd2e3f57330b37545817.tar.gz
sssd-8e520758e2325c10d153bd2e3f57330b37545817.tar.xz
sssd-8e520758e2325c10d153bd2e3f57330b37545817.zip
sudo test client: avoid SIGSEGV when run without arguments
SIGSEGV occured when sss_sudo_cli was run without any arguments.
-rw-r--r--src/sss_client/sudo_testcli/sudo_testcli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sss_client/sudo_testcli/sudo_testcli.c b/src/sss_client/sudo_testcli/sudo_testcli.c
index 50675f943..9786c02fc 100644
--- a/src/sss_client/sudo_testcli/sudo_testcli.c
+++ b/src/sss_client/sudo_testcli/sudo_testcli.c
@@ -46,7 +46,7 @@ int main(int argc, char **argv)
uid_t uid = 0;
uint32_t error = 0;
- if (argc > 3) {
+ if (argc != 2 && argc != 3) {
fprintf(stderr, "Usage: sss_sudo_cli username [uid]\n");
goto fail;
}