s4-drs: add defines for replication flags on attributes
authorAndrew Tridgell <tridge@samba.org>
Thu, 24 Sep 2009 14:19:01 +0000 (07:19 -0700)
committerAndrew Tridgell <tridge@samba.org>
Thu, 24 Sep 2009 17:37:24 +0000 (10:37 -0700)
libds/common/flags.h
source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index dfdd603a1546ad4e2d8cf968b3b0af218ef081fd..fb90e6614eeb5831ddf4bea97d47d08df77bff5b 100644 (file)
 #define DS_DC_FUNCTION_2008            3
 #define DS_DC_FUNCTION_2008_R2         4
 
+/* sa->systemFlags on attributes */
+#define DS_FLAG_ATTR_NOT_REPLICATED    0x00000001
+#define DS_FLAG_ATTR_IS_CONSTRUCTED    0x00000004
index df399e24f096500746140833a7d0603292c5cb1d..f07dc1411b2e74a5c530f61c2c6ae143323dc436 100644 (file)
@@ -567,7 +567,7 @@ static int replmd_add(struct ldb_module *module, struct ldb_request *req)
                        return LDB_ERR_NO_SUCH_ATTRIBUTE;
                }
 
-               if ((sa->systemFlags & 0x00000001) || (sa->systemFlags & 0x00000004)) {
+               if ((sa->systemFlags & DS_FLAG_ATTR_NOT_REPLICATED) || (sa->systemFlags & DS_FLAG_ATTR_IS_CONSTRUCTED)) {
                        /* if the attribute is not replicated (0x00000001)
                         * or constructed (0x00000004) it has no metadata
                         */
@@ -689,10 +689,7 @@ static int replmd_update_rpmd_element(struct ldb_context *ldb,
                return LDB_ERR_OPERATIONS_ERROR;
        }
 
-       if ((a->systemFlags & 0x00000001) || (a->systemFlags & 0x00000004)) {
-               /* if the attribute is not replicated (0x00000001)
-                * or constructed (0x00000004) it has no metadata
-                */
+       if ((a->systemFlags & DS_FLAG_ATTR_NOT_REPLICATED) || (a->systemFlags & DS_FLAG_ATTR_IS_CONSTRUCTED)) {
                return LDB_SUCCESS;
        }