]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/idmapd/idmapd.c
rpc.idmapd should tell the user more verbosely if Dnotify
[nfs-utils.git] / utils / idmapd / idmapd.c
index 355c6e100c28c251c768cc8e8bb4ff2f23119f33..c1cf4eb40e09471a5ff3c58141b2bb276c3881c5 100644 (file)
@@ -342,9 +342,11 @@ main(int argc, char **argv)
                        xlog_err("main: fcntl(%s): %s", pipefsdir, strerror(errno));
 
                if (fcntl(fd, F_NOTIFY,
-                       DN_CREATE | DN_DELETE | DN_MODIFY | DN_MULTISHOT) == -1)
+                       DN_CREATE | DN_DELETE | DN_MODIFY | DN_MULTISHOT) == -1) {
                        xlog_err("main: fcntl(%s): %s", pipefsdir, strerror(errno));
-
+                       if (errno == EINVAL)
+                               xlog_err("main: Possibly no Dnotify support in kernel.");
+               }
                TAILQ_INIT(&icq);
 
                /* These events are persistent */
@@ -848,7 +850,7 @@ validateascii(char *string, u_int32_t len)
                        return (-1);
        }
 
-       if (string[i] != '\0')
+       if ((i >= len) || string[i] != '\0')
                return (-1);
 
        return (i + 1);