]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mountd/mountd.c
Error check messages sent to the kernel.
[nfs-utils.git] / utils / mountd / mountd.c
index 08f294d95ac71488d2ec2b71ecb1db43670d8559..72332ce7772ad559519516293b5dedcec47b3349 100644 (file)
@@ -29,7 +29,7 @@
 
 extern void    cache_open(void);
 extern struct nfs_fh_len *cache_get_filehandle(nfs_export *exp, int len, char *p);
-extern void cache_export(nfs_export *exp);
+extern int cache_export(nfs_export *exp);
 
 extern void my_svc_run(void);
 
@@ -416,7 +416,10 @@ get_rootfh(struct svc_req *rqstp, dirpath *path, mountstat3 *error, int v3)
                 */
                struct nfs_fh_len  *fh;
 
-               cache_export(exp);
+               if (cache_export(exp)) {
+                       *error = NFSERR_ACCES;
+                       return NULL;
+               }
                fh = cache_get_filehandle(exp, v3?64:32, p);
                if (fh == NULL) 
                        *error = NFSERR_ACCES;