From 12d643b8421cfec714881fae1698777bb9a55207 Mon Sep 17 00:00:00 2001 From: "Andrey V.Kosteltsev" Date: Sat, 24 Sep 2022 21:44:57 +0300 Subject: Ctrl-D for all users --- src/main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main.c b/src/main.c index f6172b4..8ab3853 100644 --- a/src/main.c +++ b/src/main.c @@ -25,7 +25,6 @@ char pwd[PATH_MAX], home[PATH_MAX]; static sigset_t blockmask; -int can_quit = 0; COMMAND top_admin_list[] = { { "help", com_help, "Display this text" }, @@ -41,6 +40,7 @@ COMMAND top_operator_list[] = { { "?", com_help, "Synonym for `help'" }, { "shell", com_shell, "Activate submenu shell" }, { "users", com_users, "Activate submenu users" }, + { "quit", com_quit, "Quit using SILA Shell" }, { (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL } }; @@ -48,6 +48,7 @@ COMMAND top_user_list[] = { { "help", com_help, "Display this text" }, { "?", com_help, "Synonym for `help'" }, { "shell", com_shell, "Activate submenu shell" }, + { "quit", com_quit, "Quit using SILA Shell" }, { (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL } }; @@ -69,7 +70,6 @@ COMMAND shell_admin_list[] = { { "more", com_more, "View the contents of FILE" }, { "vi", com_vi, "Edit the contents of text FILE" }, { "..", com_top, "Return to top menu" }, - { "quit", com_quit, "Quit using SILA Shell" }, { (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL } }; @@ -391,10 +391,7 @@ int main( int argc, char **argv ) if( !line ) { - if( !can_quit ) - continue; /* for non-priviledged users */ - else - break; /* for admin */ + break; } /* -- cgit v1.2.3