su.c (ba174a5e38b1ab764c4a36ef4dd83e80c4add148) | su.c (2966d28c322dcfa4b9db2558da0b91839e7798b9) |
---|---|
1/* 2 * Copyright (c) 2002, 2005 Networks Associates Technologies, Inc. 3 * All rights reserved. 4 * 5 * Portions of this software were developed for the FreeBSD Project by 6 * ThinkSec AS and NAI Labs, the Security Research Division of Network 7 * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 8 * ("CBOSS"), as part of the DARPA CHATS research program. --- 550 unchanged lines hidden (view full) --- 559 err(1, "%s", shell); 560 } 561} 562 563static void 564export_pam_environment(void) 565{ 566 char **pp; | 1/* 2 * Copyright (c) 2002, 2005 Networks Associates Technologies, Inc. 3 * All rights reserved. 4 * 5 * Portions of this software were developed for the FreeBSD Project by 6 * ThinkSec AS and NAI Labs, the Security Research Division of Network 7 * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 8 * ("CBOSS"), as part of the DARPA CHATS research program. --- 550 unchanged lines hidden (view full) --- 559 err(1, "%s", shell); 560 } 561} 562 563static void 564export_pam_environment(void) 565{ 566 char **pp; |
567 char *p; |
|
567 568 for (pp = environ_pam; *pp != NULL; pp++) { | 568 569 for (pp = environ_pam; *pp != NULL; pp++) { |
569 if (ok_to_export(*pp)) 570 putenv(*pp); | 570 if (ok_to_export(*pp)) { 571 p = strchr(*pp, '='); 572 *p = '\0'; 573 setenv(*pp, p + 1, 1); 574 } |
571 free(*pp); 572 } 573} 574 575/* 576 * Sanity checks on PAM environmental variables: 577 * - Make sure there is an '=' in the string. 578 * - Make sure the string doesn't run on too long. --- 62 unchanged lines hidden --- | 575 free(*pp); 576 } 577} 578 579/* 580 * Sanity checks on PAM environmental variables: 581 * - Make sure there is an '=' in the string. 582 * - Make sure the string doesn't run on too long. --- 62 unchanged lines hidden --- |