Index: xbase-clients/xload/xload.c =================================================================== --- xbase-clients.orig/xload/xload.c 2006-06-30 01:08:01.000000000 -0400 +++ xbase-clients/xload/xload.c 2006-06-30 01:08:51.000000000 -0400 @@ -35,6 +35,7 @@ */ +#include #include #include #include @@ -162,8 +163,17 @@ /* 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);