Răsfoiți Sursa

Ticket 48263 - allow plugins to detect tombstone operations

Bug Description:  if plugins do not want op operate on
                  tombstone operations there should be an easy
                  method to check taht it is a tombstone op

Fix Description:  expose the OP_FLAG_IS_TOMBSTONE in the public slapi-plugin.h

https://fedorahosted.org/389/ticket/48263

Reviewed by: Rich, thanks
Ludwig Krispenz 10 ani în urmă
părinte
comite
d2b3236ecf
2 a modificat fișierele cu 5 adăugiri și 4 ștergeri
  1. 4 3
      ldap/servers/slapd/slapi-plugin.h
  2. 1 1
      ldap/servers/slapd/slapi-private.h

+ 4 - 3
ldap/servers/slapd/slapi-plugin.h

@@ -194,10 +194,11 @@ NSPR_API(PRUint32) PR_fprintf(struct PRFileDesc* fd, const char *fmt, ...)
 /* operation flags */
 #define SLAPI_OP_FLAG_INTERNAL		0x000020 /* An operation generated by the core server or a plugin. */
 #define SLAPI_OP_FLAG_NEVER_CHAIN	0x000800 /* Do not chain the operation */
-#define SLAPI_OP_FLAG_NO_ACCESS_CHECK	0x10000 /* Do not check for access control - bypass them */
-#define SLAPI_OP_FLAG_BYPASS_REFERRALS	0x40000 /* Useful for performing internal operations on read-only replica */
+#define SLAPI_OP_FLAG_TOMBSTONE_ENTRY	0x001000 /* Operation is done on a tombstone entry */
+#define SLAPI_OP_FLAG_NO_ACCESS_CHECK	0x010000 /* Do not check for access control - bypass them */
+#define SLAPI_OP_FLAG_BYPASS_REFERRALS	0x040000 /* Useful for performing internal operations on read-only replica */
 #define SLAPI_OP_FLAG_NEVER_CACHE	0x200000 /* added entry should not be kept in cache */
-#define SLAPI_OP_FLAG_IGNORE_UNINDEXED		0x800000 /* Do not log unindexed search */
+#define SLAPI_OP_FLAG_IGNORE_UNINDEXED	0x800000 /* Do not log unindexed search */
 
 #define SLAPI_OC_FLAG_REQUIRED	0x0001
 #define SLAPI_OC_FLAG_ALLOWED	0x0002

+ 1 - 1
ldap/servers/slapd/slapi-private.h

@@ -392,7 +392,7 @@ char *slapi_filter_to_string_internal( const struct slapi_filter *f, char *buf,
 #define OP_FLAG_ACTION_LOG_CHANGES       0x000200
 #define OP_FLAG_ACTION_INVOKE_FOR_REPLOP 0x000400
 #define OP_FLAG_NEVER_CHAIN              SLAPI_OP_FLAG_NEVER_CHAIN  /* 0x000800 */
-#define OP_FLAG_TOMBSTONE_ENTRY          0x001000
+#define OP_FLAG_TOMBSTONE_ENTRY          SLAPI_OP_FLAG_TOMBSTONE_ENTRY /* 0x001000 */
 #define OP_FLAG_RESURECT_ENTRY           0x002000
 #define OP_FLAG_LEGACY_REPLICATION_DN    0x004000 /* Operation done by legacy
                                                   * replication DN