1N/A/*************************************************************************** 1N/A * Copyright (C) 2006 David Zeuthen, <david@fubar.dk> 1N/A * Licensed under the Academic Free License version 2.1 1N/A * This program is free software; you can redistribute it and/or modify 1N/A * it under the terms of the GNU General Public License as published by 1N/A * the Free Software Foundation; either version 2 of the License, or 1N/A * (at your option) any later version. 1N/A * This program is distributed in the hope that it will be useful, 1N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of 1N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1N/A * GNU General Public License for more details. 1N/A * You should have received a copy of the GNU General Public License 1N/A * along with this program; if not, write to the Free Software 1N/A * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 1N/A **************************************************************************/ 1N/A * Start with the 'basic' privilege set and then remove any 1N/A * of the 'basic' privileges that will not be needed. 1N/A * Establish the basic set of privileges. 1N/A * interfaces are included in the basic set. 1N/A /* Clear privileges we will not need from the 'basic' set */ 1N/A /* for sysevent need to be root and have this privilege */ 1N/A /* need proc_audit privilege */ 1N/A /* Set the permitted privilege set. */ 1N/A /* Set the limit privilege set. */ 1N/A/** Drop root privileges: Set the running user id to HAL_USER and 1N/A * group to HAL_GROUP, and optionally retain auxiliary groups of HAL_USER. 1N/A /* determine user id */ 1N/A /* determine primary group id */ 1N/A HAL_DEBUG((
"drop_privileges: could not initialize groups"));