diff --git a/src/bin/login/main.c b/src/bin/login/main.c index 4ba7af5..834e849 100644 --- a/src/bin/login/main.c +++ b/src/bin/login/main.c @@ -64,19 +64,19 @@ char *data2 = 0x0; struct passwd *data = 0x0; - if ((getuid() != 0) && (getgid() != 0)) { + if ((getuid() != 0x0) && (getgid() != 0x0)) { printf("This Application Must Be Run As Root.\n"); exit(-1); } - if ((data = (struct passwd *)malloc(4096)) == 0x0) { + if ((data = (struct passwd *)malloc(0x1000)) == 0x0) { printf("Malloc Failed\n"); exit(0x1); } fd = fopen("sys:/userdb","r"); if (fd->fd == 0x0) { - printf("file not foun!!!\n"); - while (1); + printf("file not found!!!\n"); + exit(0x1); } /* if (!(fd = fopen("sys:/userdb","r"))) { @@ -86,7 +86,7 @@ memcpy(data[0].shell,"sys:/shell", 10); */ - fread(data,4096,1,fd); + fread(data,0x1000,0x1,fd); fclose(fd); if ((data2 = (char *)malloc(384)) == 0x0) {