[389-commits] Branch '389-ds-base-1.3.2' - 2 commits - ldap/admin ldap/schema ldap/servers

Richard Allen Megginson rmeggins at fedoraproject.org
Thu Dec 19 21:17:32 UTC 2013


 ldap/admin/src/scripts/60upgradeschemafiles.pl |    2 +-
 ldap/schema/60rfc3712.ldif                     |    9 +--------
 ldap/servers/slapd/schema.c                    |   20 +++++++++++++++++++-
 ldap/servers/slapd/slapi-plugin.h              |   18 ++++++++++++++++++
 4 files changed, 39 insertions(+), 10 deletions(-)

New commits:
commit 192986918fe21203564c9e3fd622d2fcc35a6b22
Author: Rich Megginson <rmeggins at redhat.com>
Date:   Thu Dec 19 10:50:54 2013 -0700

    Ticket #47647 remove bogus definition in 60rfc3712.ldif
    
    https://fedorahosted.org/389/ticket/47647
    Reviewed by: nhosoi (Thanks!)
    Branch: 389-ds-base-1.3.2
    Fix Description: Remove the bogus schema definition.  Add 60rfc3712.ldif to
    the schema upgrade script.
    Platforms tested: RHEL6 x86_64
    Flag Day: no
    Doc impact: no
    (cherry picked from commit 2d4dc977f64615afcdc1ebbed47a85a7079e6072)

diff --git a/ldap/admin/src/scripts/60upgradeschemafiles.pl b/ldap/admin/src/scripts/60upgradeschemafiles.pl
index 1208f4d..ba574a5 100644
--- a/ldap/admin/src/scripts/60upgradeschemafiles.pl
+++ b/ldap/admin/src/scripts/60upgradeschemafiles.pl
@@ -11,7 +11,7 @@ sub runinst {
 
     # these schema files are obsolete, or we want to replace
     # them with newer versions
-    my @toremove = qw(00core.ldif 01core389.ldif 01common.ldif 02common.ldif 05rfc2247.ldif 05rfc4523.ldif 05rfc4524.ldif 06inetorgperson.ldif 10presence.ldif 28pilot.ldif 30ns-common.ldif 50ns-directory.ldif 60mozilla.ldif 60pam-plugin.ldif 60sudo.ldif);
+    my @toremove = qw(00core.ldif 01core389.ldif 01common.ldif 02common.ldif 05rfc2247.ldif 05rfc4523.ldif 05rfc4524.ldif 06inetorgperson.ldif 10presence.ldif 28pilot.ldif 30ns-common.ldif 50ns-directory.ldif 60mozilla.ldif 60pam-plugin.ldif 60sudo.ldif 60rfc3712.ldif);
 
     # these hashes will be used to check for obsolete schema
     # in 99user.ldif
diff --git a/ldap/schema/60rfc3712.ldif b/ldap/schema/60rfc3712.ldif
index 4917998..9fc2938 100644
--- a/ldap/schema/60rfc3712.ldif
+++ b/ldap/schema/60rfc3712.ldif
@@ -420,14 +420,7 @@ attributeTypes: (
   )
 #
 ################################################################################
-#
-objectClasses: (
-  
-  NAME 'printer-uri'
-  DESC 'A URI supported by this printer.'
-  X-ORIGIN 'rfc3712'
-  )
-#
+# objectClass slpServicePrinter not currently supported
 ################################################################################
 #
 objectClasses: (


commit db82603ae21530ab018b5fd96db4ce9660d3554a
Author: Rich Megginson <rmeggins at redhat.com>
Date:   Thu Dec 19 10:49:27 2013 -0700

    Ticket #47634 support AttributeTypeDescription USAGE userApplications distributedOperation dSAOperation
    
    https://fedorahosted.org/389/ticket/47634
    Reviewed by: nhosoi (Thanks!)
    Branch: 389-ds-base-1.3.2
    Fix Description: When reading schema, flag the attribute as distributedOperation
    or dSAOperation.  When writing schema, make sure the USAGE is specified
    correctly based on the flag.
    Platforms tested: RHEL6 x86_64
    Flag Day: no
    Doc impact: no
    (cherry picked from commit ee7565f846bbae008d9d71c80ca0db0c33fdc384)

diff --git a/ldap/servers/slapd/schema.c b/ldap/servers/slapd/schema.c
index 6245680..ff0f3d8 100644
--- a/ldap/servers/slapd/schema.c
+++ b/ldap/servers/slapd/schema.c
@@ -1417,7 +1417,11 @@ schema_attr_enum_callback(struct asyntaxinfo *asip, void *arg)
 		if (asip->asi_flags & SLAPI_ATTR_FLAG_NOUSERMOD ) {
 			outp += strcpy_count( outp, 1 + schema_nousermod_with_spaces );
 		}
-		if (asip->asi_flags & SLAPI_ATTR_FLAG_OPATTR) {
+		if (asip->asi_flags & SLAPI_ATTR_FLAG_DISTRIBUTED_OPERATION) {
+			outp += strcpy_count(outp, "USAGE distributedOperation ");
+		} else if (asip->asi_flags & SLAPI_ATTR_FLAG_DSA_OPERATION) {
+			outp += strcpy_count(outp, "USAGE dSAOperation ");
+		} else if (asip->asi_flags & SLAPI_ATTR_FLAG_OPATTR) {
 			outp += strcpy_count(outp, "USAGE directoryOperation ");
 		}
 
@@ -3527,6 +3531,14 @@ read_at_ldif(const char *input, struct asyntaxinfo **asipp, char *errorbuf,
                     strlen("directoryOperation"))) {
                 flags |= SLAPI_ATTR_FLAG_OPATTR;
             }
+            if ( !PL_strncmp(ss, "distributedOperation",
+                    strlen("distributedOperation"))) {
+                flags |= SLAPI_ATTR_FLAG_OPATTR|SLAPI_ATTR_FLAG_DISTRIBUTED_OPERATION;
+            }
+            if ( !PL_strncmp(ss, "dSAOperation",
+                    strlen("dSAOperation"))) {
+                flags |= SLAPI_ATTR_FLAG_OPATTR|SLAPI_ATTR_FLAG_DSA_OPERATION;
+            }
             if ( NULL == ( nextinput = strchr( ss, ' ' ))) {
                 nextinput = ss + strlen(ss);
             }
@@ -3861,6 +3873,12 @@ parse_attr_str(const char *input, struct asyntaxinfo **asipp, char *errorbuf,
     if(atype->at_usage == LDAP_SCHEMA_DIRECTORY_OPERATION){
         flags |= SLAPI_ATTR_FLAG_OPATTR;
     }
+    if(atype->at_usage == LDAP_SCHEMA_DISTRIBUTED_OPERATION){
+        flags |= SLAPI_ATTR_FLAG_OPATTR|SLAPI_ATTR_FLAG_DISTRIBUTED_OPERATION;
+    }
+    if(atype->at_usage == LDAP_SCHEMA_DSA_OPERATION){
+        flags |= SLAPI_ATTR_FLAG_OPATTR|SLAPI_ATTR_FLAG_DSA_OPERATION;
+    }
     /*
      * Check the superior, and use it fill in any missing oids on this attribute
      */
diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h
index b835e90..bb384f4 100644
--- a/ldap/servers/slapd/slapi-plugin.h
+++ b/ldap/servers/slapd/slapi-plugin.h
@@ -198,6 +198,24 @@ NSPR_API(PRUint32) PR_fprintf(struct PRFileDesc* fd, const char *fmt, ...)
  */
 #define SLAPI_ATTR_FLAG_NOEXPOSE	0x0800	/* the attr value is not exposed */
 
+/**
+ * Flag to indicate that the attribute value is LDAP_SCHEMA_DISTRIBUTED_OPERATION
+ * If this is set, SLAPI_ATTR_FLAG_OPATTR must also be set
+ *
+ * \see slapi_value_set_flags()
+ * \see slapi_values_set_flags()
+*/
+#define SLAPI_ATTR_FLAG_DISTRIBUTED_OPERATION	0x1000	/* USAGE distributedOperation */
+
+/**
+ * Flag to indicate that the attribute value is LDAP_SCHEMA_DSA_OPERATION
+ * If this is set, SLAPI_ATTR_FLAG_OPATTR must also be set
+ *
+ * \see slapi_value_set_flags()
+ * \see slapi_values_set_flags()
+ */
+#define SLAPI_ATTR_FLAG_DSA_OPERATION	0x2000	/* USAGE dSAOperation */
+
 /* operation flags */
 #define SLAPI_OP_FLAG_INTERNAL		0x00020 /* An operation generated by the core server or a plugin. */
 #define SLAPI_OP_FLAG_NEVER_CHAIN	0x00800 /* Do not chain the operation */	




More information about the 389-commits mailing list