ipa_sudo.h revision 43bbf5b158ec3152806791ca49ae224ee978de24
/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2015 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _IPA_SUDO_H_
#define _IPA_SUDO_H_
#include "providers/ipa/ipa_common.h"
struct ipa_sudo_ctx {
struct sdap_id_ctx *id_ctx;
struct ipa_options *ipa_opts;
struct sdap_options *sdap_opts;
bool full_refresh_done;
/* sudo */
struct sdap_attr_map *sudocmdgroup_map;
struct sdap_attr_map *sudorule_map;
struct sdap_attr_map *sudocmd_map;
struct sdap_search_base **sudo_sb;
};
struct tevent_req *
struct tevent_context *ev,
struct ipa_sudo_ctx *sudo_ctx);
int
int *dp_error);
int
int *dp_error,
bool *deleted);
struct tevent_req *
struct tevent_context *ev,
struct ipa_sudo_ctx *sudo_ctx,
const char *cmdgroups_filter,
const char *search_filter,
const char *delete_filter);
struct tevent_req *
struct tevent_context *ev,
struct ipa_sudo_ctx *sudo_ctx,
char **rules);
int *dp_error,
size_t *_num_rules);
struct ipa_sudo_conv;
struct ipa_sudo_conv *
struct sdap_attr_map *map_rule,
struct sdap_attr_map *map_cmdgroup,
struct sdap_attr_map *map_cmd,
struct sdap_attr_map *map_user,
struct sdap_attr_map *map_group,
struct sdap_attr_map *map_host,
struct sdap_attr_map *map_hostgroup);
struct sysdb_attrs **rules,
struct sysdb_attrs **cmdgroups,
struct sysdb_attrs **cmds,
bool
bool
char *
struct ipa_sudo_conv *conv);
char *
struct ipa_sudo_conv *conv);
struct ipa_sudo_conv *conv,
struct sysdb_attrs ***_rules,
size_t *_num_rules);
#endif /* _IPA_SUDO_H_ */