--- projects/libstatgrab/examples/user_list.c 2003/11/23 13:51:10 1.4 +++ projects/libstatgrab/examples/user_list.c 2004/01/06 15:35:04 1.5 @@ -43,6 +43,12 @@ int main(int argc, char **argv){ /* Initialise statgrab */ statgrab_init(); + /* Drop setuid/setgid privileges. */ + if (statgrab_drop_privileges() != 0) { + perror("Error. Failed to drop privileges"); + return 1; + } + if( (users = get_user_stats()) != NULL){ printf("Users : %s\n", users->name_list); printf("Number of users : %d\n", users->num_entries);