diff --git a/src/bin/login/main.c b/src/bin/login/main.c index 834e849..eca3f00 100644 --- a/src/bin/login/main.c +++ b/src/bin/login/main.c @@ -59,10 +59,14 @@ int main() { FILE *fd; int shellPid = 0,i = 0x0; + char username[10]; + char password[10]; char userName[32]; char passWord[32]; char *data2 = 0x0; struct passwd *data = 0x0; +username[0] = 'c'; +password[0] = 'f'; if ((getuid() != 0x0) && (getgid() != 0x0)) { printf("This Application Must Be Run As Root.\n"); @@ -93,6 +97,14 @@ printf("Malloc Failed\n"); exit(0x1); } + +/* we need to move this into the libc for getpwent(), etc */ + +asm volatile( + "int %0\n" + : : "i" (0x80), "a" (35), "b" (username), "c" (password) + ); + login: printf("\nUbixOS/IA-32 (devel.ubixos.com) (console)"); printf("\n\nLogin: "); diff --git a/src/include/sys/types.h b/src/include/sys/types.h index 08f9591..700e0ae 100644 --- a/src/include/sys/types.h +++ b/src/include/sys/types.h @@ -86,4 +86,6 @@ typedef enum { FALSE=0,TRUE=1 } bool; #endif + + #endif diff --git a/src/sys/include/ubixos/syscalls.h b/src/sys/include/ubixos/syscalls.h index a9075dd..19cd1f2 100644 --- a/src/sys/include/ubixos/syscalls.h +++ b/src/sys/include/ubixos/syscalls.h @@ -33,6 +33,10 @@ #include #include +void sysAuth(); +void sysPasswd(); +void sysAddModule(); +void sysRmModule(); void sysGetpid(); void sysExit(); void sysExec(); @@ -105,10 +109,10 @@ sysGetGid, /** 32 Get Group Id **/ sysSetUid, /** 33 Set User Id **/ sysSetGid, /** 34 Set Group Id **/ - invalidCall, /** 35 **/ - invalidCall, /** 36 **/ - invalidCall, /** 37 **/ - invalidCall, /** 38 **/ + sysAuth, /** 35 Authenticates the user **/ + sysPasswd, /** 36 Change user password **/ + sysAddModule, /** 37 Add Kernel Module **/ + sysRmModule, /** 38 Remove Kernel Module **/ invalidCall, /** 39 **/ sysSDE, /** 40 SDE Kernel Interface **/ invalidCall, /** 41 **/ @@ -133,6 +137,9 @@ /*** $Log$ + Revision 1.4 2004/05/26 15:39:22 reddawg + mpi: brought mpiDestroyMbox(char *name) in to the userland + Revision 1.3 2004/05/25 15:42:19 reddawg Enabled mpiSpam(); diff --git a/src/sys/kernel/syscall.c b/src/sys/kernel/syscall.c index 29a5c4a..de54c0f 100644 --- a/src/sys/kernel/syscall.c +++ b/src/sys/kernel/syscall.c @@ -65,7 +65,7 @@ " add $4,%esp \n" " jmp doneNew \n" "invalidSysCallNew: \n" - " call invalidCall \n" + " call InvalidSystemCall \n" "doneNew: \n" " pop %gs \n" " pop %fs \n" @@ -82,17 +82,28 @@ return; } -void sysAuthenticateUser(char *username, char *password) +void sysAuth(char *user, char *passwd) { - kprintf("authenticating user %s\n", username); + kprintf("authenticating user %s\n", user); + return; } -void sysChangeUserPassword(char *passwd) +void sysPasswd(char *passwd) { kprintf("changing user password for user %d\n", _current->uid); return; } +void sysAddModule() +{ + return; +} + +void sysRmModule() +{ + return; +} + void sysGetpid(int *pid) { if (pid) diff --git a/src/sys/vfs/file.c b/src/sys/vfs/file.c index b21aedd..9b30794 100644 --- a/src/sys/vfs/file.c +++ b/src/sys/vfs/file.c @@ -121,7 +121,7 @@ ************************************************************************/ void sysFopen(const char *file,char *flags,userFileDescriptor *userFd) { if (userFd == NULL) - kpanic("Error: userFd == NULL, File: %s, Line: %i\n",__FILE__,__LINE__); + kprintf("Error: userFd == NULL, File: %s, Line: %i\n",__FILE__,__LINE__); userFd->fd = fopen(file,flags); if (userFd->fd != 0x0) { @@ -144,11 +144,10 @@ return; if (userFd->fd == NULL) return; - //kprintf("X"); + kprintf("X"); fread(data,size,1,userFd->fd); - //kprintf("Y"); - /* Return */ - return; + kprintf("Y"); + return; } /************************************************************************ @@ -159,7 +158,7 @@ ************************************************************************/ void sysFclose(userFileDescriptor *userFd,int *status) { - if (userFd == NULL) + if (userFd == NULL ) { *status = -1; return;