groupaccess.h (76259) | groupaccess.h (92555) |
---|---|
1/* $OpenBSD: groupaccess.h,v 1.2 2001/01/29 01:58:15 niklas Exp $ */ | 1/* $OpenBSD: groupaccess.h,v 1.4 2001/06/26 17:27:23 markus Exp $ */ |
2 3/* 4 * Copyright (c) 2001 Kevin Steves. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#ifndef GROUPACCESS_H 28#define GROUPACCESS_H 29 30#include <grp.h> 31 | 2 3/* 4 * Copyright (c) 2001 Kevin Steves. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#ifndef GROUPACCESS_H 28#define GROUPACCESS_H 29 30#include <grp.h> 31 |
32/* 33 * Initialize group access list for user with primary (base) and 34 * supplementary groups. Return the number of groups in the list. 35 */ 36int ga_init(const char *user, gid_t base); | 32int ga_init(const char *, gid_t); 33int ga_match(char * const *, int); 34void ga_free(void); |
37 | 35 |
38/* 39 * Return 1 if one of user's groups is contained in groups. 40 * Return 0 otherwise. Use match_pattern() for string comparison. 41 */ 42int ga_match(char * const *groups, int ngroups); 43 44/* 45 * Free memory allocated for group access list. 46 */ 47void ga_free(void); 48 | |
49#endif | 36#endif |