]> granicus.if.org Git - sudo/blob - plugins/sudoers/sudo_ldap.h
Add SPDX-License-Identifier to files.
[sudo] / plugins / sudoers / sudo_ldap.h
1 /*
2  * SPDX-License-Identifier: ISC
3  *
4  * Copyright (c) 2018 Todd C. Miller <Todd.Miller@sudo.ws>
5  *
6  * Permission to use, copy, modify, and distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  */
18
19 #ifndef SUDOERS_LDAP_H
20 #define SUDOERS_LDAP_H
21
22 /* Iterators used by sudo_ldap_role_to_priv() to handle bervar ** or char ** */
23 typedef char * (*sudo_ldap_iter_t)(void **);
24
25 /* ldap_util.c */
26 bool sudo_ldap_is_negated(char **valp);
27 bool sudo_ldap_add_default(const char *var, const char *val, int op, char *source, struct defaults_list *defs);
28 int sudo_ldap_parse_option(char *optstr, char **varp, char **valp);
29 struct privilege *sudo_ldap_role_to_priv(const char *cn, void *hosts, void *runasusers, void *runasgroups, void *cmnds, void *opts, const char *notbefore, const char *notafter, bool warnings, bool store_options, sudo_ldap_iter_t iter);
30 struct command_digest *sudo_ldap_extract_digest(char **cmnd, struct command_digest *digest);
31
32 #endif /* SUDOERS_LDAP_H */