login.c (114048) | login.c (125055) |
---|---|
1/*- 2 * Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (c) 2002 Networks Associates Technologies, Inc. 5 * All rights reserved. 6 * 7 * Portions of this software were developed for the FreeBSD Project by 8 * ThinkSec AS and NAI Labs, the Security Research Division of Network --- 31 unchanged lines hidden (view full) --- 40 41#if 0 42#ifndef lint 43static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94"; 44#endif 45#endif 46 47#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (c) 2002 Networks Associates Technologies, Inc. 5 * All rights reserved. 6 * 7 * Portions of this software were developed for the FreeBSD Project by 8 * ThinkSec AS and NAI Labs, the Security Research Division of Network --- 31 unchanged lines hidden (view full) --- 40 41#if 0 42#ifndef lint 43static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94"; 44#endif 45#endif 46 47#include <sys/cdefs.h> |
48__FBSDID("$FreeBSD: head/usr.bin/login/login.c 114048 2003-04-26 02:51:03Z rwatson $"); | 48__FBSDID("$FreeBSD: head/usr.bin/login/login.c 125055 2004-01-26 20:04:47Z fjoe $"); |
49 50/* 51 * login [ name ] 52 * login -h hostname (for telnetd, etc.) 53 * login -f name (for pre-authenticated login: datakit, xterm, etc.) 54 */ 55 56#include <sys/copyright.h> --- 294 unchanged lines hidden (view full) --- 351 endpwent(); 352 353 /* 354 * Establish the login class. 355 */ 356 lc = login_getpwclass(pwd); 357 358 quietlog = login_getcapbool(lc, "hushlogin", 0); | 49 50/* 51 * login [ name ] 52 * login -h hostname (for telnetd, etc.) 53 * login -f name (for pre-authenticated login: datakit, xterm, etc.) 54 */ 55 56#include <sys/copyright.h> --- 294 unchanged lines hidden (view full) --- 351 endpwent(); 352 353 /* 354 * Establish the login class. 355 */ 356 lc = login_getpwclass(pwd); 357 358 quietlog = login_getcapbool(lc, "hushlogin", 0); |
359 if (!quietlog) 360 pam_silent = 0; | |
361 362 /* 363 * Switching needed for NFS with root access disabled. 364 * 365 * XXX: This change fails to modify the additional groups for the 366 * process, and as such, may restrict rights normally granted 367 * through those groups. 368 */ --- 9 unchanged lines hidden (view full) --- 378 pwd->pw_dir = strdup("/"); 379 if (pwd->pw_dir == NULL) { 380 syslog(LOG_NOTICE, "strdup(): %m"); 381 bail(SLEEP_EXIT, 1); 382 } 383 } 384 (void)seteuid(euid); 385 (void)setegid(egid); | 359 360 /* 361 * Switching needed for NFS with root access disabled. 362 * 363 * XXX: This change fails to modify the additional groups for the 364 * process, and as such, may restrict rights normally granted 365 * through those groups. 366 */ --- 9 unchanged lines hidden (view full) --- 376 pwd->pw_dir = strdup("/"); 377 if (pwd->pw_dir == NULL) { 378 syslog(LOG_NOTICE, "strdup(): %m"); 379 bail(SLEEP_EXIT, 1); 380 } 381 } 382 (void)seteuid(euid); 383 (void)setegid(egid); |
386 if (!quietlog) | 384 if (!quietlog) { |
387 quietlog = access(_PATH_HUSHLOGIN, F_OK) == 0; | 385 quietlog = access(_PATH_HUSHLOGIN, F_OK) == 0; |
386 if (!quietlog) 387 pam_silent = 0; 388 } |
|
388 389 shell = login_getcapstr(lc, "shell", pwd->pw_shell, pwd->pw_shell); 390 if (*pwd->pw_shell == '\0') 391 pwd->pw_shell = strdup(_PATH_BSHELL); 392 if (pwd->pw_shell == NULL) { 393 syslog(LOG_NOTICE, "strdup(): %m"); 394 bail(SLEEP_EXIT, 1); 395 } --- 540 unchanged lines hidden --- | 389 390 shell = login_getcapstr(lc, "shell", pwd->pw_shell, pwd->pw_shell); 391 if (*pwd->pw_shell == '\0') 392 pwd->pw_shell = strdup(_PATH_BSHELL); 393 if (pwd->pw_shell == NULL) { 394 syslog(LOG_NOTICE, "strdup(): %m"); 395 bail(SLEEP_EXIT, 1); 396 } --- 540 unchanged lines hidden --- |