Misc patches to HEAD

Cody R. Nivens cnivens at cs.usfca.edu
Thu Dec 27 19:42:03 GMT 2001


These are some patches that I have to compile the HEAD code on a newly
installed Redhat 7.2.  I compile with ldapsam, krb5 and ssl.

The first two deal with ssl problems as the ssl.h file includes asn1.h
from openssl.  This causes a substitution in the header file from the
entries in include/asn1.h.  If they are removed, libsmb/asn1.h does not
compile.  Not an eligant solution, but it works.

The passwd/pdb_ldap.c patch is to be able to add an account using
smbpasswd.  Without it, I have to add the account to ldap by hand then run
smbpasswd.  Machines are not added correctly.  With it, I do not have to
add the account to ldap first and machine accounts have the W flag set
correctly.

The last is so that I can set the ldap password in the secretes database.
While I can see that giving a message if ldapsam is not defined, at least
it should be correct syntax before it barfs.

--- samba/source/include/asn1.h	Tue Nov 20 00:51:22 2001
+++ samba.head/source/include/asn1.h	Thu Dec 20 07:55:26 2001
@@ -39,11 +39,7 @@
 #define ASN1_SEQUENCE(x) ((x)+0x30)
 #define ASN1_CONTEXT(x) ((x)+0xa0)
 #define ASN1_GENERAL_STRING 0x1b
-#define ASN1_OCTET_STRING 0x4
 #define ASN1_OID 0x6
-#define ASN1_BOOLEAN 0x1
-#define ASN1_INTEGER 0x2
-#define ASN1_ENUMERATED 0xa

 #define ASN1_MAX_OIDS 20

--- samba/source/libsmb/asn1.c	Tue Nov 20 00:46:02 2001
+++ samba.head/source/libsmb/asn1.c	Thu Dec 20 07:55:25 2001
@@ -21,6 +21,11 @@

 #include "includes.h"

+#define ASN1_OCTET_STRING 0x4
+#define ASN1_BOOLEAN 0x1
+#define ASN1_INTEGER 0x2
+#define ASN1_ENUMERATED 0xa
+
 /* free an asn1 structure */
 void asn1_free(ASN1_DATA *data)
 {
--- samba/source/passdb/pdb_ldap.c	Wed Dec 26 22:38:04 2001
+++ samba.head/source/passdb/pdb_ldap.c	Thu Dec 27 18:15:37 2001
@@ -1002,8 +1002,11 @@
 	}
 	else
 	{
-		DEBUG (3, ("More than one user with that uid exists: bailing out!\n"));
-		return False;
+                if (ldap_count_entries(ldap_struct, result) != 0)
+                {
+	                DEBUG (3, ("More than one user with that uid exists: bailing out!\n"));
+                        return False;
+                }
 	}

 	ldap_msgfree(result);
--- samba/source/utils/smbpasswd.c	Fri Dec 14 06:35:38 2001
+++ samba.head/source/utils/smbpasswd.c	Thu Dec 27 18:26:09 2001
@@ -214,7 +214,7 @@

 	user_name[0] = '\0';

-	while ((ch = getopt(argc, argv, "axdehmnijr:swR:D:U:L")) != EOF) {
+	while ((ch = getopt(argc, argv, "axdehmnijr:sw:R:D:U:L")) != EOF) {
 		switch(ch) {
 		case 'L':
 			local_mode = True;

-- 
Cody R. Nivens, L. Ac.
Sciences System Administrator
Arts & Sciences, University of San Francisco, CA, USA
(415) 422-2810





More information about the samba-technical mailing list