diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 1998-03-19 11:41:57 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 1998-03-19 11:41:57 +0000 |
commit | 3b3a923b80f6d275f30505d7745faaac7ddb6a1d (patch) | |
tree | 52b127c10afee8555a5dfaf78ff73712d7104b8c | |
parent | 4d7669b40d9f9abcc2aaa60ab11c06aa405f9c28 (diff) |
Minor tweaks, mainly setgid-related
-rw-r--r-- | games/adventure/main.c | 3 | ||||
-rw-r--r-- | games/grdc/grdc.c | 6 | ||||
-rw-r--r-- | games/mille/Makefile | 6 | ||||
-rw-r--r-- | games/trek/main.c | 3 | ||||
-rw-r--r-- | games/trek/trek.6 | 2 |
5 files changed, 12 insertions, 8 deletions
diff --git a/games/adventure/main.c b/games/adventure/main.c index ca72b7530d8..7fd7d1e3aee 100644 --- a/games/adventure/main.c +++ b/games/adventure/main.c @@ -68,8 +68,9 @@ char **argv; struct text *kk; extern trapdel(); - egid = getegid(); + /* revoke privs */ setegid(getgid()); + setgid(getgid()); init(); /* Initialize everything */ signal(SIGINT,trapdel); diff --git a/games/grdc/grdc.c b/games/grdc/grdc.c index 7add02e5b4b..4106db0770e 100644 --- a/games/grdc/grdc.c +++ b/games/grdc/grdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grdc.c,v 1.4 1997/07/31 19:09:34 deraadt Exp $ */ +/* $OpenBSD: grdc.c,v 1.5 1998/03/19 11:41:51 pjanzen Exp $ */ /* * Grand digital clock for curses compatible terminals * Usage: grdc [-s] [n] -- run for n seconds (default infinity) @@ -56,12 +56,12 @@ main(argc, argv) int i, j, s, k; int n = 0; - initscr(); - /* revoke privs */ setegid(getgid()); setgid(getgid()); + initscr(); + signal(SIGINT,sighndl); signal(SIGTERM,sighndl); signal(SIGHUP,sighndl); diff --git a/games/mille/Makefile b/games/mille/Makefile index bf9940c5eb7..9f7c33abc57 100644 --- a/games/mille/Makefile +++ b/games/mille/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.3 1997/09/21 11:36:17 deraadt Exp $ +# $OpenBSD: Makefile,v 1.4 1998/03/19 11:41:53 pjanzen Exp $ PROG= mille SRCS= comp.c end.c extern.c init.c mille.c misc.c move.c print.c \ roll.c save.c types.c varpush.c -DPADD= ${LIBCURSES} ${LIBTERMLIB} ${LIBCOMPAT} -LDADD= -lcurses -ltermlib -lcompat +DPADD= ${LIBCURSES} ${LIBTERMLIB} +LDADD= -lcurses -ltermlib MAN= mille.6 HIDEGAME=hidegame diff --git a/games/trek/main.c b/games/trek/main.c index 236ce99aa40..d173430fe6e 100644 --- a/games/trek/main.c +++ b/games/trek/main.c @@ -155,6 +155,7 @@ int Mother = 51 + (51 << 8); jmp_buf env; +int main(argc, argv) int argc; char **argv; @@ -167,6 +168,8 @@ char **argv; register char **av; struct termios argp; + /* revoke privs */ + setegid(getgid()); setgid(getgid()); av = argv; diff --git a/games/trek/trek.6 b/games/trek/trek.6 index a23eb2d8b3a..e0dc5a63631 100644 --- a/games/trek/trek.6 +++ b/games/trek/trek.6 @@ -81,7 +81,7 @@ the game will tell you what it expects if you just type in a question mark. .Sh AUTHOR Eric Allman .Sh "SEE ALSO" -.Pa /usr/doc/trek +.Pa /usr/share/doc/usd/31.trek/trek.me .Sh COMMAND SUMMARY .Bl -item -compact .It |