int status = 0;
tUserInfo *uinfo;
+ printf("\x1B[2J"); // Clear Screen
+
for(;;)
{
- printf("\x1B[2J"); // Clear Screen
// Validate User
for(;;)
{
child_argv[0] = uinfo->Shell;
// Set Environment
setgid(uinfo->GID);
- setuid(uid);
+ //setuid(uid);
+ setuid(uinfo->UID);
execve(uinfo->Shell, child_argv, child_envp);
exit(-1);
while( (ch = fgetc(stdin)) != -1 && ch != '\n' )
{
if(ch == '\b') {
+ if( pos <= 0 ) continue;
pos --;
ret[pos] = '\0';
}
while( (ch = fgetc(stdin)) != -1 && ch != '\n' )
{
if(ch == '\b') {
+ if( pos <= 0 ) continue;
pos --;
ret[pos] = '\0';
}