16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose/*
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose SSSD
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose Simple access control
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose Copyright (C) Sumit Bose <sbose@redhat.com> 2010
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose This program is free software; you can redistribute it and/or modify
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose it under the terms of the GNU General Public License as published by
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose the Free Software Foundation; either version 3 of the License, or
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose (at your option) any later version.
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose This program is distributed in the hope that it will be useful,
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose but WITHOUT ANY WARRANTY; without even the implied warranty of
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose GNU General Public License for more details.
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose You should have received a copy of the GNU General Public License
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose along with this program. If not, see <http://www.gnu.org/licenses/>.
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose*/
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose#ifndef __SIMPLE_ACCESS_H__
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose#define __SIMPLE_ACCESS_H__
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose#include "util/util.h"
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bosestruct simple_ctx {
1b474ef7011f4bf9ce4aac85dbc9827a9486d5ebStephen Gallagher struct sss_domain_info *domain;
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek struct be_ctx *be_ctx;
1b474ef7011f4bf9ce4aac85dbc9827a9486d5ebStephen Gallagher
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose char **allow_users;
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose char **deny_users;
1b474ef7011f4bf9ce4aac85dbc9827a9486d5ebStephen Gallagher char **allow_groups;
1b474ef7011f4bf9ce4aac85dbc9827a9486d5ebStephen Gallagher char **deny_groups;
a620742bffad5ef92597b6a25401f6d5c217afa9Pavel Reichl
a620742bffad5ef92597b6a25401f6d5c217afa9Pavel Reichl time_t last_refresh_of_filter_lists;
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose};
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozekstruct tevent_req *simple_access_check_send(TALLOC_CTX *mem_ctx,
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek struct tevent_context *ev,
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek struct simple_ctx *ctx,
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek const char *username);
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozekerrno_t simple_access_check_recv(struct tevent_req *req,
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek bool *access_granted);
c0bca1722d6f9dfb654ad78397be70f79ff39af1Jakub Hrozek
16ac0d6e148b1e07e579d47de1da7ac541447bd2Sumit Bose#endif /* __SIMPLE_ACCESS_H__ */