aboutsummaryrefslogtreecommitdiffstats
path: root/src/cerberus.c
diff options
context:
space:
mode:
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);