restore elevated priority before launching command in

user context. Fixes PR 33479.
This commit is contained in:
mlelstv 2006-05-14 21:18:31 +00:00
parent 215bd95ba4
commit bad43188a8

View File

@ -1,4 +1,4 @@
/* $NetBSD: su_pam.c,v 1.11 2005/12/15 14:01:31 christos Exp $ */
/* $NetBSD: su_pam.c,v 1.12 2006/05/14 21:18:31 mlelstv Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@ -40,7 +40,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)su.c 8.3 (Berkeley) 4/2/94";*/
#else
__RCSID("$NetBSD: su_pam.c,v 1.11 2005/12/15 14:01:31 christos Exp $");
__RCSID("$NetBSD: su_pam.c,v 1.12 2006/05/14 21:18:31 mlelstv Exp $");
#endif
#endif /* not lint */
@ -493,6 +493,9 @@ out:
syslog(LOG_NOTICE, "%s to %s%s",
username, pwd->pw_name, ontty());
/* Raise our priority back to what we had before */
(void)setpriority(PRIO_PROCESS, 0, prio);
/*
* Set user context, except for umask, and the stuff
* we have done before.