diff options
author | Gustavo Felisberto <humpback@gentoo.org> | 2006-09-07 09:05:33 +0000 |
---|---|---|
committer | Gustavo Felisberto <humpback@gentoo.org> | 2006-09-07 09:05:33 +0000 |
commit | ea401c58b5e9dab520042d717a2bfd2d4c01b874 (patch) | |
tree | c72846d7857f705b0936ccce3c0beb9480406818 /net-ftp | |
parent | Stable on ppc64; bug #146660 (diff) | |
download | gentoo-2-ea401c58b5e9dab520042d717a2bfd2d4c01b874.tar.gz gentoo-2-ea401c58b5e9dab520042d717a2bfd2d4c01b874.tar.bz2 gentoo-2-ea401c58b5e9dab520042d717a2bfd2d4c01b874.zip |
fixed ^M in patch
(Portage version: 2.1.1_rc1-r5)
Diffstat (limited to 'net-ftp')
-rw-r--r-- | net-ftp/proftpd/ChangeLog | 6 | ||||
-rw-r--r-- | net-ftp/proftpd/files/mod_sql_mysql.diff | 256 |
2 files changed, 133 insertions, 129 deletions
diff --git a/net-ftp/proftpd/ChangeLog b/net-ftp/proftpd/ChangeLog index 4a4ad8693f51..8a818078abe0 100644 --- a/net-ftp/proftpd/ChangeLog +++ b/net-ftp/proftpd/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-ftp/proftpd # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/ChangeLog,v 1.112 2006/09/06 14:35:22 humpback Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/ChangeLog,v 1.113 2006/09/07 09:05:33 humpback Exp $ + + 07 Sep 2006; Gustavo Felisberto <humpback@gentoo.org>; + files/mod_sql_mysql.diff: + Fixed format on patch. Should solve issue with <=sys-devel/patch-2.5.9 06 Sep 2006; Gustavo Felisberto <humpback@gentoo.org>; +files/openssl-0.9.8.patch, files/mod_sql_mysql.diff, diff --git a/net-ftp/proftpd/files/mod_sql_mysql.diff b/net-ftp/proftpd/files/mod_sql_mysql.diff index 473feeb9b344..be382c6835d2 100644 --- a/net-ftp/proftpd/files/mod_sql_mysql.diff +++ b/net-ftp/proftpd/files/mod_sql_mysql.diff @@ -1,128 +1,128 @@ -Index: contrib/mod_sql_mysql.c
-===================================================================
-RCS file: /cvsroot/proftp/proftpd/contrib/mod_sql_mysql.c,v
-retrieving revision 1.40
-diff -u -r1.40 mod_sql_mysql.c
---- contrib/mod_sql_mysql.c 21 Apr 2006 01:59:45 -0000 1.40
-+++ contrib/mod_sql_mysql.c 26 May 2006 18:37:14 -0000
-@@ -128,7 +128,7 @@
- * Internal define used for debug and logging. All backends are encouraged
- * to use the same format.
- */
--#define MOD_SQL_MYSQL_VERSION "mod_sql_mysql/4.05"
-+#define MOD_SQL_MYSQL_VERSION "mod_sql_mysql/4.0.7"
-
- #define _MYSQL_PORT "3306"
-
-@@ -158,6 +158,7 @@
- char *pass;
- char *db;
- char *port;
-+ char *unix_sock;
-
- MYSQL *mysql;
-
-@@ -431,8 +432,8 @@
- mysql_options(conn->mysql, MYSQL_READ_DEFAULT_GROUP, "client");
-
- if (!mysql_real_connect(conn->mysql, conn->host, conn->user, conn->pass,
-- conn->db, (int) strtol(conn->port, (char **) NULL, 10), NULL,
-- CLIENT_INTERACTIVE)) {
-+ conn->db, (int) strtol(conn->port, (char **) NULL, 10),
-+ conn->unix_sock, CLIENT_INTERACTIVE)) {
-
- /* If it didn't work, return an error. */
- sql_log(DEBUG_FUNC, "%s", "exiting \tmysql cmd_open");
-@@ -567,8 +568,7 @@
- * a number or ttl is negative, the connection will be assumed to have no
- * associated timer.
- */
--MODRET cmd_defineconnection(cmd_rec *cmd)
--{
-+MODRET cmd_defineconnection(cmd_rec *cmd) {
- char *info = NULL;
- char *name = NULL;
-
-@@ -586,12 +586,14 @@
-
- _sql_check_cmd(cmd, "cmd_defineconnection");
-
-- if ((cmd->argc < 4) || (cmd->argc > 5) || (!cmd->argv[0])) {
-+ if (cmd->argc < 4 ||
-+ cmd->argc > 5 ||
-+ !cmd->argv[0]) {
- sql_log(DEBUG_FUNC, "%s", "exiting \tmysql cmd_defineconnection");
- return ERROR_MSG(cmd, MOD_SQL_MYSQL_VERSION, "badly formed request");
- }
-
-- conn = (db_conn_t *) palloc(conn_pool, sizeof(db_conn_t));
-+ conn = (db_conn_t *) pcalloc(conn_pool, sizeof(db_conn_t));
-
- name = pstrdup(conn_pool, cmd->argv[0]);
- conn->user = pstrdup(conn_pool, cmd->argv[1]);
-@@ -615,6 +617,7 @@
- if (haveport) {
- port = haveport + 1;
- *haveport = '\0';
-+
- } else {
- port = _MYSQL_PORT;
- }
-@@ -622,16 +625,28 @@
- if (havehost) {
- host = havehost + 1;
- *havehost = '\0';
-+
- } else {
- host = "localhost";
- }
-
-- conn->host = pstrdup(conn_pool, host);
-+ /* Hack to support ability to configure path to Unix domain socket
-+ * for MySQL: if the host string starts with a '/', assume it's
-+ * a path to the Unix domain socket to use.
-+ */
-+ if (*host == '/') {
-+ conn->unix_sock = pstrdup(conn_pool, host);
-+
-+ } else {
-+ conn->host = pstrdup(conn_pool, host);
-+ }
-+
- conn->db = pstrdup(conn_pool, db);
- conn->port = pstrdup(conn_pool, port);
-
-- /* insert the new conn_info into the connection hash */
-- if (!(entry = _sql_add_connection(conn_pool, name, (void *) conn))) {
-+ /* Insert the new conn_info into the connection hash */
-+ entry = _sql_add_connection(conn_pool, name, (void *) conn);
-+ if (!entry) {
- sql_log(DEBUG_FUNC, "%s", "exiting \tmysql cmd_defineconnection");
- return ERROR_MSG(cmd, MOD_SQL_MYSQL_VERSION,
- "named connection already exists");
-@@ -645,12 +660,19 @@
- entry->timer = 0;
- entry->connections = 0;
-
-- sql_log(DEBUG_INFO, " name: '%s'", entry->name);
-- sql_log(DEBUG_INFO, " user: '%s'", conn->user);
-- sql_log(DEBUG_INFO, " host: '%s'", conn->host);
-- sql_log(DEBUG_INFO, " db: '%s'", conn->db);
-- sql_log(DEBUG_INFO, " port: '%s'", conn->port);
-- sql_log(DEBUG_INFO, " ttl: '%d'", entry->ttl);
-+ sql_log(DEBUG_INFO, " name: '%s'", entry->name);
-+ sql_log(DEBUG_INFO, " user: '%s'", conn->user);
-+
-+ if (conn->host) {
-+ sql_log(DEBUG_INFO, " host: '%s'", conn->host);
-+
-+ } else if (conn->unix_sock) {
-+ sql_log(DEBUG_INFO, "socket: '%s'", conn->unix_sock);
-+ }
-+
-+ sql_log(DEBUG_INFO, " db: '%s'", conn->db);
-+ sql_log(DEBUG_INFO, " port: '%s'", conn->port);
-+ sql_log(DEBUG_INFO, " ttl: '%d'", entry->ttl);
-
- sql_log(DEBUG_FUNC, "%s", "exiting \tmysql cmd_defineconnection");
- return HANDLED(cmd);
+Index: contrib/mod_sql_mysql.c +=================================================================== +RCS file: /cvsroot/proftp/proftpd/contrib/mod_sql_mysql.c,v +retrieving revision 1.40 +diff -u -r1.40 mod_sql_mysql.c +--- contrib/mod_sql_mysql.c 21 Apr 2006 01:59:45 -0000 1.40 ++++ contrib/mod_sql_mysql.c 26 May 2006 18:37:14 -0000 +@@ -128,7 +128,7 @@ + * Internal define used for debug and logging. All backends are encouraged + * to use the same format. + */ +-#define MOD_SQL_MYSQL_VERSION "mod_sql_mysql/4.05" ++#define MOD_SQL_MYSQL_VERSION "mod_sql_mysql/4.0.7" + + #define _MYSQL_PORT "3306" + +@@ -158,6 +158,7 @@ + char *pass; + char *db; + char *port; ++ char *unix_sock; + + MYSQL *mysql; + +@@ -431,8 +432,8 @@ + mysql_options(conn->mysql, MYSQL_READ_DEFAULT_GROUP, "client"); + + if (!mysql_real_connect(conn->mysql, conn->host, conn->user, conn->pass, +- conn->db, (int) strtol(conn->port, (char **) NULL, 10), NULL, +- CLIENT_INTERACTIVE)) { ++ conn->db, (int) strtol(conn->port, (char **) NULL, 10), ++ conn->unix_sock, CLIENT_INTERACTIVE)) { + + /* If it didn't work, return an error. */ + sql_log(DEBUG_FUNC, "%s", "exiting \tmysql cmd_open"); +@@ -567,8 +568,7 @@ + * a number or ttl is negative, the connection will be assumed to have no + * associated timer. + */ +-MODRET cmd_defineconnection(cmd_rec *cmd) +-{ ++MODRET cmd_defineconnection(cmd_rec *cmd) { + char *info = NULL; + char *name = NULL; + +@@ -586,12 +586,14 @@ + + _sql_check_cmd(cmd, "cmd_defineconnection"); + +- if ((cmd->argc < 4) || (cmd->argc > 5) || (!cmd->argv[0])) { ++ if (cmd->argc < 4 || ++ cmd->argc > 5 || ++ !cmd->argv[0]) { + sql_log(DEBUG_FUNC, "%s", "exiting \tmysql cmd_defineconnection"); + return ERROR_MSG(cmd, MOD_SQL_MYSQL_VERSION, "badly formed request"); + } + +- conn = (db_conn_t *) palloc(conn_pool, sizeof(db_conn_t)); ++ conn = (db_conn_t *) pcalloc(conn_pool, sizeof(db_conn_t)); + + name = pstrdup(conn_pool, cmd->argv[0]); + conn->user = pstrdup(conn_pool, cmd->argv[1]); +@@ -615,6 +617,7 @@ + if (haveport) { + port = haveport + 1; + *haveport = '\0'; ++ + } else { + port = _MYSQL_PORT; + } +@@ -622,16 +625,28 @@ + if (havehost) { + host = havehost + 1; + *havehost = '\0'; ++ + } else { + host = "localhost"; + } + +- conn->host = pstrdup(conn_pool, host); ++ /* Hack to support ability to configure path to Unix domain socket ++ * for MySQL: if the host string starts with a '/', assume it's ++ * a path to the Unix domain socket to use. ++ */ ++ if (*host == '/') { ++ conn->unix_sock = pstrdup(conn_pool, host); ++ ++ } else { ++ conn->host = pstrdup(conn_pool, host); ++ } ++ + conn->db = pstrdup(conn_pool, db); + conn->port = pstrdup(conn_pool, port); + +- /* insert the new conn_info into the connection hash */ +- if (!(entry = _sql_add_connection(conn_pool, name, (void *) conn))) { ++ /* Insert the new conn_info into the connection hash */ ++ entry = _sql_add_connection(conn_pool, name, (void *) conn); ++ if (!entry) { + sql_log(DEBUG_FUNC, "%s", "exiting \tmysql cmd_defineconnection"); + return ERROR_MSG(cmd, MOD_SQL_MYSQL_VERSION, + "named connection already exists"); +@@ -645,12 +660,19 @@ + entry->timer = 0; + entry->connections = 0; + +- sql_log(DEBUG_INFO, " name: '%s'", entry->name); +- sql_log(DEBUG_INFO, " user: '%s'", conn->user); +- sql_log(DEBUG_INFO, " host: '%s'", conn->host); +- sql_log(DEBUG_INFO, " db: '%s'", conn->db); +- sql_log(DEBUG_INFO, " port: '%s'", conn->port); +- sql_log(DEBUG_INFO, " ttl: '%d'", entry->ttl); ++ sql_log(DEBUG_INFO, " name: '%s'", entry->name); ++ sql_log(DEBUG_INFO, " user: '%s'", conn->user); ++ ++ if (conn->host) { ++ sql_log(DEBUG_INFO, " host: '%s'", conn->host); ++ ++ } else if (conn->unix_sock) { ++ sql_log(DEBUG_INFO, "socket: '%s'", conn->unix_sock); ++ } ++ ++ sql_log(DEBUG_INFO, " db: '%s'", conn->db); ++ sql_log(DEBUG_INFO, " port: '%s'", conn->port); ++ sql_log(DEBUG_INFO, " ttl: '%d'", entry->ttl); + + sql_log(DEBUG_FUNC, "%s", "exiting \tmysql cmd_defineconnection"); + return HANDLED(cmd); |