--- projects/libstatgrab/src/statgrab/statgrab.c 2003/11/10 23:35:43 1.13 +++ projects/libstatgrab/src/statgrab/statgrab.c 2004/01/19 16:49:23 1.17 @@ -1,7 +1,7 @@ /* * i-scream central monitoring system * http://www.i-scream.org - * Copyright (C) 2000-2003 i-scream + * Copyright (C) 2000-2004 i-scream * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -16,6 +16,8 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id: statgrab.c,v 1.17 2004/01/19 16:49:23 tdb Exp $ */ #ifdef HAVE_CONFIG_H @@ -608,10 +610,8 @@ int main(int argc, char **argv) { /* We don't care if statgrab_init fails, because we can just display the statistics that can be read as non-root. */ statgrab_init(); -#ifdef ALLBSD - if (setegid(getgid()) != 0) - die("Failed to lose effective group"); -#endif + if (statgrab_drop_privileges() != 0) + die("Failed to drop setuid/setgid privileges"); switch (repeat_mode) { case REPEAT_NONE: