Use setuid(geteuid()) rather than setruid(geteuid()); seems tto be the
authorGarrett Wollman <wollman@FreeBSD.org>
Mon, 4 Apr 1994 19:49:12 +0000 (19:49 +0000)
committerGarrett Wollman <wollman@FreeBSD.org>
Mon, 4 Apr 1994 19:49:12 +0000 (19:49 +0000)
right thing to do, as this program never un-renounces.

games/sail/dr_main.c

index c6e4968..7fe24f1 100644 (file)
@@ -48,7 +48,7 @@ dr_main()
        (void) signal(SIGQUIT, SIG_IGN);
        (void) signal(SIGTSTP, SIG_IGN);
        if (issetuid)
        (void) signal(SIGQUIT, SIG_IGN);
        (void) signal(SIGTSTP, SIG_IGN);
        if (issetuid)
-               (void) setruid(geteuid());
+               (void) setuid(geteuid());
        if (game < 0 || game >= NSCENE) {
                fprintf(stderr, "DRIVER: Bad game number %d\n", game);
                exit(1);
        if (game < 0 || game >= NSCENE) {
                fprintf(stderr, "DRIVER: Bad game number %d\n", game);
                exit(1);