1 /* 2 * Copyright (C) 2021 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o. 3 * 4 * This file is part of MooseFS. 5 * 6 * MooseFS is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, version 2 (only). 9 * 10 * MooseFS is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with MooseFS; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA 18 * or visit http://www.gnu.org/licenses/gpl-2.0.html 19 */ 20 21 #ifndef _GETGROUPS_H_ 22 #define _GETGROUPS_H_ 23 24 #include <sys/types.h> 25 #include <inttypes.h> 26 27 typedef struct groups { 28 double time; 29 pid_t pid; 30 uid_t uid; 31 gid_t gid; 32 uint16_t lcnt; 33 uint8_t locked; 34 uint32_t gidcnt; 35 uint32_t *gidtab; 36 struct groups *next,**prev; 37 } groups; 38 39 groups* groups_get_x(pid_t pid,uid_t uid,gid_t gid,uint8_t lockmode); 40 #define groups_get(p,u,g) groups_get_x(p,u,g,0) 41 void groups_rel(groups* g); 42 void groups_term(void); 43 void groups_init(double _to,int dm); 44 45 #endif 46