[dovecot-cvs] dovecot/src/auth auth.c, 1.33, 1.34 auth.h, 1.23, 1.24 mech-gssapi.c, 1.11, 1.12

tss at dovecot.org tss at dovecot.org
Wed Mar 28 00:42:05 EEST 2007


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv1099/src/auth

Modified Files:
	auth.c auth.h mech-gssapi.c 
Log Message:
Added auth_gssapi_hostname setting.



Index: auth.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- auth.c	19 Jan 2007 15:19:32 -0000	1.33
+++ auth.c	27 Mar 2007 21:42:00 -0000	1.34
@@ -4,6 +4,7 @@
 #include "network.h"
 #include "buffer.h"
 #include "str.h"
+#include "hostpid.h"
 #include "mech.h"
 #include "userdb.h"
 #include "passdb.h"
@@ -262,6 +263,12 @@
 	if (env != NULL && *env != '\0')
 		auth->username_format = env;
 
+	env = getenv("GSSAPI_HOSTNAME");
+	if (env != NULL && *env != '\0')
+		auth->gssapi_hostname = env;
+	else
+		auth->gssapi_hostname = my_hostname;
+
 	env = getenv("MASTER_USER_SEPARATOR");
 	if (env != NULL)
 		auth->master_user_separator = env[0];

Index: auth.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- auth.h	1 Jul 2006 18:40:34 -0000	1.23
+++ auth.h	27 Mar 2007 21:42:00 -0000	1.24
@@ -46,6 +46,7 @@
 	const char *default_realm;
 	const char *anonymous_username;
 	const char *username_format;
+	const char *gssapi_hostname;
 	char username_chars[256];
 	char username_translation[256];
 	char master_user_separator;

Index: mech-gssapi.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/mech-gssapi.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- mech-gssapi.c	10 Mar 2007 13:24:15 -0000	1.11
+++ mech-gssapi.c	27 Mar 2007 21:42:00 -0000	1.12
@@ -20,7 +20,6 @@
 #include "buffer.h"
 #include "hex-binary.h"
 #include "safe-memset.h"
-#include "hostpid.h"
 
 #ifdef HAVE_GSSAPI
 
@@ -113,7 +112,7 @@
 	principal_name = t_str_new(128);
 	str_append(principal_name, service_name);
 	str_append_c(principal_name, '@');
-	str_append(principal_name, my_hostname); 
+	str_append(principal_name, request->auth->gssapi_hostname);
 
 	auth_request_log_info(request, "gssapi",
 		"Obtaining credentials for %s", str_c(principal_name));



More information about the dovecot-cvs mailing list