From cfbd12afad3fb232cbc214e1c47c2bf202ec5003 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 26 Feb 2012 16:40:47 -0500 Subject: config: Rework configuration syntax Keeping 2 separate sections for credentials and services seem to just make things really confusing. The off chance of reusing a 'credential' section is dwarfed by the confusion cause by keeping them separate. Having to copy a full service section is not a big deal so KISS wins here. --- proxy/src/gp_proxy.h | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) (limited to 'proxy/src/gp_proxy.h') diff --git a/proxy/src/gp_proxy.h b/proxy/src/gp_proxy.h index bd3d181..cebde03 100644 --- a/proxy/src/gp_proxy.h +++ b/proxy/src/gp_proxy.h @@ -34,32 +34,21 @@ #define _(STRING) gettext(STRING) +#define GP_CRED_KRB5 0x01 + struct gp_cred_krb5 { + char *principal; char *keytab; char *ccache; }; -struct gp_credcfg { - char *name; - - enum { - GP_CRED_NONE = 0, - GP_CRED_KRB5, - } mech; - - union { - struct gp_cred_krb5 krb5; - } cred; -}; - struct gp_service { char *name; - uid_t euid; - gid_t egid; + bool trusted; - struct gp_credcfg **creds; - int num_creds; + uint32_t mechs; + struct gp_cred_krb5 krb5; }; struct gp_config { @@ -68,9 +57,6 @@ struct gp_config { char *socket_name; /* the socket name to use for */ int num_workers; /* number of worker threads */ - struct gp_credcfg **creds; - int num_creds; - struct gp_service **svcs; int num_svcs; }; -- cgit