xload 1.0.2
This commit is contained in:
parent
59ec33559d
commit
9c3899b537
@ -1,3 +1,13 @@
|
||||
2007-03-21 Jeremy C. Reed <reed@reedmedia.net>
|
||||
|
||||
* configure.ac
|
||||
Update version for another release.
|
||||
|
||||
2006-06-20 Matthieu Herrb <matthieu.herrb@laas.fr>
|
||||
|
||||
* xload.c:
|
||||
Check setuid() return value. Bugzilla #7116.
|
||||
|
||||
2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org>
|
||||
|
||||
* configure.ac:
|
||||
|
@ -22,7 +22,7 @@ dnl
|
||||
dnl Process this file with autoconf to create configure.
|
||||
|
||||
AC_PREREQ([2.57])
|
||||
AC_INIT(xload,[1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xload)
|
||||
AC_INIT(xload,[1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xload)
|
||||
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
|
@ -34,7 +34,7 @@ from the X Consortium.
|
||||
* xload - display system load average in a window
|
||||
*/
|
||||
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
@ -162,8 +162,17 @@ main(int argc, char **argv)
|
||||
/* For security reasons, we reset our uid/gid after doing the necessary
|
||||
system initialization and before calling any X routines. */
|
||||
InitLoadPoint();
|
||||
setgid(getgid()); /* reset gid first while still (maybe) root */
|
||||
setuid(getuid());
|
||||
/* reset gid first while still (maybe) root */
|
||||
if (setgid(getgid()) == -1) {
|
||||
fprintf(stderr, "%s: setgid failed: %s\n",
|
||||
ProgramName, strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
if (setuid(getuid()) == -1) {
|
||||
fprintf(stderr, "%s: setuid failed: %s\n",
|
||||
ProgramName, strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user