You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

108 lines
3.1 KiB

--- saslauthd/lak.c.dist Wed Mar 12 11:39:22 2003
+++ saslauthd/lak.c Wed Mar 12 11:39:22 2003
@@ -532,8 +532,6 @@
return;
if (lak->ld != NULL) {
- if (lak->conf->cache_ttl)
- ldap_destroy_cache(lak->ld);
ldap_unbind_s(lak->ld);
}
@@ -642,16 +640,6 @@
syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_RESTART.");
}
- /*
- * Set up client-side caching
- */
- if (lak->conf->cache_ttl) {
- rc = ldap_enable_cache(lak->ld, lak->conf->cache_ttl, lak->conf->cache_mem);
- if (rc != LDAP_SUCCESS) {
- syslog(LOG_WARNING|LOG_AUTH, "Unable to enable cache -- continuing (%s)", ldap_err2string(rc));
- }
- }
-
return LAK_OK;
}
@@ -667,8 +655,6 @@
if (lak->bind_status == LAK_NOT_BOUND) {
if (lak->ld != NULL) {
- if (lak->conf->cache_ttl)
- ldap_destroy_cache(lak->ld);
ldap_unbind_s(lak->ld);
lak->ld = NULL;
}
@@ -683,8 +669,6 @@
lak->bind_status = LAK_NOT_BOUND;
if (lak->ld != NULL) {
- if (lak->conf->cache_ttl)
- ldap_destroy_cache(lak->ld);
ldap_unbind_s(lak->ld);
lak->ld = NULL;
--- plugins/mysql.c.dist Fri Mar 7 13:26:42 2003
+++ plugins/mysql.c Fri Apr 4 16:55:38 2003
@@ -254,6 +254,7 @@
MYSQL mysql,*sock = NULL;
MYSQL_RES *result;
MYSQL_ROW row;
+ unsigned long *rlen;
/* setup the settings */
settings = (struct mysql_settings *)glob_context;
@@ -325,8 +326,15 @@
sparams->utils->log(NULL, SASL_LOG_WARN,
"mysql plugin try and connect to %s\n",
cur_host);
+#ifdef HAVE_MYSQL_REAL_CONNECT
+ mysql_init(&mysql);
+ sock = mysql_real_connect(&mysql,cur_host,settings->mysql_user,
+ settings->mysql_passwd,
+ NULL,0,NULL,CLIENT_COMPRESS);
+#else
sock = mysql_connect(&mysql,cur_host,settings->mysql_user,
settings->mysql_passwd);
+#endif
if (sock) break;
cur_host = db_host;
@@ -405,8 +413,10 @@
/* now get the result set value and value_len */
/* we only fetch one becuse we dont car about the rest */
row = mysql_fetch_row(result);
- strncpy(value,row[0],8190);
- value_len = strlen(value);
+ rlen = mysql_fetch_lengths(result);
+ value_len = rlen[0] > 8190 ? 8190 : rlen[0];
+ memcpy(value, row[0], value_len);
+ value[value_len] = '\0';
sparams->utils->prop_set(sparams->propctx, cur->name,
value, value_len);
--- lib/server.c.dist Mon Apr 7 16:48:41 2003
+++ lib/server.c Mon Apr 7 16:52:27 2003
@@ -379,18 +379,9 @@
char *c;
char *config_filename=NULL;
int len;
- const sasl_callback_t *getpath_cb=NULL;
- /* get the path to the plugins; for now the config file will reside there */
- getpath_cb=_sasl_find_getpath_callback( global_callbacks.callbacks );
- if (getpath_cb==NULL) return SASL_BADPARAM;
-
- /* getpath_cb->proc MUST be a sasl_getpath_t; if only c had a type
- system */
- result = ((sasl_getpath_t *)(getpath_cb->proc))(getpath_cb->context,
- &path_to_config);
- if (result!=SASL_OK) goto done;
- if (path_to_config == NULL) path_to_config = "";
+ result = SASL_OK;
+ path_to_config = "@l_sysconfdir@";
if ((c = strchr(path_to_config, PATHS_DELIMITER))) {
*c = '\0';