]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Automatically set 'nohide' on referral exports.
authorSteve Dickson <steved@redhat.com>
Wed, 9 Jan 2008 18:13:31 +0000 (13:13 -0500)
committerSteve Dickson <steved@redhat.com>
Wed, 9 Jan 2008 18:13:31 +0000 (13:13 -0500)
Signed-off-by: Steve Dickson <steved@redhat.com>
support/nfs/exports.c
utils/mountd/cache.c

index 6b567081123edee90f976fd508847df6381ff4c6..525e5b1d4286c997dcdb6f7e30daa7c0d8e02e0d 100644 (file)
@@ -641,6 +641,12 @@ bad_option:
                while (isblank(*cp))
                        cp++;
        }
                while (isblank(*cp))
                        cp++;
        }
+       /*
+        * Turn on nohide which will allow this export to cross over
+        * the 'mount --bind' mount point.
+        */
+       if (ep->e_fslocdata)
+               ep->e_flags |= NFSEXP_NOHIDE;
 
        for (p = ep->e_secinfo; p->flav; p++)
                p->flags |= ep->e_flags & ~NFSEXP_SECINFO_FLAGS;
 
        for (p = ep->e_secinfo; p->flav; p++)
                p->flags |= ep->e_flags & ~NFSEXP_SECINFO_FLAGS;
index fd317cdc40fc16c9744de0dded6b84442c001d6e..02454ac62655043b2c6d4d4da93211760465278e 100644 (file)
@@ -81,6 +81,8 @@ void auth_unix_ip(FILE *f)
        if (readline(fileno(f), &lbuf, &lbuflen) != 1)
                return;
 
        if (readline(fileno(f), &lbuf, &lbuflen) != 1)
                return;
 
+       xlog(D_CALL, "auth_unix_ip: inbuf '%s'", lbuf);
+
        cp = lbuf;
 
        if (qword_get(&cp, class, 20) <= 0 ||
        cp = lbuf;
 
        if (qword_get(&cp, class, 20) <= 0 ||
@@ -109,6 +111,7 @@ void auth_unix_ip(FILE *f)
        else if (client)
                qword_print(f, *client?client:"DEFAULT");
        qword_eol(f);
        else if (client)
                qword_print(f, *client?client:"DEFAULT");
        qword_eol(f);
+       xlog(D_CALL, "auth_unix_ip: client %p '%s'", client, *client?client: "DEFAULT");
 
        if (client) free(client);
        free(he);
 
        if (client) free(client);
        free(he);
@@ -282,8 +285,10 @@ void nfsd_fh(FILE *f)
        if (readline(fileno(f), &lbuf, &lbuflen) != 1)
                return;
 
        if (readline(fileno(f), &lbuf, &lbuflen) != 1)
                return;
 
-       cp = lbuf;
+       xlog(D_CALL, "nfsd_fh: inbuf '%s'", lbuf);
 
 
+       cp = lbuf;
+       
        dom = malloc(strlen(cp));
        if (dom == NULL)
                return;
        dom = malloc(strlen(cp));
        if (dom == NULL)
                return;
@@ -514,6 +519,7 @@ void nfsd_fh(FILE *f)
        free(found_path);
        free(he);
        free(dom);
        free(found_path);
        free(he);
        free(dom);
+       xlog(D_CALL, "nfsd_fh: found %p path %s", found, found ? found->e_path : NULL);
        return;         
 }
 
        return;         
 }
 
@@ -607,6 +613,8 @@ void nfsd_export(FILE *f)
        if (readline(fileno(f), &lbuf, &lbuflen) != 1)
                return;
 
        if (readline(fileno(f), &lbuf, &lbuflen) != 1)
                return;
 
+       xlog(D_CALL, "nfsd_export: inbuf '%s'", lbuf);
+
        cp = lbuf;
        dom = malloc(strlen(cp));
        path = malloc(strlen(cp));
        cp = lbuf;
        dom = malloc(strlen(cp));
        path = malloc(strlen(cp));
@@ -686,6 +694,7 @@ void nfsd_export(FILE *f)
                dump_to_cache(f, dom, path, NULL);
        }
  out:
                dump_to_cache(f, dom, path, NULL);
        }
  out:
+       xlog(D_CALL, "nfsd_export: found %p path %s", found, path ? path : NULL);
        if (dom) free(dom);
        if (path) free(path);
        if (he) free(he);
        if (dom) free(dom);
        if (path) free(path);
        if (he) free(he);