--- projects/libstatgrab/docs/libstatgrab/statgrab.xml 2003/10/21 15:48:55 1.2 +++ projects/libstatgrab/docs/libstatgrab/statgrab.xml 2004/01/05 17:20:29 1.3 @@ -6,8 +6,8 @@ - $Date: 2003/10/21 15:48:55 $ - $Id: statgrab.xml,v 1.2 2003/10/21 15:48:55 pajs Exp $ + $Date: 2004/01/05 17:20:29 $ + $Id: statgrab.xml,v 1.3 2004/01/05 17:20:29 ats Exp $ @@ -29,6 +29,10 @@ int statgrab_init + + int statgrab_drop_privileges + + cpu_percent_t *cpu_percent_usage @@ -117,10 +121,15 @@ leaves them open for future use. Because of this, any special privileges the program has (e.g. setgid kmem) can be dropped after this call, and all the libstatgrab calls should continue to - work. + work. It is therefore a good idea to call + statgrab_drop_privileges, which discards + setuid and setgid privileges, immediately after you call + statgrab_init, unless your application has + another reason for needing setuid or setgid privileges. - statgrab_init returns 0 on success, and + statgrab_init and + statgrab_drop_privileges return 0 on success, and non-zero on failure.