]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Imported Debian patch 1.0.8-9 debian/1%1.0.8-9
authorAnibal Monsalve Salazar <anibal@debian.org>
Sat, 1 Jul 2006 12:30:11 +0000 (22:30 +1000)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 14 Jul 2010 01:30:16 +0000 (02:30 +0100)
debian/changelog
utils/gssd/svcgssd_proc.c

index 3af26db72ac807ec41e3e18c67034b6d205dd4ea..168e62081675dba269460d79392dcfa7f5d5451f 100644 (file)
@@ -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 <anibal@debian.org>  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
index b3a6ae8cda53d351e2a236867094564e9df89b33..3d67dc678b7f45fc8bdd63b328f28a7eddc3dafa 100644 (file)
@@ -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;