From 37a6d1755af236449987de6e5acb42d4b96b09ed Mon Sep 17 00:00:00 2001 From: Anibal Monsalve Salazar Date: Sat, 1 Jul 2006 22:30:11 +1000 Subject: [PATCH] Imported Debian patch 1.0.8-9 --- debian/changelog | 8 ++++++++ utils/gssd/svcgssd_proc.c | 15 +++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/debian/changelog b/debian/changelog index 3af26db..168e620 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +nfs-utils (1:1.0.8-9) unstable; urgency=high + + * svcgssd_proc.c: Temporary patch to do default mapping if we get an + error while trying to map a gss principal to the appropriate uid/gid. + This currently returns hardcoded values. Closes: #376258. + + -- Anibal Monsalve Salazar Sat, 01 Jul 2006 22:30:11 +1000 + nfs-utils (1:1.0.8-8) unstable; urgency=low * Include yet more ucf md5sums for /etc/default/nfs-common and diff --git a/utils/gssd/svcgssd_proc.c b/utils/gssd/svcgssd_proc.c index b3a6ae8..3d67dc6 100644 --- a/utils/gssd/svcgssd_proc.c +++ b/utils/gssd/svcgssd_proc.c @@ -222,6 +222,21 @@ get_ids(gss_name_t client_name, gss_OID mech, struct svc_cred *cred) if (res < 0) { printerr(0, "WARNING: get_ids: unable to map " "name '%s' to a uid\n", sname); + /* + * -ENOENT means there was no mapping, any other error + * value means there was an error trying to do the + * mapping. + */ + if (res == -ENOENT) { + cred->cr_uid = -2; /* XXX */ + cred->cr_gid = -2; /* XXX */ + cred->cr_groups[0] = -2;/* XXX */ + cred->cr_ngroups = 1; + res = 0; + goto out_free; + } + printerr(0, "WARNING: get_ids: failed to map name '%s' " + "to uid/gid: %s\n", sname, strerror(-res)); goto out_free; } cred->cr_uid = uid; -- 2.39.2