]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:tldap: add tldap_msg_rc() helper
authorStefan Metzmacher <metze@samba.org>
Tue, 11 Feb 2025 11:45:06 +0000 (12:45 +0100)
committerRalph Boehme <slow@samba.org>
Sat, 22 Feb 2025 16:00:36 +0000 (16:00 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/include/tldap.h
source3/lib/tldap.c

index c4275cf3985cbaa00e50a52ac395f68c8cc7c3b3..d5e19fba6eca3f12f80c252872dcec2e26f3801a 100644 (file)
@@ -284,6 +284,7 @@ TLDAPRC tldap_extended(struct tldap_context *ld,
 
 int tldap_msg_id(const struct tldap_message *msg);
 int tldap_msg_type(const struct tldap_message *msg);
+TLDAPRC tldap_msg_rc(const struct tldap_message *msg);
 const char *tldap_msg_matcheddn(struct tldap_message *msg);
 const char *tldap_msg_diagnosticmessage(struct tldap_message *msg);
 const char *tldap_msg_referral(struct tldap_message *msg);
index 09006f873f09d6a020806d879a0a849c19a25138..f89306d2acd8a5df485e677e59e2e9db59d29bae 100644 (file)
@@ -2801,6 +2801,15 @@ int tldap_msg_type(const struct tldap_message *msg)
        return msg->type;
 }
 
+TLDAPRC tldap_msg_rc(const struct tldap_message *msg)
+{
+       if (msg == NULL) {
+               return TLDAP_LOCAL_ERROR;
+       }
+
+       return msg->lderr;
+}
+
 const char *tldap_msg_matcheddn(struct tldap_message *msg)
 {
        if (msg == NULL) {