summaryrefslogtreecommitdiffstats
path: root/src/mod_auth_gssapi.h
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2015-11-30 17:53:42 -0500
committerSimo Sorce <simo@redhat.com>2015-12-03 13:30:09 -0500
commit7f11db955b8440668fc806b4203f584bb44f58c1 (patch)
tree0abe923f6c0e00f5ef838df35ede4589fb2356c2 /src/mod_auth_gssapi.h
parent472d605d916f7ad63cd8bbffa100997eca700da4 (diff)
downloadmod_auth_gssapi-7f11db955b8440668fc806b4203f584bb44f58c1.tar.gz
mod_auth_gssapi-7f11db955b8440668fc806b4203f584bb44f58c1.tar.xz
mod_auth_gssapi-7f11db955b8440668fc806b4203f584bb44f58c1.zip
Add code to set attribute names in the environmentname_attrs
This code allows to specify which attributes in a name are interesting to the application and set them as named environemnt variables. Optionally the whole set of attributes can be exported in a json formatted structure. Signed-off-by: Simo Sorce <simo@redhat.com> Close #62 Close #63
Diffstat (limited to 'src/mod_auth_gssapi.h')
-rw-r--r--src/mod_auth_gssapi.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mod_auth_gssapi.h b/src/mod_auth_gssapi.h
index 5662add..4e9fdf3 100644
--- a/src/mod_auth_gssapi.h
+++ b/src/mod_auth_gssapi.h
@@ -46,6 +46,17 @@
# endif
#endif
+struct mag_na_map {
+ char *env_name;
+ char *attr_name;
+};
+
+struct mag_name_attributes {
+ bool output_json;
+ int map_count;
+ struct mag_na_map map[];
+};
+
struct mag_config {
apr_pool_t *pool;
bool ssl_only;
@@ -63,6 +74,7 @@ struct mag_config {
bool use_basic_auth;
gss_OID_set_desc *allowed_mechs;
gss_OID_set_desc *basic_mechs;
+ struct mag_name_attributes *name_attributes;
};
struct mag_server_config {
@@ -81,6 +93,11 @@ struct mag_req_cfg {
struct seal_key *mag_skey;
};
+struct mag_attr {
+ const char *name;
+ const char *value;
+};
+
struct mag_conn {
apr_pool_t *pool;
gss_ctx_id_t ctx;
@@ -92,6 +109,8 @@ struct mag_conn {
bool delegated;
struct databuf basic_hash;
bool is_preserved;
+ int na_count;
+ struct mag_attr *name_attributes;
};
#define discard_const(ptr) ((void *)((uintptr_t)(ptr)))
@@ -100,3 +119,4 @@ struct mag_conn *mag_new_conn_ctx(apr_pool_t *pool);
const char *mag_str_auth_type(int auth_type);
char *mag_gss_name_to_ccache_name(request_rec *req,
char *dir, const char *gss_name);
+char *mag_error(request_rec *req, const char *msg, uint32_t maj, uint32_t min);