[SSSD] [PATCH] LDAP: Do not print verbose DEBUG messages from providers that don't set UUID
Jakub Hrozek
jhrozek at redhat.com
Wed Jun 3 15:58:43 UTC 2015
I think ENOENT in this case is better because the caller might (and
does) special-case the value to handle "no UUID" case separately.
-------------- next part --------------
>From 762d47583e799bb956564ead9418a64a8dd494e1 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Wed, 3 Jun 2015 17:57:29 +0200
Subject: [PATCH] LDAP: Do not print verbose DEBUG messages from providers that
don't set UUID
https://fedorahosted.org/sssd/ticket/2666
---
src/db/sysdb_ops.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 9afb0d7d74cdbc91570f4fe6485790d2a4eeb4be..d34583787f1fce9bd07e272ae7549b8bd4f0b7dd 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -3795,7 +3795,12 @@ errno_t sysdb_handle_original_uuid(const char *orig_name,
struct ldb_message_element *el;
char guid_str_buf[GUID_STR_BUF_SIZE];
- if (orig_name == NULL || src_attrs == NULL || src_name == NULL
+ if (orig_name == NULL) {
+ /* This provider doesn't handle UUIDs */
+ return ENOENT;
+ }
+
+ if (src_attrs == NULL || src_name == NULL
|| dest_attrs == NULL || dest_name == NULL) {
return EINVAL;
}
--
2.1.0
More information about the sssd-devel
mailing list