diff options
author | Pavel Březina <pbrezina@redhat.com> | 2012-07-16 12:18:46 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-07-16 10:25:26 -0400 |
commit | 8e520758e2325c10d153bd2e3f57330b37545817 (patch) | |
tree | e1e612a29d28996d2da8cfbbaef78d8274f556ef | |
parent | 58b335985e75672e4de699351ab1182cbd7aa990 (diff) | |
download | sssd-8e520758e2325c10d153bd2e3f57330b37545817.tar.gz sssd-8e520758e2325c10d153bd2e3f57330b37545817.tar.bz2 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.c | 2 |
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 50675f94..9786c02f 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; } |