[dovecot-cvs] dovecot/src/auth mech-apop.c, 1.4, 1.5 mech-rpa.c, 1.3, 1.4 mech.c, 1.33, 1.34

cras at dovecot.org cras at dovecot.org
Wed Sep 15 16:20:19 EEST 2004


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

Modified Files:
	mech-apop.c mech-rpa.c mech.c 
Log Message:
Compiler warning fixes and cleanups



Index: mech-apop.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/mech-apop.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- mech-apop.c	31 Aug 2004 09:31:18 -0000	1.4
+++ mech-apop.c	15 Sep 2004 13:20:16 -0000	1.5
@@ -95,7 +95,7 @@
 		mech_auth_finish(auth_request, NULL, 0, FALSE);
 		return TRUE;
 	}
-	auth->challenge = p_strdup(auth->pool, data);
+	auth->challenge = p_strdup(auth->pool, (const char *)data);
 
 	if (tmp != end) {
 		username = ++tmp;
@@ -114,7 +114,7 @@
 	}
 	tmp++;
 
-	auth_request->user = p_strdup(auth->pool, username);
+	auth_request->user = p_strdup(auth->pool, (const char *)username);
 	if (!mech_fix_username(auth_request->user, &error)) {
 		if (verbose) {
 			i_info("apop(%s): %s",

Index: mech-rpa.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/mech-rpa.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mech-rpa.c	31 Aug 2004 09:31:18 -0000	1.3
+++ mech-rpa.c	15 Sep 2004 13:20:16 -0000	1.4
@@ -320,7 +320,7 @@
 	}
 }
 
-static const char *
+static const unsigned char *
 mech_rpa_build_token2(struct rpa_auth_request *auth,
 		      const char *realms, size_t *size)
 {
@@ -366,7 +366,7 @@
 	return buffer_free_without_data(buf);
 }
 
-static const char *
+static const unsigned char *
 mech_rpa_build_token4(struct rpa_auth_request *auth, size_t *size)
 {
 	unsigned int length = sizeof(rpa_oid) + 17 + 17 + 1;

Index: mech.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/mech.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- mech.c	31 Aug 2004 09:31:18 -0000	1.33
+++ mech.c	15 Sep 2004 13:20:16 -0000	1.34
@@ -17,9 +17,9 @@
 const char *default_realm;
 const char *anonymous_username;
 char username_chars[256], username_translation[256];
+int ssl_require_client_cert;
 
 static int set_use_cyrus_sasl;
-static int ssl_require_client_cert;
 static struct auth_client_request_reply failure_reply;
 
 static buffer_t *auth_failures_buf;
@@ -467,11 +467,11 @@
 	env = getenv("USERNAME_CHARS");
 	if (env == NULL || *env == '\0') {
 		/* all chars are allowed */
-		memset(username_chars, 0xff, sizeof(username_chars));
+		memset(username_chars, 1, sizeof(username_chars));
 	} else {
 		memset(username_chars, 0, sizeof(username_chars));
 		for (; *env != '\0'; env++)
-			username_chars[((unsigned char)*env) & 0xff] = 0xff;
+			username_chars[((unsigned char)*env) & 0xff] = 1;
 	}
 
 	env = getenv("USERNAME_TRANSLATION");



More information about the dovecot-cvs mailing list