From 7b3778ceb4669fb2f2856a298e60c2d37ca6daa4 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Fri, 22 May 2026 17:26:56 +0200 Subject: [PATCH] Login new --- login.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 11 deletions(-) diff --git a/login.c b/login.c index 1223486..e6a1ce8 100644 --- a/login.c +++ b/login.c @@ -115,12 +115,19 @@ static int login_help(void) static void login_banner(void) { - login_video_attr = 0x1f; /* white on blue */ - login_cls_attr(login_video_attr); - login_fill_line(1, login_video_attr); - login_write_attr(36, 1, "Mars NWE", login_video_attr); + login_cls_attr(0x07); /* normal black background */ + + /* + * 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_gotoxy(1, 3); + login_gotoxy(1, 4); } static char *skip_spaces(char *p) @@ -370,16 +377,47 @@ static int run_login_script(void) { char profile[200]; - 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); - + /* + * NetWare LOGIN normally executes the system login script from SYS:PUBLIC. + * Try current directory first because LOGIN.EXE is often run from PUBLIC, + * then the program path, then common SYS:PUBLIC and SYS:LOGIN paths. + */ 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 (*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\\net$log.dat") != -2) return(0); + if (read_command_file("\\LOGIN\\NET$LOG.DAT") != -2) return(0); return(-2); }