s3:registry: rename REGVE_Vx toREGDB_VERSION_Vx for consistency
authorMichael Adam <obnox@samba.org>
Thu, 1 Sep 2011 22:07:58 +0000 (00:07 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 2 Sep 2011 08:17:19 +0000 (10:17 +0200)
source3/registry/reg_backend_db.c
source3/registry/reg_db.h

index 0218f05337754cdad4878f3173ebe2fc78615f94..2a177058340f9f561d47430039103b23662a6c75 100644 (file)
@@ -73,11 +73,11 @@ static NTSTATUS regdb_trans_do_action(struct db_context *db, void *private_data)
 
        version_id = dbwrap_fetch_int32(db, REGDB_VERSION_KEYNAME);
 
-       if (version_id != REGVER_V3) {
+       if (version_id != REGDB_VERSION_V3) {
                DEBUG(0, ("ERROR: changed registry version %d found while "
                          "trying to write to the registry. Version %d "
                          "expected.  Denying access.\n",
-                         version_id, REGVER_V3));
+                         version_id, REGDB_VERSION_V3));
                return NT_STATUS_ACCESS_DENIED;
        }
 
@@ -501,7 +501,7 @@ static WERROR regdb_upgrade_v1_to_v2(struct db_context *db)
                return WERR_REG_IO_FAILURE;
        }
 
-       werr = regdb_store_regdb_version(db, REGVER_V2);
+       werr = regdb_store_regdb_version(db, REGDB_VERSION_V2);
        return werr;
 }
 
@@ -606,7 +606,7 @@ static WERROR regdb_upgrade_v2_to_v3(struct db_context *db)
                goto done;
        }
 
-       werr = regdb_store_regdb_version(db, REGVER_V3);
+       werr = regdb_store_regdb_version(db, REGDB_VERSION_V3);
 
 done:
        return werr;
@@ -647,7 +647,7 @@ WERROR regdb_init(void)
        DEBUG(10, ("regdb_init: registry db openend. refcount reset (%d)\n",
                   regdb_refcount));
 
-       expected_version = REGVER_V3;
+       expected_version = REGDB_VERSION_V3;
 
        vers_id = dbwrap_fetch_int32(regdb, REGDB_VERSION_KEYNAME);
        if (vers_id == -1) {
@@ -670,9 +670,9 @@ WERROR regdb_init(void)
                return WERR_REG_IO_FAILURE;
        }
 
-       if (vers_id == REGVER_V1) {
+       if (vers_id == REGDB_VERSION_V1) {
                DEBUG(10, ("regdb_init: upgrading registry fromversion %d "
-                          "to %d\n", REGVER_V1, REGVER_V2));
+                          "to %d\n", REGDB_VERSION_V1, REGDB_VERSION_V2));
 
                werr = regdb_upgrade_v1_to_v2(regdb);
                if (!W_ERROR_IS_OK(werr)) {
@@ -680,12 +680,12 @@ WERROR regdb_init(void)
                        return werr;
                }
 
-               vers_id = REGVER_V2;
+               vers_id = REGDB_VERSION_V2;
        }
 
-       if (vers_id == REGVER_V2) {
+       if (vers_id == REGDB_VERSION_V2) {
                DEBUG(10, ("regdb_init: upgrading registry from version %d "
-                          "to %d\n", REGVER_V2, REGVER_V3));
+                          "to %d\n", REGDB_VERSION_V2, REGDB_VERSION_V3));
 
                werr = regdb_upgrade_v2_to_v3(regdb);
                if (!W_ERROR_IS_OK(werr)) {
@@ -693,7 +693,7 @@ WERROR regdb_init(void)
                        return werr;
                }
 
-               vers_id = REGVER_V3;
+               vers_id = REGDB_VERSION_V3;
        }
 
        /* future upgrade code should go here */
index b77e45aaca04b24fa2ef8b5abf7a21186e5e15b1..9782c1eab4cef3346c7e1d4ec9920be2487d6f5f 100644 (file)
 
 #define REG_TDB_FLAGS   TDB_SEQNUM
 
-#define REGVER_V1       1       /* first db version with write support */
-#define REGVER_V2       2       /* version 2 with normalized keys */
-#define REGVER_V3      3       /* different definition of key existence, */
-                               /* sorted subkeys cache removed. */
+#define REGDB_VERSION_V1    1  /* first db version with write support */
+#define REGDB_VERSION_V2    2  /* version 2 with normalized keys */
+#define REGDB_VERSION_V3    3  /* different definition of key existence, */
+                               /* sorted subkeys cache removed. */
 
 #define REG_VALUE_PREFIX    "SAMBA_REGVAL"
 #define REG_SECDESC_PREFIX  "SAMBA_SECDESC"