diff options
author | des <des@FreeBSD.org> | 2007-12-21 11:49:29 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2007-12-21 11:49:29 +0000 |
commit | e05e8ab881c687386fca2c534083bee2a0a51c6a (patch) | |
tree | e0ebac8083c1e5e6132058a1e1f258d528230d2d /contrib/openpam/bin/su/su.c | |
parent | ea144ae9da6f54d800cd57d9f9292c0db5e08d80 (diff) | |
download | FreeBSD-src-e05e8ab881c687386fca2c534083bee2a0a51c6a.zip FreeBSD-src-e05e8ab881c687386fca2c534083bee2a0a51c6a.tar.gz |
Vendor import of OpenPAM Hydrangea.
Diffstat (limited to 'contrib/openpam/bin/su/su.c')
-rw-r--r-- | contrib/openpam/bin/su/su.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/openpam/bin/su/su.c b/contrib/openpam/bin/su/su.c index 345d601..4c7d0eb 100644 --- a/contrib/openpam/bin/su/su.c +++ b/contrib/openpam/bin/su/su.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/bin/su/su.c#12 $ + * $Id: su.c 408 2007-12-21 11:36:24Z des $ */ #include <sys/param.h> @@ -67,6 +68,7 @@ main(int argc, char *argv[]) { char hostname[MAXHOSTNAMELEN]; const char *user, *tty; + const void *item; char **args, **pam_envlist, **pam_env; struct passwd *pwd; int o, pam_err, status; @@ -122,8 +124,8 @@ main(int argc, char *argv[]) goto pamerr; /* get mapped user name; PAM may have changed it */ - pam_err = pam_get_item(pamh, PAM_USER, (const void **)&user); - if (pam_err != PAM_SUCCESS || (pwd = getpwnam(user)) == NULL) + pam_err = pam_get_item(pamh, PAM_USER, &item); + if (pam_err != PAM_SUCCESS || (pwd = getpwnam(user = item)) == NULL) goto pamerr; /* export PAM environment */ |