From 981649cf78bf952387b70d4eb67754fdead16354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20L=C3=B3pez?= Date: Wed, 4 Oct 2023 19:59:45 +0200 Subject: [PATCH] NSS: Replace notification message by a less scary one Replace the message "Unable to find primary gid" by another one that sounds less scary and is a little bit clearer for users. --- src/responder/nss/nss_protocol_grent.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/responder/nss/nss_protocol_grent.c b/src/responder/nss/nss_protocol_grent.c index e0e56cd65ad..887501ab3cc 100644 --- a/src/responder/nss/nss_protocol_grent.c +++ b/src/responder/nss/nss_protocol_grent.c @@ -19,6 +19,7 @@ */ #include "responder/nss/nss_protocol.h" +#include "util/sss_format.h" static errno_t sss_nss_get_grent(TALLOC_CTX *mem_ctx, @@ -402,9 +403,16 @@ sss_nss_protocol_fill_initgr(struct sss_nss_ctx *nss_ctx, ret = sysdb_search_group_by_origgid(NULL, domain, orig_gid, NULL, &primary_group_msg); if (ret != EOK) { - DEBUG((ret == ENOENT ? SSSDBG_FUNC_DATA : SSSDBG_MINOR_FAILURE), - "Unable to find primary gid [%d]: %s\n", - ret, sss_strerror(ret)); + if (ret == ENOENT) { + DEBUG(SSSDBG_FUNC_DATA, + "There is no override for group %" SPRIgid "\n", + orig_gid); + } else { + DEBUG(SSSDBG_MINOR_FAILURE, + "Unable to find the original group id attribute for %" SPRIgid + ". Assuming there is none. [%d] %s\n", + orig_gid, ret, sss_strerror(ret)); + } /* Just continue with what we have. */ } else { orig_gid = ldb_msg_find_attr_as_uint64(primary_group_msg, SYSDB_GIDNUM,