summaryrefslogtreecommitdiffstats
path: root/proxy/src/gp_config.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix two memleaks in the configuration code.Günther Deschner2013-05-151-1/+2
| | | | | Signed-off-by: Günther Deschner <gdeschner@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Don't forget to free gp_ini_context struct in load_config().Günther Deschner2013-05-151-0/+1
| | | | | Signed-off-by: Günther Deschner <gdeschner@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Use counter when freeing cred_store configuration.Günther Deschner2013-05-151-4/+11
| | | | | Signed-off-by: Günther Deschner <gdeschner@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Make error message in read_config() more precise, we fail in that case.Günther Deschner2013-05-151-1/+1
| | | | | Signed-off-by: Günther Deschner <gdeschner@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Make gp_boolean_is_true non-static.Günther Deschner2013-04-261-12/+0
| | | | | Signed-off-by: Günther Deschner <gdeschner@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Rename option_is_set to gp_boolean_is_true.Günther Deschner2013-04-261-4/+4
| | | | | Signed-off-by: Günther Deschner <gdeschner@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Use const string in config functionsSimo Sorce2013-04-231-8/+8
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Günther Deschner <gdeschner@redhat.com>
* Make config functions return actual error codes.Simo Sorce2013-04-231-1/+1
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Günther Deschner <gdeschner@redhat.com>
* Convert gp_config_get_* to return an error.Günther Deschner2013-04-231-51/+88
| | | | | | | ENOENT is returned if no value is available. Signed-off-by: Günther Deschner <gdeschner@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Add support for per-service socketsSimo Sorce2013-04-231-0/+9
| | | | | | | | This way different processes running as the same user can be configured as different servervices Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Günther Deschner <gdeschner@redhat.com>
* Use mutivalued "cred_store" parameter, deprecate unused parameters.Günther Deschner2013-04-231-24/+34
| | | | | | | | | | | | | | | | The krb5_{ccache,keytab,client_keytab} parameters are replaced with a multivalued "cred_store" parameter instead. krb5_keytab = /etc/krb5.keytab becomes: cred_store = keytab:/etc/krb5.keytab Likewise for the "krb5_ccache" and "krb5_client_keytab" parameters. Signed-off-by: Günther Deschner <gdeschner@redhat.com> Signed-off-by: Simo Sorce <simo@redhat.com>
* Add gp_config_get_string_array() and an implementation in dinglibs backend.Günther Deschner2013-04-231-0/+16
| | | | | | | | | | | | | This call returns an allocated array of strings. It allows to return multiple values for a single parameter like: param = value1 param = value2 This cannot be supported with iniparser, so we have to remove iniparser support. Signed-off-by: Günther Deschner <gdeschner@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Fix potential double-frees in load_services().Günther Deschner2013-04-231-6/+5
| | | | | Signed-off-by: Günther Deschner <gdeschner@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Fix memory leak in gp_service_free().Günther Deschner2013-04-111-0/+1
| | | | | Signed-off-by: Günther Deschner <gdeschner@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Add krb5_client_keytab config optionSimo Sorce2013-04-101-0/+8
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Günther Deschner <gdeschner@redhat.com>
* Prefer ini_config library support over iniparser support.Günther Deschner2013-04-081-4/+0
| | | | | | | Abort if none of these libraries are found. Signed-off-by: Günther Deschner <gdeschner@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Add dinglibs ini configuration detection and backend.Günther Deschner2013-04-081-0/+41
| | | | | Signed-off-by: Günther Deschner <gdeschner@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Abstract configuration layer for gssproxy.Günther Deschner2013-04-081-57/+98
| | | | | Signed-off-by: Günther Deschner <gdeschner@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Add missing newlines to GPDEBUG statements.Günther Deschner2013-04-081-7/+7
| | | | | Signed-off-by: Günther Deschner <gdeschner@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Remove unused variablesSimo Sorce2013-04-031-2/+0
| | | | Signed-off-by: Simo Sorce <simo@redhat.com>
* Fix resource leaks found by CoveritySimo Sorce2013-04-031-3/+5
| | | | Signed-off-by: Simo Sorce <simo@redhat.com>
* Make socket path a configure optionSimo Sorce2013-03-221-18/+12
| | | | | | | The kernel uses the fixed path named /var/run/gssproxy.sock Make this default a configure time option and default to it. Also remove the option to change the socket at configure time, neither the kernel nor proxymech.so can cope with a change anyway.
* Enable kernel support.Simo Sorce2013-03-221-0/+7
| | | | | | | | The Linux kernel now requires the gss-proxy to signal when it is available. This is done by writing 1 to the file /proc/net/rpc/use-gss-proxy Once this happens the kernel will try to attach to the gss-proxy socket and use it instead of the classic rpc.svcgssd daemon.
* Use new gss_import/export_cred functionsSimo Sorce2012-10-251-79/+8
| | | | | | | This allows us to remove the ring_buffer hack and become completely stateless as well as remove a possible DoS avenue. R.I.P. Ring Buffer :-)
* Add free_config() and call it when server shuts down.Günther Deschner2012-06-251-0/+24
| | | | | | Guenther Signed-off-by: Simo Sorce <simo@redhat.com>
* Allow to set per service ring buffer, with configurable size.Günther Deschner2012-06-251-0/+45
| | | | | | Guenther Signed-off-by: Simo Sorce <simo@redhat.com>
* Set pointer to one of the existing ring buffers in service loading.Günther Deschner2012-06-251-0/+8
| | | | | | Guenther Signed-off-by: Simo Sorce <simo@redhat.com>
* Add gp_service_get_ring_buffer to retrieve buffer from a service.Günther Deschner2012-06-251-0/+4
| | | | | | Guenther Signed-off-by: Simo Sorce <simo@redhat.com>
* Add two ring_buffers to gp_config struct.Günther Deschner2012-06-251-0/+31
| | | | | | Guenther Signed-off-by: Simo Sorce <simo@redhat.com>
* Fix option_is_set() function.Günther Deschner2012-06-211-1/+1
| | | | Guenther
* use option_is_set() config parser helper.Günther Deschner2012-05-311-7/+2
| | | | | | Guenther Signed-off-by: Simo Sorce <simo@redhat.com>
* add option_is_set() helper function for config parsing.Günther Deschner2012-05-311-0/+12
| | | | | | Guenther Signed-off-by: Simo Sorce <simo@redhat.com>
* Replace direct syslog calls with logging macrosSimo Sorce2012-04-151-14/+8
|
* config: Rework configuration syntaxSimo Sorce2012-04-051-119/+71
| | | | | | | 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.
* Debug: Add debugging macro and config optionsSimo Sorce2012-04-021-0/+9
| | | | Ticket #43
* config: parse credential/service config sectionsSimo Sorce2012-02-231-0/+243
|
* Split gp_utils.h into proxy headers and commonly useful headersSimo Sorce2012-01-291-1/+1
|
* Add worker threadsSimo Sorce2012-01-171-0/+2
|
* Add gssproxy_ctxSimo Sorce2012-01-171-4/+6
| | | | And store configuration context within it.
* Add utils to read a configuration fileSimo Sorce2012-01-141-0/+109