aboutsummaryrefslogtreecommitdiffstats
path: root/src/cerberus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cerberus.c')
-rw-r--r--src/cerberus.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cerberus.c b/src/cerberus.c
index 7195f80..adf5b6b 100644
--- a/src/cerberus.c
+++ b/src/cerberus.c
@@ -70,9 +70,6 @@ int main(int argc, char** argv)
signal(SIGQUIT, SIG_IGN);
signal(SIGINT, SIG_IGN);
- /* Run login hook */
- fork_exec_wait_hook(HOOK_LOGIN, argc, argv);
-
/* Wait for the login shell and all grandchildren to exit */
while ((wait(NULL) == -1) && (errno == EINTR))
;
@@ -353,6 +350,10 @@ void do_login(int argc, char** argv)
verify_account();
+ /* Run login hook */
+ fork_exec_wait_hook(HOOK_LOGIN, argc, argv);
+
+
/* Partial login */
chown_tty(entry->pw_uid, tty_group, 0);
chdir_home(entry);