1 #ifndef AUTH_PAM_GROUPS_INCLUDED 2 #define AUTH_PAM_GROUPS_INCLUDED 3 /* 4 (C) 2013 Percona LLC and/or its affiliates 5 6 This program 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 of the License. 9 10 This program 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 this program; if not, write to the Free Software 17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 18 */ 19 20 /** 21 @file 22 23 PAM authentication for MySQL, interface for groups enumeration. 24 25 */ 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif 30 31 struct groups_iter; 32 33 /** Create iterator through user groups. 34 Initially iterator set to position before first 35 group. On success non-NULL pointer returned, otherwise NULL */ 36 struct groups_iter *groups_iter_new(const char *user_name); 37 38 /** Move iterator to next group. 39 On success group name is returned, 40 otherwise NULL */ 41 const char *groups_iter_next(struct groups_iter *it); 42 43 /** Make iterator to point to beginning again */ 44 void groups_iter_reset(struct groups_iter *it); 45 46 /** Finish iteration and release iterator */ 47 void groups_iter_free(struct groups_iter *it); 48 49 #ifdef __cplusplus 50 } 51 #endif 52 53 #endif 54