diff options
author | 1998-07-06 18:42:46 +0000 | |
---|---|---|
committer | 1998-07-06 18:42:46 +0000 | |
commit | bb488c017fd0101fac6eb75d1ee10b6fd891829e (patch) | |
tree | f36a65538c1241590963cb0b9e946a5d46cc1a7c | |
parent | kill non-POSIX S_IWRITE (diff) | |
download | wireguard-openbsd-bb488c017fd0101fac6eb75d1ee10b6fd891829e.tar.xz wireguard-openbsd-bb488c017fd0101fac6eb75d1ee10b6fd891829e.zip |
revoke privs after open
-rw-r--r-- | usr.bin/modstat/modstat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/modstat/modstat.c b/usr.bin/modstat/modstat.c index e4193613fb4..0f76a0de171 100644 --- a/usr.bin/modstat/modstat.c +++ b/usr.bin/modstat/modstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: modstat.c,v 1.10 1997/11/18 23:23:18 provos Exp $ */ +/* $OpenBSD: modstat.c,v 1.11 1998/07/06 18:42:46 deraadt Exp $ */ /* * Copyright (c) 1993 Terrence R. Lambert. @@ -161,6 +161,9 @@ main(argc, argv) if ((devfd = open(_PATH_LKM, O_RDONLY, 0)) == -1) err(2, _PATH_LKM); + setegid(getgid()); + setgid(getgid()); + atexit(cleanup); printf("Type Id Off Loadaddr Size Info Rev Module Name\n"); |