]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
drs_utils: Check for presence of more_flags attribute directly
authorJennifer Sutton <jennifersutton@catalyst.net.nz>
Mon, 13 Jan 2025 23:08:26 +0000 (12:08 +1300)
committerJo Sutton <jsutton@samba.org>
Mon, 26 May 2025 02:41:36 +0000 (02:41 +0000)
This more directly indicates what we are trying to achieve.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15852

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/drs_utils.py

index 4b7fdacd846887be99f34c6de51dbbc0f8be700d..beef4f8ada618f9a96630d9cd7464276c4f78479 100644 (file)
@@ -201,15 +201,15 @@ class drs_Replicate(object):
         self.replication_state = self.net.replicate_init(self.samdb, lp, self.drs, invocation_id)
         self.more_flags = 0
 
-    def _should_retry_with_get_tgt(self, error_code, req):
+    @staticmethod
+    def _should_retry_with_get_tgt(error_code, req):
 
         # If the error indicates we fail to resolve a target object for a
         # linked attribute, then we should retry the request with GET_TGT
         # (if we support it and haven't already tried that)
-        supports_ext = self.supports_ext
 
         return (error_code == werror.WERR_DS_DRA_RECYCLED_TARGET and
-                supports_ext & DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10 and
+                hasattr(req, "more_flags") and
                 (req.more_flags & drsuapi.DRSUAPI_DRS_GET_TGT) == 0)
 
     @staticmethod