summaryrefslogtreecommitdiff
path: root/usr.sbin/kvm_mkdb
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2016-04-25 16:03:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2016-04-25 16:03:58 +0000
commit20776bf409d698a7bc2703600c208e4d42146a63 (patch)
tree2ae8489b7456917887c548988d541df5113ab883 /usr.sbin/kvm_mkdb
parent7cd27a5c571f5d757dda9208176cf08095de1fe3 (diff)
use setresgid() rather than setegid, all 3 gids can go the same way.
discussion with millert
Diffstat (limited to 'usr.sbin/kvm_mkdb')
-rw-r--r--usr.sbin/kvm_mkdb/kvm_mkdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/kvm_mkdb/kvm_mkdb.c b/usr.sbin/kvm_mkdb/kvm_mkdb.c
index 571030c6788..5f50a62c09c 100644
--- a/usr.sbin/kvm_mkdb/kvm_mkdb.c
+++ b/usr.sbin/kvm_mkdb/kvm_mkdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kvm_mkdb.c,v 1.27 2015/11/23 21:06:14 deraadt Exp $ */
+/* $OpenBSD: kvm_mkdb.c,v 1.28 2016/04/25 16:03:57 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -78,7 +78,7 @@ main(int argc, char *argv[])
warn("can't find kmem group");
} else {
kvm_gid = gr->gr_gid;
- if (setegid(kvm_gid) == -1)
+ if (setresgid(kvm_gid, kvm_gid, kvm_gid) == -1)
err(1, "setegid");
}