1 Index: cgcs-users-1.0-r0/main.c
2 ===================================================================
3 --- cgcs-users-1.0-r0.orig/main.c
4 +++ cgcs-users-1.0-r0/main.c
12 /* Handle arguments, read config files, start command processing. */
14 /* use our builtin code, otherwise use execve. After execve, check if the user didnt */
15 /* use the last command to create some illegal content. If yes, erase that. Give the */
16 /* notice only afterwards. */
18 +void ALRMhandler(int sig) {
20 + syslog(LOG_INFO, "CLI timeout, user %s has logged out.", loggedin.uname);
25 int main(int argc, char **argv)
27 char temp[STRING_SIZE], *buf;
31 + unsigned int tout_cli = 0;
33 + const char* tout = getenv("TMOUT");
35 + tout_cli = atoi(tout);
40 /* setuid protection */
42 @@ -107,6 +123,7 @@ int main(int argc, char **argv)
43 signal( SIGQUIT, SIG_IGN );
44 signal( SIGTERM, SIG_IGN );
45 signal( SIGTSTP, SIG_IGN );
46 + signal( SIGALRM, ALRMhandler );
50 @@ -144,6 +161,7 @@ int main(int argc, char **argv)
51 /* will be allowed to run, unless it is mentioned in the */
52 /* config files. Files that are created with an extension */
53 /* that is listed in the other config file, must be deleted! */
57 getcwd(real_path, STRING_SIZE);
58 @@ -153,12 +171,12 @@ int main(int argc, char **argv)
60 /* We don't want the user to know where he actually is. */
61 /* This is the prompt! */
62 - printf("[%s]%% ", jail_path);
63 + printf("[%s]%% ", loggedin.uname);
64 /* scanf("%s", user_command); */
65 myscanf(user_command, real_path);
67 /* Command interpretation and execution. */
68 if ( (CommandOK(user_command, loggedin.udir, jail_path, filtered_command)) == 0 ) {
69 - printf("Sorry, can't let you do that!\n");
70 log_attempt(loggedin.uname); /* v0.2a */
73 Index: cgcs-users-1.0-r0/config.c
74 ===================================================================
75 --- cgcs-users-1.0-r0.orig/config.c
76 +++ cgcs-users-1.0-r0/config.c
77 @@ -166,7 +166,6 @@ int LoadConfig( void )
79 tmp2[i][strlen(tmp2[i]) - 1] = '\0';
80 strncpy(extensions[i],tmp2[i],strlen(tmp2[i]));
81 - printf("EXTENSIONS %s\n",extensions[i]);