[dovecot-cvs] dovecot/src/auth auth-client-connection.c, 1.19,
1.20 auth-client-connection.h, 1.5, 1.6 mech-rpa.c, 1.7,
1.8 mech.c, 1.44, 1.45 mech.h, 1.25, 1.26 passdb-pam.c, 1.17,
1.18 passdb-vpopmail.c, 1.10, 1.11
cras at dovecot.org
cras at dovecot.org
Tue Oct 19 05:51:39 EEST 2004
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv12323/auth
Modified Files:
auth-client-connection.c auth-client-connection.h mech-rpa.c
mech.c mech.h passdb-pam.c passdb-vpopmail.c
Log Message:
s/protocol/service/ in authentication
Index: auth-client-connection.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-client-connection.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- auth-client-connection.c 19 Oct 2004 00:59:12 -0000 1.19
+++ auth-client-connection.c 19 Oct 2004 02:51:37 -0000 1.20
@@ -123,10 +123,10 @@
}
static int
-auth_client_input_proto(struct auth_client_connection *conn, const char *args)
+auth_client_input_service(struct auth_client_connection *conn, const char *args)
{
- if (conn->default_protocol == NULL)
- conn->default_protocol = p_strdup(conn->pool, args);
+ if (conn->default_service == NULL)
+ conn->default_service = p_strdup(conn->pool, args);
return TRUE;
}
@@ -228,19 +228,19 @@
(void)net_addr2ip(arg, &request->local_ip);
else if (strcmp(name, "rip") == 0)
(void)net_addr2ip(arg, &request->remote_ip);
- else if (strcmp(name, "proto") == 0)
- request->protocol = p_strdup(request->pool, arg);
+ else if (strcmp(name, "service") == 0)
+ request->service = p_strdup(request->pool, arg);
else if (strcmp(name, "resp") == 0)
initial_resp = arg;
else if (strcmp(name, "valid-client-cert") == 0)
valid_client_cert = TRUE;
}
- if (request->protocol == NULL)
- request->protocol = conn->default_protocol;
- if (request->protocol == NULL) {
+ if (request->service == NULL)
+ request->service = conn->default_service;
+ if (request->service == NULL) {
i_error("BUG: Authentication client %u "
- "didn't specify protocol in request", conn->pid);
+ "didn't specify service in request", conn->pid);
auth_request_destroy(request);
return FALSE;
}
@@ -390,8 +390,8 @@
ret = auth_client_input_cont(conn, line + 5);
else if (strncmp(line, "CPID\t", 5) == 0)
ret = auth_client_input_cpid(conn, line + 5);
- else if (strncmp(line, "PROTO\t", 6) == 0)
- ret = auth_client_input_proto(conn, line + 6);
+ else if (strncmp(line, "SERVICE\t", 6) == 0)
+ ret = auth_client_input_service(conn, line + 6);
else {
/* ignore unknown command */
ret = TRUE;
Index: auth-client-connection.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-client-connection.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- auth-client-connection.h 19 Oct 2004 00:59:12 -0000 1.5
+++ auth-client-connection.h 19 Oct 2004 02:51:37 -0000 1.6
@@ -14,7 +14,7 @@
pool_t pool;
struct hash_table *auth_requests;
- char *default_protocol;
+ char *default_service;
unsigned int pid;
unsigned int connect_uid;
Index: mech-rpa.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/mech-rpa.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- mech-rpa.c 17 Oct 2004 23:36:08 -0000 1.7
+++ mech-rpa.c 19 Oct 2004 02:51:37 -0000 1.8
@@ -450,7 +450,7 @@
return;
}
- service = t_str_lcase(auth_request->protocol);
+ service = t_str_lcase(auth_request->service);
token2 = mech_rpa_build_token2(request, t_strconcat(service, "@",
my_hostname, NULL), &token2_size);
Index: mech.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/mech.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- mech.c 18 Oct 2004 01:00:42 -0000 1.44
+++ mech.c 19 Oct 2004 02:51:37 -0000 1.45
@@ -220,7 +220,7 @@
tab[2].value = strchr(auth_request->user, '@');
if (tab[2].value != NULL)
tab[2].value = escape_func(tab[2].value+1);
- tab[3].value = auth_request->protocol;
+ tab[3].value = auth_request->service;
/* tab[4] = we have no home dir */
if (auth_request->local_ip.family != 0)
tab[5].value = net_ip2addr(&auth_request->local_ip);
Index: mech.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/mech.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- mech.h 18 Oct 2004 19:21:40 -0000 1.25
+++ mech.h 19 Oct 2004 02:51:37 -0000 1.26
@@ -30,7 +30,7 @@
unsigned int id;
time_t created;
- const char *protocol;
+ const char *service;
struct ip_addr local_ip, remote_ip;
mech_callback_t *callback;
Index: passdb-pam.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-pam.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- passdb-pam.c 20 Sep 2004 21:47:30 -0000 1.17
+++ passdb-pam.c 19 Oct 2004 02:51:37 -0000 1.18
@@ -349,7 +349,7 @@
int fd[2];
pid_t pid;
- service = service_name != NULL ? service_name : request->protocol;
+ service = service_name != NULL ? service_name : request->service;
if (pipe(fd) < 0) {
i_error("pam(%s): pipe() failed: %m", get_log_prefix(request));
callback(PASSDB_RESULT_INTERNAL_FAILURE, request);
Index: passdb-vpopmail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-vpopmail.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- passdb-vpopmail.c 1 Oct 2004 13:46:01 -0000 1.10
+++ passdb-vpopmail.c 19 Oct 2004 02:51:37 -0000 1.11
@@ -34,12 +34,12 @@
}
if (((vpw->pw_gid & NO_IMAP) != 0 &&
- strcmp(request->protocol, "IMAP") == 0) ||
+ strcmp(request->service, "IMAP") == 0) ||
((vpw->pw_gid & NO_POP) != 0 &&
- strcmp(request->protocol, "POP3") == 0)) {
+ strcmp(request->service, "POP3") == 0)) {
if (verbose) {
i_info("vpopmail(%s): %s disabled",
- get_log_prefix(request), request->protocol);
+ get_log_prefix(request), request->service);
}
callback(PASSDB_RESULT_USER_DISABLED, request);
return;
@@ -70,8 +70,8 @@
}
#ifdef HAVE_VPOPMAIL_OPEN_SMTP_RELAY
- if (strcmp(request->protocol, "POP3") == 0 ||
- strcmp(request->protocol, "IMAP") == 0) {
+ if (strcmp(request->service, "POP3") == 0 ||
+ strcmp(request->service, "IMAP") == 0) {
const char *host = net_ip2addr(&request->remote_ip);
if (host != NULL) {
/* use putenv() directly rather than env_put() which
More information about the dovecot-cvs
mailing list