sudosrv_private.h revision e5b34f0166ae61468e53f369578e691ddb09cdd0
/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2011 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 _SUDOSRV_PRIVATE_H_
#define _SUDOSRV_PRIVATE_H_
#include <stdint.h>
#include <talloc.h>
#include "responder/common/responder.h"
#define SSS_SUDO_ERROR_OK 0
#define SSS_SUDO_SBUS_SERVICE_VERSION 0x0001
#define SSS_SUDO_SBUS_SERVICE_NAME "sudo"
enum sss_dp_sudo_type {
};
enum sss_sudo_type {
};
struct sudo_ctx {
/*
* options
*/
bool timed;
};
struct sudo_cmd_ctx {
enum sss_sudo_type type;
/* input data */
char *username;
const char *orig_username;
const char *cased_username;
struct sss_domain_info *domain;
bool check_next;
/* output data */
struct sysdb_attrs **rules;
};
struct sudo_dom_ctx {
struct sudo_cmd_ctx *cmd_ctx;
struct sss_domain_info *domain;
bool check_provider;
};
struct sudo_dp_request {
struct sss_domain_info *domain;
};
struct sss_cmd_table *get_sudo_cmds(void);
char **_username,
struct sss_domain_info **_domain);
const char *domain,
int rules_num,
struct sysdb_attrs **rules,
struct tevent_req *
struct sss_domain_info *dom,
bool fast_reply,
enum sss_dp_sudo_type type,
const char *name,
struct sysdb_attrs **rules);
struct tevent_req *req,
char **err_msg);
#endif /* _SUDOSRV_PRIVATE_H_ */