[1874] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

Re: K5B5 on AIX 4.1.4

daemon@ATHENA.MIT.EDU (Doug Engert)
Mon Apr 15 18:47:03 1996

Date: Mon, 15 Apr 1996 17:46:47 -0500
From: Doug Engert <DEEngert@anl.gov>
To: Sam Hartman <hartmans@MIT.EDU>
Cc: Doug Engert <DEEngert@anl.gov>, krb5-bugs@MIT.EDU
In-Reply-To: <tsllojxw5vj.fsf@tertius.mit.edu>

Sam,

 I added the attached code to ss-960411 krlogind.c on the AIX 4.1.4 system,
and compiled with the -DDO_NOT_USE_K_LOGIN -DUSE_LOGIN_F 
-DLOGIN_PROGRAM=\"/bin/login\"

It does not crash the system with this code.

On a previous make using the same source, I had forgotten to define the
-DLOGIN_PROGRAM=\"/bin/login\", so it used login.krb5 This crashed the
system. 

So I am pretty sure there is a problem with the login.krb5.

These changes are not perfect, there is still a problem with
^C or ^D., and there were some strange characters on startup.  
This may be a problem with the pty utilities, or some of the terminal
settings, or the TIOCKPT processing. 

I can look at this in the morning. 

           Douglas E. Engert
           Systems Programming
           Argonne National Laboratory
           9700 South Cass Avenue
           Argonne, Illinois  60439 
           (708) 252-5444

           Internet: DEEngert@anl.gov



*** ,krlogind.c	Thu Apr 11 19:13:46 1996
--- krlogind.c	Mon Apr 15 16:53:33 1996
***************
*** 639,644 ****
--- 639,646 ----
  	
  
  #if defined(POSIX_TERMIOS) && !defined(ultrix)
+ 
+ #ifdef DO_NOT_USE_K_LOGIN
  	tcgetattr(t,&new_termio);
  	new_termio.c_lflag &=  ~(ICANON|ECHO|ISIG|IEXTEN);
  	/* so that login can read the authenticator */
***************
*** 648,653 ****
--- 650,656 ----
  	new_termio.c_cc[VMIN] = 1;
  	new_termio.c_cc[VTIME] = 0;
  	tcsetattr(t,TCSANOW,&new_termio);
+ #endif /* DO_NOT_USE_K_LOGIN */
  #else
  	(void)ioctl(t, TIOCGETP, &b);
  	b.sg_flags = RAW|ANYP;
***************
*** 728,734 ****
--- 731,756 ----
  #endif
  
  #ifdef DO_NOT_USE_K_LOGIN
+ #ifdef USE_LOGIN_F
+ /* use the vendors login, which has -p and -f. Tested on 
+  * AIX 4.1.4 and HPUX 10 
+  */
+     {
+         char *cp;
+         if ((cp = strchr(term,'/')))
+             *cp = '\0';
+         setenv("TERM",term, 1);
+     }
+  
+     if (passwd_req)
+         execl(login_program, "login", "-p", "-h", rhost_name,
+           lusername, 0);
+     else
+         execl(login_program, "login", "-p", "-h", rhost_name,
+              "-f", lusername, 0);
+ #else /* USE_LOGIN_F */
  	execl(login_program, "login", "-r", rhost_name, 0);
+ #endif /* USE_LOGIN_F */
  #else
  	if (passwd_req)
  	  execl(login_program, "login","-h", rhost_name, lusername, 0);
***************
*** 800,805 ****
--- 822,828 ----
      (void) write(p, rusername, strlen(rusername) +1);
      (void) write(p, lusername, strlen(lusername) +1);
  #endif
+ #if defined(DO_NOT_USE_K_LOGIN) && defined(USE_LOGIN_F) 
      /* stuff term info down to login */
      if( write(p, term, strlen(term)+1) != strlen(term)+1 ){
  	/*
***************
*** 808,813 ****
--- 831,837 ----
  	sprintf(buferror,"Cannot write slave pty %s ",line);
  	fatalperror(f,buferror);
      }
+ #endif /* DO_NOT_USE_K_LOGIN && USE_LOGIN_F */
      protocol(f, p);
      signal(SIGCHLD, SIG_IGN);
      cleanup();



home help back first fref pref prev next nref lref last post