]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blobdiff - net/sunrpc/auth_gss/svcauth_gss.c
sunrpc: svcauth_gss_register_pseudoflavor must reject duplicate registrations.
[mirror_ubuntu-kernels.git] / net / sunrpc / auth_gss / svcauth_gss.c
index 50d93c49ef1af670a0cd5bd82a4d69abaa926740..49bb346a62154734e002682e4f56046dcea6a7d0 100644 (file)
@@ -826,9 +826,11 @@ svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name)
        new->h.flavour = &svcauthops_gss;
        new->pseudoflavor = pseudoflavor;
 
-       stat = 0;
        test = auth_domain_lookup(name, &new->h);
-       if (test != &new->h) { /* Duplicate registration */
+       if (test != &new->h) {
+               pr_warn("svc: duplicate registration of gss pseudo flavour %s.\n",
+                       name);
+               stat = -EADDRINUSE;
                auth_domain_put(test);
                kfree(new->h.name);
                goto out_free_dom;