From 921b13a1c454aabc5dec6e7f33f7ae3ffa80febf Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Thu, 19 Nov 2009 17:53:38 +0100 Subject: Read KDC info from file instead from environment Then name or IP adress of the KDC is written into the pubconf directory into a file named kdcinfo.REALM. The locator plugin will then read this file and pass the data to the kerberos libraries. --- server/providers/krb5/krb5_common.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'server/providers/krb5/krb5_common.h') diff --git a/server/providers/krb5/krb5_common.h b/server/providers/krb5/krb5_common.h index 42b003735..832ffcdd5 100644 --- a/server/providers/krb5/krb5_common.h +++ b/server/providers/krb5/krb5_common.h @@ -37,6 +37,8 @@ #define SSSD_KRB5_REALM "SSSD_KRB5_REALM" #define SSSD_KRB5_CHANGEPW_PRINCIPLE "SSSD_KRB5_CHANGEPW_PRINCIPLE" +#define KDCINFO_TMPL PUBCONF_PATH"/kdcinfo.%s" + enum krb5_opts { KRB5_KDC = 0, KRB5_REALM, @@ -50,8 +52,10 @@ enum krb5_opts { KRB5_OPTS }; -struct krb_server { +struct krb5_service { + char *name; char *address; + char *realm; }; errno_t check_and_export_options(struct dp_option *opts, @@ -59,4 +63,10 @@ errno_t check_and_export_options(struct dp_option *opts, errno_t krb5_get_options(TALLOC_CTX *memctx, struct confdb_ctx *cdb, const char *conf_path, struct dp_option **_opts); + +errno_t write_kdcinfo_file(const char *realm, const char *kdc); + +int krb5_service_init(TALLOC_CTX *memctx, struct be_ctx *ctx, + const char *service_name, const char *servers, + const char *realm, struct krb5_service **_service); #endif /* __KRB5_COMMON_H__ */ -- cgit