diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-04-25 16:03:58 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-04-25 16:03:58 +0000 |
commit | 20776bf409d698a7bc2703600c208e4d42146a63 (patch) | |
tree | 2ae8489b7456917887c548988d541df5113ab883 /usr.sbin/kvm_mkdb | |
parent | 7cd27a5c571f5d757dda9208176cf08095de1fe3 (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.c | 4 |
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"); } |