pico-login.c (104744) | pico-login.c (146187) |
---|---|
1/*- 2 * Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94"; 43#endif 44static const char rcsid[] = | 1/*- 2 * Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94"; 43#endif 44static const char rcsid[] = |
45 "$FreeBSD: head/release/picobsd/tinyware/login/pico-login.c 104744 2002-10-10 00:32:55Z alfred $"; | 45 "$FreeBSD: head/release/picobsd/tinyware/login/pico-login.c 146187 2005-05-13 16:31:11Z ume $"; |
46#endif /* not lint */ 47 48/* 49 * login [ name ] 50 * login -h hostname (for telnetd, etc.) 51 * login -f name (for pre-authenticated login: datakit, xterm, etc.) 52 */ 53 --- 27 unchanged lines hidden (view full) --- 81#ifdef USE_PAM 82#include <security/pam_appl.h> 83#include <security/openpam.h> 84#include <sys/wait.h> 85#endif /* USE_PAM */ 86 87#include "pathnames.h" 88 | 46#endif /* not lint */ 47 48/* 49 * login [ name ] 50 * login -h hostname (for telnetd, etc.) 51 * login -f name (for pre-authenticated login: datakit, xterm, etc.) 52 */ 53 --- 27 unchanged lines hidden (view full) --- 81#ifdef USE_PAM 82#include <security/pam_appl.h> 83#include <security/openpam.h> 84#include <sys/wait.h> 85#endif /* USE_PAM */ 86 87#include "pathnames.h" 88 |
89/* wrapper for KAME-special getnameinfo() */ 90#ifndef NI_WITHSCOPEID 91#define NI_WITHSCOPEID 0 92#endif 93 | |
94void badlogin(char *); 95void checknologin(void); 96void dolastlog(int); 97void getloginname(void); 98void motd(const char *); 99int rootterm(char *); 100void sigint(int); 101void sleepexit(int); --- 127 unchanged lines hidden (view full) --- 229 &res); 230 if (ga_err == 0) { 231 char hostbuf[MAXHOSTNAMELEN]; 232 233 getnameinfo(res->ai_addr, 234 res->ai_addrlen, 235 hostbuf, 236 sizeof(hostbuf), NULL, 0, | 89void badlogin(char *); 90void checknologin(void); 91void dolastlog(int); 92void getloginname(void); 93void motd(const char *); 94int rootterm(char *); 95void sigint(int); 96void sleepexit(int); --- 127 unchanged lines hidden (view full) --- 224 &res); 225 if (ga_err == 0) { 226 char hostbuf[MAXHOSTNAMELEN]; 227 228 getnameinfo(res->ai_addr, 229 res->ai_addrlen, 230 hostbuf, 231 sizeof(hostbuf), NULL, 0, |
237 NI_NUMERICHOST| 238 NI_WITHSCOPEID); | 232 NI_NUMERICHOST); |
239 optarg = strdup(hostbuf); 240 if (optarg == NULL) { 241 syslog(LOG_NOTICE, 242 "strdup(): %m"); 243 sleepexit(1); 244 } 245 } else 246 optarg = "invalid hostname"; --- 228 unchanged lines hidden (view full) --- 475 hints.ai_family = AF_UNSPEC; 476 ga_err = getaddrinfo(full_hostname, NULL, &hints, 477 &res); 478 if (ga_err == 0) { 479 char hostbuf[MAXHOSTNAMELEN]; 480 481 getnameinfo(res->ai_addr, res->ai_addrlen, 482 hostbuf, sizeof(hostbuf), NULL, 0, | 233 optarg = strdup(hostbuf); 234 if (optarg == NULL) { 235 syslog(LOG_NOTICE, 236 "strdup(): %m"); 237 sleepexit(1); 238 } 239 } else 240 optarg = "invalid hostname"; --- 228 unchanged lines hidden (view full) --- 469 hints.ai_family = AF_UNSPEC; 470 ga_err = getaddrinfo(full_hostname, NULL, &hints, 471 &res); 472 if (ga_err == 0) { 473 char hostbuf[MAXHOSTNAMELEN]; 474 475 getnameinfo(res->ai_addr, res->ai_addrlen, 476 hostbuf, sizeof(hostbuf), NULL, 0, |
483 NI_NUMERICHOST|NI_WITHSCOPEID); | 477 NI_NUMERICHOST); |
484 if ((optarg = strdup(hostbuf)) == NULL) { 485 syslog(LOG_NOTICE, "strdup(): %m"); 486 sleepexit(1); 487 } 488 } else 489 optarg = NULL; 490 if (res != NULL) 491 freeaddrinfo(res); --- 602 unchanged lines hidden --- | 478 if ((optarg = strdup(hostbuf)) == NULL) { 479 syslog(LOG_NOTICE, "strdup(): %m"); 480 sleepexit(1); 481 } 482 } else 483 optarg = NULL; 484 if (res != NULL) 485 freeaddrinfo(res); --- 602 unchanged lines hidden --- |