diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-11-20 19:08:37 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-11-20 19:08:37 +0100 |
commit | e319d2acae70e5e31c8a434a42b0d626a52c7b2d (patch) | |
tree | 80320d1e36947dd6edec3bf2118c7263fefc1ba1 | |
parent | link libpam (diff) | |
download | libpassphrase-e319d2acae70e5e31c8a434a42b0d626a52c7b2d.tar.gz libpassphrase-e319d2acae70e5e31c8a434a42b0d626a52c7b2d.tar.bz2 libpassphrase-e319d2acae70e5e31c8a434a42b0d626a52c7b2d.tar.xz |
only root may use -f
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/cerberus.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cerberus.c b/src/cerberus.c index f8c0826..90bab2f 100644 --- a/src/cerberus.c +++ b/src/cerberus.c @@ -148,6 +148,15 @@ void do_login(int argc, char** argv) } + /* Only root may bypass authentication */ + if (skip_auth && 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) { |