[Pkg-samba-maint] r1483 - in trunk/samba/debian: . patches

vorlon at alioth.debian.org vorlon at alioth.debian.org
Sat Jul 28 00:40:06 UTC 2007


Author: vorlon
Date: 2007-07-28 00:40:06 +0000 (Sat, 28 Jul 2007)
New Revision: 1483

Added:
   trunk/samba/debian/patches/smbpasswd-syslog.patch
Modified:
   trunk/samba/debian/changelog
   trunk/samba/debian/patches/series
Log:
Fix pam_smbpass to no longer call openlog() and closelog(), since this will
interfere with syslogging behavior of the calling application.
Closes: #434372.



Modified: trunk/samba/debian/changelog
===================================================================
--- trunk/samba/debian/changelog	2007-07-27 23:41:43 UTC (rev 1482)
+++ trunk/samba/debian/changelog	2007-07-28 00:40:06 UTC (rev 1483)
@@ -23,6 +23,9 @@
     in umount.cifs assumed that errors would return a value > 0, when in fact
     the return value on failure is -1.  Correct this assumption, which was
     allowing any user to unmount shares mounted by other users.
+  * smbpasswd-syslog.patch: Fix pam_smbpass to no longer call openlog()
+    and closelog(), since this will interfere with syslogging behavior
+    of the calling application.  Closes: #434372.
 
   [ Christian Perrier ]
   * debian/panic-action: bail out if there's no "mail" command
@@ -30,7 +33,7 @@
   * debian/samba-common.templates: remove extra capitalization and unfuzzy
     translations
 
- -- Christian Perrier <bubulle at debian.org>  Tue, 17 Jul 2007 20:26:13 +0200
+ -- Steve Langasek <vorlon at debian.org>  Fri, 27 Jul 2007 14:34:43 -0700
 
 samba (3.0.25b-1) unstable; urgency=low
 

Modified: trunk/samba/debian/patches/series
===================================================================
--- trunk/samba/debian/patches/series	2007-07-27 23:41:43 UTC (rev 1482)
+++ trunk/samba/debian/patches/series	2007-07-28 00:40:06 UTC (rev 1483)
@@ -20,3 +20,4 @@
 linux-cifs-user-perms.patch
 cifs-umount-trailing-slashes.patch
 cifs-umount-same-user.patch
+smbpasswd-syslog.patch

Added: trunk/samba/debian/patches/smbpasswd-syslog.patch
===================================================================
--- trunk/samba/debian/patches/smbpasswd-syslog.patch	                        (rev 0)
+++ trunk/samba/debian/patches/smbpasswd-syslog.patch	2007-07-28 00:40:06 UTC (rev 1483)
@@ -0,0 +1,77 @@
+Goal: Don't call openlog() or closelog() from pam_smbpass
+
+Fixes: bug #434372
+
+Upstream status: submitted as bugzilla bug #4831
+
+Index: samba-3.0.25b/source/pam_smbpass/support.c
+===================================================================
+--- samba-3.0.25b.orig/source/pam_smbpass/support.c
++++ samba-3.0.25b/source/pam_smbpass/support.c
+@@ -71,12 +71,27 @@
+ 	void _log_err( int err, const char *format, ... )
+ 	{
+ 	    va_list args;
++	    const char tag[] = "(pam_smbpass) ";
++	    char *mod_format;
++	    int free_mod_format = 1;
++
++	    mod_format = SMB_MALLOC_ARRAY(char, sizeof(tag) + strlen(format));
++	    /* try really, really hard to log something, since this may have
++	       been a message about a malloc() failure... */
++	    if (mod_format == NULL) {
++		mod_format = (char *) format;
++		free_mod_format = 0;
++	    } else {
++		strncpy(mod_format, tag, strlen(tag)+1);
++		strncat(mod_format, format, strlen(format));
++	    }
+ 
+ 	    va_start( args, format );
+-	    openlog( "PAM_smbpass", LOG_CONS | LOG_PID, LOG_AUTH );
+-	    vsyslog( err, format, args );
++	    vsyslog( err | LOG_AUTH, mod_format, args );
+ 	    va_end( args );
+-	    closelog();
++
++	    if (free_mod_format)
++		free(mod_format);
+ 	}
+ 
+ 	/* this is a front-end for module-application conversations */
+Index: samba-3.0.25b/source/pam_smbpass/pam_smb_auth.c
+===================================================================
+--- samba-3.0.25b.orig/source/pam_smbpass/pam_smb_auth.c
++++ samba-3.0.25b/source/pam_smbpass/pam_smb_auth.c
+@@ -75,7 +75,6 @@
+ 
+ 	/* Samba initialization. */
+ 	load_case_tables();
+-	setup_logging("pam_smbpass",False);
+ 	in_client = True;
+ 
+ 	ctrl = set_ctrl(flags, argc, argv);
+Index: samba-3.0.25b/source/pam_smbpass/pam_smb_acct.c
+===================================================================
+--- samba-3.0.25b.orig/source/pam_smbpass/pam_smb_acct.c
++++ samba-3.0.25b/source/pam_smbpass/pam_smb_acct.c
+@@ -52,7 +52,6 @@
+ 
+ 	/* Samba initialization. */
+ 	load_case_tables();
+-	setup_logging("pam_smbpass",False);
+ 	in_client = True;
+ 
+ 	ctrl = set_ctrl( flags, argc, argv );
+Index: samba-3.0.25b/source/pam_smbpass/pam_smb_passwd.c
+===================================================================
+--- samba-3.0.25b.orig/source/pam_smbpass/pam_smb_passwd.c
++++ samba-3.0.25b/source/pam_smbpass/pam_smb_passwd.c
+@@ -104,7 +104,6 @@
+ 
+     /* Samba initialization. */
+     load_case_tables();
+-    setup_logging( "pam_smbpass", False );
+     in_client = True;
+ 
+     ctrl = set_ctrl(flags, argc, argv);




More information about the Pkg-samba-maint mailing list