package libsasl2-modules-sql
tags 563340 + upstream
forwarded 563340 cyrus-s...@lists.andrew.cmu.edu
thanks

Greetings.

A user of the Debian cyrus-sasl packages has a filed a wishlist bug [0]
requesting the addition of a sql_defaultrealm option, including a
proposed patch.  The patch is attached to this message and can also be
found attached to the referenced bug report.  Please consider adopting
this patch in the next release.

Regards,

-Roberto

[0] http://bugs.debian.org/563340

-- 
Roberto C. Sánchez
http://people.connexer.com/~roberto
http://www.connexer.com
#! /bin/sh /usr/share/dpatch/dpatch-run
## 0024_add_sql_defaultrealm_option.dpatch by  Christian Schulte 
<c...@schulte.it>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: A patch adding an sql_defaultrealm option.

@DPATCH@

--- cyrus-sasl2_2.1.23.dfsg1.orig/plugins/sql.c 2009-04-28 17:09:17.000000000 
+0200
+++ cyrus-sasl2_2.1.23.dfsg1/plugins/sql.c      2010-01-02 06:24:12.000000000 
+0100
@@ -53,6 +53,7 @@
     const char *sql_select;
     const char *sql_insert;
     const char *sql_update;
+    const char *sql_defaultrealm;
     int sql_usessl;
 } sql_settings_t;
 
@@ -677,6 +678,12 @@
        settings->sql_update = SQL_BLANK_STRING;
     }
 
+    r = utils->getopt(utils->getopt_context, "SQL", "sql_defaultrealm",
+                      &settings->sql_defaultrealm, NULL);
+    if(r || !settings->sql_defaultrealm) {
+       settings->sql_defaultrealm = NULL;
+    }
+
     r = utils->getopt(utils->getopt_context, "SQL", "sql_usessl",
                  &usessl, NULL);
     if (r || !usessl) usessl = "no";
@@ -781,6 +788,8 @@
     
     if(sparams->user_realm) {
        user_realm = sparams->user_realm;
+    } else if(settings->sql_defaultrealm) {
+        user_realm = settings->sql_defaultrealm;
     } else {
        user_realm = sparams->serverFQDN;
     }
@@ -933,8 +942,9 @@
     
     if (sparams->user_realm) {
        user_realm = sparams->user_realm;
-    }
-    else {
+    } else if(settings->sql_defaultrealm) {
+        user_realm = settings->sql_defaultrealm;
+    } else {
        user_realm = sparams->serverFQDN;
     }
     

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to