Print this page
3808 sulogin should reset console to text mode
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
*** 16,26 ****
--- 16,31 ----
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
+
/*
+ * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+ */
+
+ /*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
*** 73,82 ****
--- 78,88 ----
#include <auth_attr.h>
#include <auth_list.h>
#include <nss_dbdefs.h>
#include <user_attr.h>
#include <sys/vt.h>
+ #include <sys/kd.h>
/*
* Intervals to sleep after failed login
*/
#ifndef SLEEPTIME
*** 440,450 ****
}
static void
main_loop(char *devname, boolean_t cttyflag)
{
! int fd, i;
char *user = NULL; /* authorized user */
char *pass; /* password from user */
char *cpass; /* crypted password */
struct spwd spwd;
struct spwd *lshpw; /* local shadow */
--- 446,456 ----
}
static void
main_loop(char *devname, boolean_t cttyflag)
{
! int fd, fb, i;
char *user = NULL; /* authorized user */
char *pass; /* password from user */
char *cpass; /* crypted password */
struct spwd spwd;
struct spwd *lshpw; /* local shadow */
*** 476,485 ****
--- 482,497 ----
if (fd != 2)
(void) dup2(fd, STDERR_FILENO);
if (fd > 2)
(void) close(fd);
+ /* Stop progress bar and reset console mode to text */
+ if ((fb = open("/dev/fb", O_RDONLY)) >= 0) {
+ (void) ioctl(fb, KDSETMODE, KD_RESETTEXT);
+ (void) close(fb);
+ }
+
sysmsgfd = fopen("/dev/sysmsg", "w");
sanitize_tty(fileno(stdin));
for (;;) {