]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:cluster_level.idl: define useful levels for older samba versions
authorStefan Metzmacher <metze@samba.org>
Fri, 7 Aug 2026 11:36:07 +0000 (13:36 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 7 Aug 2026 15:26:30 +0000 (15:26 +0000)
These values are a starting point for implementing upgrades
from older versions. It's unclear if upstream will ever
support upgrades from levels before 4.25, but we
may add support for upgrades from 4.24, so I think
this patch is useful to get upstreamed.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/librpc/idl/cluster_level.idl

index 260feecfd37cb1374b5d5de5cf1c3fbad72ceade..48bfe729dbd9a31f39e068ae9f8fb54113957cc2 100644 (file)
@@ -241,6 +241,32 @@ interface cluster_level
         *    ^ dbvers ^ union      ^ tv_sec         ^ tv_usec ^ major  ^ minor
         */
 
+       /*
+        * It's unclear if upstream will ever support upgrades from levels
+        * before 4.25, but we may add support for upgrades from 4.24.
+        *
+        * For old branches we could start with these levels:
+        * v4-24 => 0.42400  => 0xA5A0
+        * => 0x010000000100000000000000000000000000000000000000A0A50000
+        * v4-23 => 0.42300  => 0xA53C
+        * => 0x0100000001000000000000000000000000000000000000003CA50000
+        * v4-22 => 0.42200  => 0xA4D8
+        * => 0x010000000100000000000000000000000000000000000000D8A40000
+        * v4-21 => 0.42100  => 0xA474
+        * => 0x01000000010000000000000000000000000000000000000074A40000
+        * v4-20 => 0.42000  => 0xA410
+        * => 0x01000000010000000000000000000000000000000000000010A40000
+        */
+       const int CLUSTER_LEVEL_MAJOR_0                 = 0x00000000;
+       const int CLUSTER_LEVEL_MAJOR_0_MINOR_42000     = 42000;
+       const int CLUSTER_LEVEL_MAJOR_0_MINOR_42100     = 42100;
+       const int CLUSTER_LEVEL_MAJOR_0_MINOR_42200     = 42200;
+       const int CLUSTER_LEVEL_MAJOR_0_MINOR_42300     = 42300;
+       const int CLUSTER_LEVEL_MAJOR_0_MINOR_42400     = 42400;
+       /* _MIN and _MAX are not really used yet */
+       const int CLUSTER_LEVEL_MAJOR_0_MINOR_MIN       = 0;
+       const int CLUSTER_LEVEL_MAJOR_0_MINOR_MAX       = 0;
+
        const int CLUSTER_LEVEL_MAJOR_1                 = 0x00000001;
        const int CLUSTER_LEVEL_MAJOR_1_MINOR_0         = 0x00000000;
        const int CLUSTER_LEVEL_MAJOR_1_MINOR_MIN       =