On Wed, Feb 04, 2009 at 08:44:57PM +0100, Christian Perrier wrote:
[...]
> 
> 20:31 <@idra> bubulle, I like the proposed change to check for null passwords 
> and the add an "n" (please use diff -u tho,
>               non unidiff patches make me cringe :-P)

Understood. That patch was supposed to be just a suggestion of what might
be done, not a readily applicable solution, hence the more space economic
format.

But, since Simo likes it, please find attached the same suggestion in full
diff -u splendor :-)

I'll test a Samba version patched in this way when I return to office on
Friday.

Ralph Rößner


-- 
Ralph Rößner
CAPCom AG < http://www.capcom.de >
Rundeturmstr. 10, 64283 Darmstadt, Germany
Phone +49 6151 155 900, Fax +49 6151 155 909

Vorstand: Luc Neumann (Vorsitzender)
Vorsitzender des Aufsichtsrats: Prof. Dr.-Ing. José L. Encarnação
Sitz der Gesellschaft: Darmstadt, Registergericht: Darmstadt HRB 8090
--- samba-3.2.5/source/passdb/pdb_ldap.c.orig   2009-02-04 21:06:54.000000000 
+0100
+++ samba-3.2.5/source/passdb/pdb_ldap.c        2009-02-04 21:09:53.000000000 
+0100
@@ -1729,7 +1729,8 @@
                if ((ber_printf (ber, "{") < 0) ||
                    (ber_printf (ber, "ts", LDAP_TAG_EXOP_MODIFY_PASSWD_ID, 
utf8_dn) < 0) ||
                    (ber_printf (ber, "ts", LDAP_TAG_EXOP_MODIFY_PASSWD_NEW, 
utf8_password) < 0) ||
-                   (ber_printf (ber, "n}") < 0)) {
+                   (!utf8_password && (ber_printf (ber, "n") < 0)) ||
+                   (ber_printf (ber, "}") < 0)) {
                        DEBUG(0,("ldapsam_modify_entry: ber_printf returns a 
value <0\n"));
                        ber_free(ber,1);
                        SAFE_FREE(utf8_dn);

Reply via email to