summaryrefslogtreecommitdiffstats
path: root/src/responder/sudo/sudosrv_private.h
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2012-04-13 09:58:42 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-06-29 11:37:16 -0400
commitb0abb3bfdfd95951a23c9fc223c735805ffd2969 (patch)
treecd9cf6073afdb51461d9f84bca8e4dd9cc570b42 /src/responder/sudo/sudosrv_private.h
parent710472d946f6c337a095699dfd79134fa8b9eab9 (diff)
downloadsssd-b0abb3bfdfd95951a23c9fc223c735805ffd2969.tar.gz
sssd-b0abb3bfdfd95951a23c9fc223c735805ffd2969.tar.xz
sssd-b0abb3bfdfd95951a23c9fc223c735805ffd2969.zip
sudo responder: get rid of dctx where possible
Diffstat (limited to 'src/responder/sudo/sudosrv_private.h')
-rw-r--r--src/responder/sudo/sudosrv_private.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/responder/sudo/sudosrv_private.h b/src/responder/sudo/sudosrv_private.h
index 03cc0a48c..9c17c59dd 100644
--- a/src/responder/sudo/sudosrv_private.h
+++ b/src/responder/sudo/sudosrv_private.h
@@ -23,6 +23,7 @@
#include <stdint.h>
#include <talloc.h>
+#include <sys/types.h>
#include "src/db/sysdb.h"
#include "responder/common/responder.h"
@@ -57,20 +58,23 @@ struct sudo_cmd_ctx {
struct cli_ctx *cli_ctx;
struct sudo_ctx *sudo_ctx;
enum sss_dp_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;
+ size_t num_rules;
};
struct sudo_dom_ctx {
struct sudo_cmd_ctx *cmd_ctx;
struct sss_domain_info *domain;
bool check_provider;
- const char *orig_username;
- const char *cased_username;
-
- /* cache results */
- struct sysdb_attrs **res;
- size_t res_count;
};
struct sudo_dp_request {
@@ -80,11 +84,11 @@ struct sudo_dp_request {
struct sss_cmd_table *get_sudo_cmds(void);
-errno_t sudosrv_cmd_done(struct sudo_dom_ctx *dctx, int ret);
+errno_t sudosrv_cmd_done(struct sudo_cmd_ctx *cmd_ctx, int ret);
errno_t sudosrv_get_sudorules(struct sudo_dom_ctx *dctx);
-errno_t sudosrv_get_rules(struct sudo_dom_ctx *dctx);
+errno_t sudosrv_get_rules(struct sudo_cmd_ctx *cmd_ctx);
errno_t sudosrv_parse_query(TALLOC_CTX *mem_ctx,
struct resp_ctx *rctx,