extern int login_access (const char *user, const char *from);
/* loginprompt.c */
-extern void login_prompt (const char *, char *, int);
+extern void login_prompt (char *, int);
/* mail.c */
extern void mailcheck (void);
* is set in login.defs, this file is displayed before the prompt.
*/
-void login_prompt (const char *prompt, char *name, int namesize)
+void login_prompt (char *name, int namesize)
{
char buf[1024];
char *cp;
int i;
FILE *fp;
+ const char *fname = getdef_str ("ISSUE_FILE");
sighandler_t sigquit;
sighandler_t sigtstp;
* be displayed and display it before the prompt.
*/
- if (NULL != prompt) {
- const char *fname = getdef_str ("ISSUE_FILE");
- if (NULL != fname) {
- fp = fopen (fname, "r");
- if (NULL != fp) {
- while ((i = getc (fp)) != EOF) {
- (void) putc (i, stdout);
- }
-
- (void) fclose (fp);
+ if (NULL != fname) {
+ fp = fopen (fname, "r");
+ if (NULL != fp) {
+ while ((i = getc (fp)) != EOF) {
+ (void) putc (i, stdout);
}
+
+ (void) fclose (fp);
}
- (void) gethostname (buf, sizeof buf);
- printf (prompt, buf);
- (void) fflush (stdout);
}
+ (void) gethostname (buf, sizeof buf);
+ printf (_("\n%s login: "), buf);
+ (void) fflush (stdout);
/*
* Read the user's response. The trailing newline will be
preauth_flag = false;
username = XMALLOCARRAY (USER_NAME_MAX_LENGTH + 1, char);
username[USER_NAME_MAX_LENGTH] = '\0';
- login_prompt (_("\n%s login: "), username, USER_NAME_MAX_LENGTH);
+ login_prompt (username, USER_NAME_MAX_LENGTH);
if ('\0' == username[0]) {
/* Prompt for a new login */