Login new
This commit is contained in:
60
login.c
60
login.c
@@ -115,12 +115,19 @@ static int login_help(void)
|
|||||||
|
|
||||||
static void login_banner(void)
|
static void login_banner(void)
|
||||||
{
|
{
|
||||||
login_video_attr = 0x1f; /* white on blue */
|
login_cls_attr(0x07); /* normal black background */
|
||||||
login_cls_attr(login_video_attr);
|
|
||||||
login_fill_line(1, login_video_attr);
|
/*
|
||||||
login_write_attr(36, 1, "Mars NWE", login_video_attr);
|
* Official LOGIN shows a colored separator, title line, colored separator,
|
||||||
|
* then returns to the normal black screen for the prompt. Use blue instead
|
||||||
|
* of Novell red and show "Mars NWE".
|
||||||
|
*/
|
||||||
|
login_fill_line(1, 0x1f); /* white on blue */
|
||||||
|
login_write_attr(36, 2, "Mars NWE", 0x0f); /* white on black */
|
||||||
|
login_fill_line(3, 0x1f); /* white on blue */
|
||||||
|
|
||||||
login_screen_normal();
|
login_screen_normal();
|
||||||
login_gotoxy(1, 3);
|
login_gotoxy(1, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *skip_spaces(char *p)
|
static char *skip_spaces(char *p)
|
||||||
@@ -370,16 +377,47 @@ static int run_login_script(void)
|
|||||||
{
|
{
|
||||||
char profile[200];
|
char profile[200];
|
||||||
|
|
||||||
sprintf(profile, "%snet$log.dat", prgpath);
|
/*
|
||||||
if (read_command_file(profile) != -2) return(0);
|
* NetWare LOGIN normally executes the system login script from SYS:PUBLIC.
|
||||||
|
* Try current directory first because LOGIN.EXE is often run from PUBLIC,
|
||||||
sprintf(profile, "%slogin", prgpath);
|
* then the program path, then common SYS:PUBLIC and SYS:LOGIN paths.
|
||||||
if (read_command_file(profile) != -2) return(0);
|
*/
|
||||||
|
|
||||||
if (read_command_file("net$log.dat") != -2) return(0);
|
if (read_command_file("net$log.dat") != -2) return(0);
|
||||||
|
if (read_command_file("NET$LOG.DAT") != -2) return(0);
|
||||||
if (read_command_file("login") != -2) return(0);
|
if (read_command_file("login") != -2) return(0);
|
||||||
|
if (read_command_file("LOGIN") != -2) return(0);
|
||||||
|
|
||||||
|
if (*prgpath) {
|
||||||
|
sprintf(profile, "%snet$log.dat", prgpath);
|
||||||
|
if (read_command_file(profile) != -2) return(0);
|
||||||
|
|
||||||
|
sprintf(profile, "%sNET$LOG.DAT", prgpath);
|
||||||
|
if (read_command_file(profile) != -2) return(0);
|
||||||
|
|
||||||
|
sprintf(profile, "%slogin", prgpath);
|
||||||
|
if (read_command_file(profile) != -2) return(0);
|
||||||
|
|
||||||
|
sprintf(profile, "%sLOGIN", prgpath);
|
||||||
|
if (read_command_file(profile) != -2) return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (read_command_file("\\net$log.dat") != -2) return(0);
|
||||||
|
if (read_command_file("\\NET$LOG.DAT") != -2) return(0);
|
||||||
|
|
||||||
|
if (read_command_file("\\public\\net$log.dat") != -2) return(0);
|
||||||
|
if (read_command_file("\\PUBLIC\\NET$LOG.DAT") != -2) return(0);
|
||||||
|
if (read_command_file("\\public\\login") != -2) return(0);
|
||||||
|
if (read_command_file("\\PUBLIC\\LOGIN") != -2) return(0);
|
||||||
|
|
||||||
|
if (read_command_file("f:\\public\\net$log.dat") != -2) return(0);
|
||||||
|
if (read_command_file("f:\\PUBLIC\\NET$LOG.DAT") != -2) return(0);
|
||||||
|
if (read_command_file("f:\\public\\login") != -2) return(0);
|
||||||
|
if (read_command_file("f:\\PUBLIC\\LOGIN") != -2) return(0);
|
||||||
|
|
||||||
if (read_command_file("\\login\\login") != -2) return(0);
|
if (read_command_file("\\login\\login") != -2) return(0);
|
||||||
|
if (read_command_file("\\LOGIN\\LOGIN") != -2) return(0);
|
||||||
if (read_command_file("\\login\\net$log.dat") != -2) return(0);
|
if (read_command_file("\\login\\net$log.dat") != -2) return(0);
|
||||||
|
if (read_command_file("\\LOGIN\\NET$LOG.DAT") != -2) return(0);
|
||||||
|
|
||||||
return(-2);
|
return(-2);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user