s3:netapi: Remove unused variables
[samba.git] / source3 / lib / namemap_cache.h
1 /*
2  * Unix SMB/CIFS implementation.
3  * Utils for caching sid2name and name2sid
4  * Copyright (C) Volker Lendecke 2017
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; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18  */
19
20 #ifndef __LIB_NAMEMAP_CACHE_H__
21 #define __LIB_NAMEMAP_CACHE_H__
22
23 #include "lib/util/time.h"
24 #include "lib/util/data_blob.h"
25 #include "librpc/gen_ndr/lsa.h"
26
27 bool namemap_cache_set_sid2name(const struct dom_sid *sid,
28                                 const char *domain, const char *name,
29                                 enum lsa_SidType type, time_t timeout);
30 bool namemap_cache_set_name2sid(const char *domain, const char *name,
31                                 const struct dom_sid *sid,
32                                 enum lsa_SidType type,
33                                 time_t timeout);
34 bool namemap_cache_find_sid(const struct dom_sid *sid,
35                             void (*fn)(const char *domain,
36                                        const char *name,
37                                        enum lsa_SidType type,
38                                        bool expired,
39                                        void *private_data),
40                             void *private_data);
41 bool namemap_cache_find_name(const char *domain,
42                              const char *name,
43                              void (*fn)(const struct dom_sid *sid,
44                                         enum lsa_SidType type,
45                                         bool expired,
46                                         void *private_data),
47                              void *private_data);
48
49 #endif