| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- --- plugins/mysql.c.orig Wed May 14 20:46:02 2003
- +++ plugins/mysql.c Fri Jul 4 10:11:16 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;
- @@ -326,6 +327,7 @@
- "mysql plugin try and connect to %s\n",
- cur_host);
-
- + mysql_init(&mysql);
- sock = mysql_real_connect(&mysql,cur_host,
- settings->mysql_user,
- settings->mysql_passwd,
- @@ -408,8 +410,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.orig Wed Apr 16 21:36:01 2003
- +++ lib/server.c Fri Jul 4 10:07:52 2003
- @@ -390,18 +390,9 @@
- unsigned path_len;
- 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@";
-
- c = strchr(path_to_config, PATHS_DELIMITER);
-
|