1 /* 2 Unix SMB/CIFS implementation. 3 4 Winbind client API 5 6 Copyright (C) Gerald (Jerry) Carter 2007 7 8 This library is free software; you can redistribute it and/or 9 modify it under the terms of the GNU Lesser General Public 10 License as published by the Free Software Foundation; either 11 version 3 of the License, or (at your option) any later version. 12 13 This library is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 Library General Public License for more details. 17 18 You should have received a copy of the GNU Lesser General Public License 19 along with this program. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #ifndef _WBCLIENT_INTERNAL_H 23 #define _WBCLIENT_INTERNAL_H 24 25 struct wbcContext { 26 struct winbindd_context *winbindd_ctx; 27 uint32_t pw_cache_size; /* Number of cached passwd structs */ 28 uint32_t pw_cache_idx; /* Position of the pwent context */ 29 uint32_t gr_cache_size; /* Number of cached group structs */ 30 uint32_t gr_cache_idx; /* Position of the grent context */ 31 }; 32 33 /* Private functions */ 34 35 wbcErr wbcRequestResponse(struct wbcContext *ctx, int cmd, 36 struct winbindd_request *request, 37 struct winbindd_response *response); 38 39 wbcErr wbcRequestResponsePriv(struct wbcContext *ctx, int cmd, 40 struct winbindd_request *request, 41 struct winbindd_response *response); 42 43 void *wbcAllocateMemory(size_t nelem, size_t elsize, 44 void (*destructor)(void *ptr)); 45 46 char *wbcStrDup(const char *str); 47 const char **wbcAllocateStringArray(int num_strings); 48 struct wbcContext *wbcGetGlobalCtx(void); 49 50 #endif /* _WBCLIENT_INTERNAL_H */ 51