Print this page
6057 login(1) "Last login" hostname is too short
6594 lastlog.h should be private
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Gary Mills <gary_mills@fastmail.fm>


   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 #pragma ident   "%Z%%M% %I%     %E% SMI"
  27 
  28 /*
  29  * 4.2BSD, 2.9BSD, or ATTSVR4 TCP/IP server for uucico
  30  * uucico's TCP channel causes this server to be run at the remote end.
  31  */
  32 
  33 #include "uucp.h"
  34 #include <netdb.h>
  35 #ifdef BSD2_9
  36 #include <sys/localopts.h>
  37 #include <sys/file.h>
  38 #endif  /* BSD2_9 */
  39 #include <signal.h>
  40 #include <errno.h>
  41 #include <sys/socket.h>
  42 #include <netinet/in.h>
  43 #include <sys/wait.h>
  44 #ifdef ATTSVTTY
  45 #include <sys/termio.h>
  46 #else
  47 #include <sys/ioctl.h>
  48 #endif
  49 #include <pwd.h>
  50 #ifdef ATTSVR4
  51 #include <shadow.h>
  52 #endif
  53 #include <lastlog.h>
  54 
  55 #include <security/pam_appl.h>
  56 
  57 static int uucp_conv();
  58 struct pam_conv conv = {uucp_conv, NULL };
  59 pam_handle_t    *pamh;
  60 
  61 #if !defined(BSD4_2) && !defined(BSD2_9) && !defined(ATTSVR4)
  62 --- You must have either BSD4_2, BSD2_9, or ATTSVR4 defined for this to work
  63 #endif  /* !BSD4_2 && !BSD2_9 */
  64 #if defined(BSD4_2) && defined(BSD2_9)
  65 --- You may not have both BSD4_2 and BSD2_9 defined for this to work
  66 #endif  /* check for stupidity */
  67 
  68 char lastlog[] = "/var/adm/lastlog";
  69 struct  passwd nouser = {
  70         "", "nope", (uid_t)-1, (gid_t)-1, "", "", "", "", "" };
  71 #ifdef ATTSVR4
  72 struct  spwd noupass = { "", "nope" };
  73 #endif
  74 struct  sockaddr_in hisctladdr;
  75 socklen_t hisaddrlen = (socklen_t)sizeof (hisctladdr);
  76 struct  sockaddr_in myctladdr;
  77 int nolog;              /* don't log in utmp or wtmp */
  78 
  79 char Username[64];
  80 char Loginname[64];
  81 char *nenv[] = {
  82         Username,
  83         Loginname,
  84         NULL,
  85 };
  86 extern char **environ;
  87 
  88 static void doit(struct sockaddr_in *);




   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 


  26 /*
  27  * 4.2BSD, 2.9BSD, or ATTSVR4 TCP/IP server for uucico
  28  * uucico's TCP channel causes this server to be run at the remote end.
  29  */
  30 
  31 #include "uucp.h"
  32 #include <netdb.h>
  33 #ifdef BSD2_9
  34 #include <sys/localopts.h>
  35 #include <sys/file.h>
  36 #endif  /* BSD2_9 */
  37 #include <signal.h>
  38 #include <errno.h>
  39 #include <sys/socket.h>
  40 #include <netinet/in.h>
  41 #include <sys/wait.h>
  42 #ifdef ATTSVTTY
  43 #include <sys/termio.h>
  44 #else
  45 #include <sys/ioctl.h>
  46 #endif
  47 #include <pwd.h>
  48 #ifdef ATTSVR4
  49 #include <shadow.h>
  50 #endif

  51 
  52 #include <security/pam_appl.h>
  53 
  54 static int uucp_conv();
  55 struct pam_conv conv = {uucp_conv, NULL };
  56 pam_handle_t    *pamh;
  57 
  58 #if !defined(BSD4_2) && !defined(BSD2_9) && !defined(ATTSVR4)
  59 --- You must have either BSD4_2, BSD2_9, or ATTSVR4 defined for this to work
  60 #endif  /* !BSD4_2 && !BSD2_9 */
  61 #if defined(BSD4_2) && defined(BSD2_9)
  62 --- You may not have both BSD4_2 and BSD2_9 defined for this to work
  63 #endif  /* check for stupidity */
  64 

  65 struct  passwd nouser = {
  66         "", "nope", (uid_t)-1, (gid_t)-1, "", "", "", "", "" };
  67 #ifdef ATTSVR4
  68 struct  spwd noupass = { "", "nope" };
  69 #endif
  70 struct  sockaddr_in hisctladdr;
  71 socklen_t hisaddrlen = (socklen_t)sizeof (hisctladdr);
  72 struct  sockaddr_in myctladdr;
  73 int nolog;              /* don't log in utmp or wtmp */
  74 
  75 char Username[64];
  76 char Loginname[64];
  77 char *nenv[] = {
  78         Username,
  79         Loginname,
  80         NULL,
  81 };
  82 extern char **environ;
  83 
  84 static void doit(struct sockaddr_in *);