aboutsummaryrefslogtreecommitdiffstats
path: root/src/cerberus.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-07 19:43:38 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-07 19:43:38 +0200
commit9641824e740781b963ef60c15aa75d23554f7aa9 (patch)
tree7cfc6b49673d8f7fed2b0602289d2dca51c8a2b0 /src/cerberus.c
parentadd more warnings (diff)
downloadcerberus-9641824e740781b963ef60c15aa75d23554f7aa9.tar.gz
cerberus-9641824e740781b963ef60c15aa75d23554f7aa9.tar.bz2
cerberus-9641824e740781b963ef60c15aa75d23554f7aa9.tar.xz
fix some warnings
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/cerberus.c')
-rw-r--r--src/cerberus.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/cerberus.c b/src/cerberus.c
index 7bea9fc..49fbe66 100644
--- a/src/cerberus.c
+++ b/src/cerberus.c
@@ -181,16 +181,17 @@ void do_login(int argc, char** argv)
/* Only root may bypass authentication */
- if (skip_auth && getuid())
+ if (skip_auth)
{
- printf("%s: only root by use the -f option\n", *argv);
- sleep(ERROR_SLEEP);
- _exit(2);
+ if (getuid())
+ {
+ printf("%s: only root by use the -f option\n", *argv);
+ sleep(ERROR_SLEEP);
+ _exit(2);
+ }
}
-
-
/* Print ant we want a passphrase, if -f has not been used */
- if (skip_auth == 0)
+ else
{
printf("Passphrase: ");
fflush(stdout);