Browse Source

Fix warnings

master
Stefan Bühler 13 years ago
parent
commit
b471b98d5c
  1. 2
      README
  2. 11
      execwrap.c

2
README

@ -106,7 +106,7 @@ ENV_NON_RESIDENT The same as ENV_UID, but controls the name of the NON_RESI
There is no Makefile right now, but compile is as simple as:
> gcc -O2 -o execwrap execwrap.c && strip execwrap
> gcc -W -Wall -O2 -o execwrap execwrap.c && strip execwrap
Or similar, depending on taste. You need something other than an ancient compiler to make
it work, preferably C99. To install, make sure the file is owned by the super user and has

11
execwrap.c

@ -123,7 +123,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <unistd.h>
#include <signal.h>
#include <pwd.h>
#include <sys/types.h>
#include <grp.h>
/* The global child PID and previous SIGTERM handler. */
int pid;
@ -176,16 +177,14 @@ int main(int argc, char* argv[], char* envp[])
}
/* Grab stuff from environment, and set defaults. */
int uid = DEFAULT_UID;
int gid = DEFAULT_GID;
uid_t uid = DEFAULT_UID;
gid_t gid = DEFAULT_GID;
char* target = 0;
char* args = 0;
char check_gid = 0;
char non_resident = 0;
char** p = envp;
char* s;
char* t;
while(s = *p++)
while(NULL != (s = *p++))
{
/* Target UID. */

Loading…
Cancel
Save