Debian Bug report logs - #563340
libsasl2-modules-sql: Please add a sql_defaultrealm option.

version graph

Package: libsasl2-modules-sql; Maintainer for libsasl2-modules-sql is Debian Cyrus Team <[email protected]>; Source for libsasl2-modules-sql is src:cyrus-sasl2 (PTS, buildd, popcon).

Reported by: Christian Schulte <[email protected]>

Date: Sat, 2 Jan 2010 04:51:29 UTC

Severity: wishlist

Tags: moreinfo, patch, upstream

Found in version cyrus-sasl2/2.1.23.dfsg1-5

Forwarded to [email protected]

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Debian Cyrus SASL Team <[email protected]>:
Bug#563340; Package libsasl2-modules-sql. (Sat, 02 Jan 2010 04:51:32 GMT) (full text, mbox, link).


Acknowledgement sent to Christian Schulte <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian Cyrus SASL Team <[email protected]>. (Sat, 02 Jan 2010 04:51:32 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Christian Schulte <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: libsasl2-modules-sql: Please add a sql_defaultrealm option.
Date: Sat, 02 Jan 2010 05:48:16 +0100
[Message part 1 (text/plain, inline)]
Package: libsasl2-modules-sql
Version: 2.1.23.dfsg1-5
Severity: wishlist
Tags: patch

When using the %r variable in an sql_select statement, the value
substituted for that variable is the machine's FQDN for all users
not specifying a realm during login. The attached patch adds an
sql_defaultrealm option taking a realm to use for any unqualified
user ids.

-- System Information:
Debian Release: 5.0.3
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'oldstable'), (50, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.33-686 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libsasl2-modules-sql depends on:
ii  libc6                  2.7-18            GNU C Library: Shared libraries
ii  libmysqlclient15off    5.0.51a-24+lenny2 MySQL database client library
ii  libpq5                 8.3.9-0lenny1     PostgreSQL C client library
ii  libsasl2-modules       2.1.23.dfsg1-5    Cyrus SASL - pluggable authenticat
ii  libsqlite0             2.8.17-4          SQLite shared library

libsasl2-modules-sql recommends no packages.

libsasl2-modules-sql suggests no packages.

-- no debconf information
[0024_add_sql_defaultrealm_option.dpatch (text/x-shellscript, attachment)]

Information forwarded to [email protected], Debian Cyrus SASL Team <[email protected]>:
Bug#563340; Package libsasl2-modules-sql. (Sat, 02 Jan 2010 05:39:02 GMT) (full text, mbox, link).


Acknowledgement sent to Christian Schulte <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Cyrus SASL Team <[email protected]>. (Sat, 02 Jan 2010 05:39:02 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Christian Schulte <[email protected]>
To: [email protected]
Subject: Updated patch to honor the sql_defaultrealm option also in method sql_auxprop_store.
Date: Sat, 02 Jan 2010 06:35:22 +0100
[Message part 1 (text/plain, inline)]

[0024_add_sql_defaultrealm_option.dpatch (text/plain, inline)]
#! /bin/sh /usr/share/dpatch/dpatch-run
## 0024_add_sql_defaultrealm_option.dpatch by  Christian Schulte <[email protected]>
##
## 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;
     }
     

Information forwarded to [email protected], Debian Cyrus SASL Team <[email protected]>:
Bug#563340; Package libsasl2-modules-sql. (Sat, 02 Jan 2010 13:33:02 GMT) (full text, mbox, link).


Acknowledgement sent to "Roberto C. Sanchez" <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Cyrus SASL Team <[email protected]>. (Sat, 02 Jan 2010 13:33:02 GMT) (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: "Roberto C. Sanchez" <[email protected]>
To: Cyrus SASL List <[email protected]>
Cc: [email protected]
Subject: [Fwd: Bug#563340: Updated patch to honor the sql_defaultrealm option also in method sql_auxprop_store.]
Date: Sat, 02 Jan 2010 08:31:46 -0500
[Message part 1 (text/plain, inline)]
package libsasl2-modules-sql
tags 563340 + upstream
forwarded 563340 [email protected]
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
[0024_add_sql_defaultrealm_option.dpatch (text/plain, inline)]
#! /bin/sh /usr/share/dpatch/dpatch-run
## 0024_add_sql_defaultrealm_option.dpatch by  Christian Schulte <[email protected]>
##
## 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;
     }
     

[signature.asc (application/pgp-signature, attachment)]

Added tag(s) upstream. Request was from "Roberto C. Sanchez" <[email protected]> to [email protected]. (Sat, 02 Jan 2010 13:33:04 GMT) (full text, mbox, link).


Set Bug forwarded-to-address to '[email protected]'. Request was from "Roberto C. Sanchez" <[email protected]> to [email protected]. (Sat, 02 Jan 2010 13:33:05 GMT) (full text, mbox, link).


Information forwarded to [email protected], Debian Cyrus Team <[email protected]>:
Bug#563340; Package libsasl2-modules-sql. (Tue, 19 Apr 2022 22:51:02 GMT) (full text, mbox, link).


Acknowledgement sent to Bastian Germann <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Cyrus Team <[email protected]>. (Tue, 19 Apr 2022 22:51:02 GMT) (full text, mbox, link).


Message #24 received at [email protected] (full text, mbox, reply):

From: Bastian Germann <[email protected]>
To: [email protected], [email protected]
Subject: Re: libsasl2-modules-sql: Please add a sql_defaultrealm option.
Date: Wed, 20 Apr 2022 00:47:41 +0200
Control: tags -1 moreinfo

This patch still applies on 2.1.18 with fuzz.
It does not appear in upstream's issues or pull requests.

Somebody will need to document it properly and propose it to
upstream again if there is still interest to get this into Debian.
However, I will only take such a new feature via upstream.



Added tag(s) moreinfo. Request was from Bastian Germann <[email protected]> to [email protected]. (Tue, 19 Apr 2022 22:51:02 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 15:41:57 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.