aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorRichard Sharpe <realrichardsharpe@gmail.com>2019-03-11 13:58:17 -0400
committerSteve Dickson <steved@redhat.com>2019-03-11 13:58:17 -0400
commite5c1eafe8ff74d389b54bbb0b034798f809f69af (patch)
tree2594971a34aff36bcb2fc3be37f8e079f5bc8b6f /utils
parent5394f939b591e65fec37a6bee826c13620d3f39b (diff)
downloadnfs-utils-e5c1eafe8ff74d389b54bbb0b034798f809f69af.tar.gz
nfsindmap: Provide the offending UID/GID/name for which mapping fails
This helps debug what is going on. Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/nfsidmap/nfsidmap.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/nfsidmap/nfsidmap.c b/utils/nfsidmap/nfsidmap.c
index d3967a3a..fc00da7a 100644
--- a/utils/nfsidmap/nfsidmap.c
+++ b/utils/nfsidmap/nfsidmap.c
@@ -205,8 +205,9 @@ static int id_lookup(char *name_at_domain, key_serial_t key, int type)
sprintf(id, "%u", gid);
}
if (rc < 0) {
- xlog_errno(rc, "id_lookup: %s: failed: %m",
- (type == USER ? "nfs4_owner_to_uid" : "nfs4_group_owner_to_gid"));
+ xlog_errno(rc, "id_lookup: %s: for %s failed: %m",
+ (type == USER ? "nfs4_owner_to_uid" : "nfs4_group_owner_to_gid"),
+ name_at_domain);
return EXIT_FAILURE;
}
@@ -262,8 +263,9 @@ static int name_lookup(char *id, key_serial_t key, int type)
rc = nfs4_gid_to_name(gid, domain, name, IDMAP_NAMESZ);
}
if (rc) {
- xlog_errno(rc, "name_lookup: %s: failed: %m",
- (type == USER ? "nfs4_uid_to_name" : "nfs4_gid_to_name"));
+ xlog_errno(rc, "name_lookup: %s: for %u failed: %m",
+ (type == USER ? "nfs4_uid_to_name" : "nfs4_gid_to_name"),
+ (type == USER ? uid : gid));
return EXIT_FAILURE;
}