]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - support/export/nfsctl.c
(more of the previous change)
[nfs-utils.git] / support / export / nfsctl.c
index 6612a76088464f4c5f5fe778aa2e7d7a0317067a..50e2c7953a9db18906c0caf80df382ca323dc623 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <sys/stat.h>
 #include <stdlib.h>
+#include <errno.h>
 #include <string.h>
 #include <ctype.h>
 #include "nfslib.h"
@@ -89,6 +90,12 @@ expsetup(struct nfsctl_export *exparg, nfs_export *exp)
        if (stat(exp->m_export.m_path, &stb) < 0)
                return 0;
 
+       if (exp->m_export.e_maptype != CLE_MAP_IDENT) {
+               xlog(L_ERROR, "%s: unsupported mapping; kernel supports only 'identity' (default)",
+                    exp->m_export.m_path);
+               errno = EINVAL;
+               return 0;
+       }
        memset(exparg, 0, sizeof(*exparg));
        strncpy(exparg->ex_path, exp->m_export.m_path,
                sizeof (exparg->ex_path) - 1);