X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Flogin_src%2Fdatabase_tpl.c;h=f164c0b8f948b264c43974db91dff5224c48c418;hb=8e1f78107cc9aa137de29e0c9df3a1fccb483b67;hp=de903d5932e55be9d7f38ba78c3678763ed452b2;hpb=c13663104076a7780d1bbbaf77273416733cbb58;p=tpg%2Facess2.git diff --git a/Usermode/Applications/login_src/database_tpl.c b/Usermode/Applications/login_src/database_tpl.c index de903d59..f164c0b8 100644 --- a/Usermode/Applications/login_src/database_tpl.c +++ b/Usermode/Applications/login_src/database_tpl.c @@ -25,6 +25,9 @@ int ValidateUser(char *Username, char *Password) if(Username == NULL) return -1; if(Password == NULL) return -1; if(strcmp(Username, "root") == 0) return 0; + if(strcmp(Username, "tpg") == 0) return 1; + if(strcmp(Username, "gui") == 0) return 2; + if(strcmp(Username, "gui3") == 0) return 3; return -1; } @@ -33,13 +36,32 @@ int ValidateUser(char *Username, char *Password) * \brief Gets a users information */ tUserInfo *GetUserInfo(int UID) -{ - if(UID != 0) return NULL; - - gUserInfo.UID = 0; - gUserInfo.GID = 0; +{ + gUserInfo.UID = UID; + gUserInfo.GID = UID; gUserInfo.Shell = "/Acess/Bin/CLIShell"; - gUserInfo.Home = "/Acess/Root"; + switch(UID) + { + case 0: + gUserInfo.Home = "/Acess/Root"; + break; + case 1: + gUserInfo.Home = "/Acess/Users/tpg"; + break; + case 2: + gUserInfo.UID = 0; //HACK! + gUserInfo.Home = "/Acess/Users/gui"; + gUserInfo.Shell = "/Acess/Apps/AxWin/1.0/AxWinWM"; + break; + case 3: + gUserInfo.UID = 0; + gUserInfo.Home = "/Acess/Root"; + gUserInfo.Shell = "/Acess/Apps/AxWin/3.0/AxWinWM"; + break; + default: + gUserInfo.Home = "/Acess/Users/Guest"; + break; + } return &gUserInfo; }