summaryrefslogtreecommitdiff
path: root/openbsd-compat/getgrouplist.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/getgrouplist.c')
-rw-r--r--openbsd-compat/getgrouplist.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/openbsd-compat/getgrouplist.c b/openbsd-compat/getgrouplist.c
index 59c164f44..a57d7d388 100644
--- a/openbsd-compat/getgrouplist.c
+++ b/openbsd-compat/getgrouplist.c
@@ -1,5 +1,4 @@
1/* OPENBSD ORIGINAL: lib/libc/gen/getgrouplist.c */ 1/* $OpenBSD: getgrouplist.c,v 1.12 2005/08/08 08:05:34 espie Exp $ */
2
3/* 2/*
4 * Copyright (c) 1991, 1993 3 * Copyright (c) 1991, 1993
5 * The Regents of the University of California. All rights reserved. 4 * The Regents of the University of California. All rights reserved.
@@ -29,14 +28,12 @@
29 * SUCH DAMAGE. 28 * SUCH DAMAGE.
30 */ 29 */
31 30
31/* OPENBSD ORIGINAL: lib/libc/gen/getgrouplist.c */
32
32#include "includes.h" 33#include "includes.h"
33 34
34#ifndef HAVE_GETGROUPLIST 35#ifndef HAVE_GETGROUPLIST
35 36
36#if defined(LIBC_SCCS) && !defined(lint)
37static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.9 2003/06/25 21:16:47 deraadt Exp $";
38#endif /* LIBC_SCCS and not lint */
39
40/* 37/*
41 * get credential 38 * get credential
42 */ 39 */
@@ -46,14 +43,10 @@ static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.9 2003/06/25 21:16:47 deraad
46#include <grp.h> 43#include <grp.h>
47 44
48int 45int
49getgrouplist(uname, agroup, groups, grpcnt) 46getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt)
50 const char *uname;
51 gid_t agroup;
52 register gid_t *groups;
53 int *grpcnt;
54{ 47{
55 register struct group *grp; 48 struct group *grp;
56 register int i, ngroups; 49 int i, ngroups;
57 int ret, maxgroups; 50 int ret, maxgroups;
58 int bail; 51 int bail;
59 52