Skip to content

Commit

Permalink
NSS: Replace notification message by a less scary one
Browse files Browse the repository at this point in the history
Replace the message "Unable to find primary gid" by another one that
sounds less scary and is a little bit clearer for users.

Reviewed-by: Alexey Tikhonov <[email protected]>
Reviewed-by: Iker Pedrosa <[email protected]>
Reviewed-by: Sumit Bose <[email protected]>
(cherry picked from commit 2c59fd2)
  • Loading branch information
aplopez authored and alexey-tikhonov committed Oct 6, 2023
1 parent df709da commit c6ea805
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/responder/nss/nss_protocol_grent.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit c6ea805

Please sign in to comment.