2 * UNFS3 export controls
3 * (C) 2003, Pascal Schmidt
4 * see file LICENSE for license details
7 #ifndef UNFS3_EXPORTS_H
8 #define UNFS3_EXPORTS_H
10 #include "../mount.h" /* exports type */
12 #define OPT_NO_ROOT_SQUASH 1
13 #define OPT_ALL_SQUASH 2
15 #define OPT_REMOVABLE 8
16 #define OPT_INSECURE 16
18 #define PASSWORD_MAXLEN 64
20 #define ANON_NOTSPECIAL 0xffffffff
22 extern exports exports_nfslist;
24 extern int exports_opts;
25 const char *export_path;
26 extern uint32 export_fsid;
27 extern uint32 export_password_hash;
29 extern unsigned char password[PASSWORD_MAXLEN+1];
31 int exports_parse(void);
32 int exports_options(const char *path, struct svc_req *rqstp, char **password, uint32 *fsid);
33 int export_point(const char *path);
34 char *export_point_from_fsid(uint32 fsid, time_t **last_mtime, uint32 **dir_hash);
35 nfsstat3 exports_compat(const char *path, struct svc_req *rqstp);
36 nfsstat3 exports_rw(void);
37 uint32 exports_anonuid(void);
38 uint32 exports_anongid(void);
39 uint32 fnv1a_32(const char *str, uint32 hval);
41 uint32 wfnv1a_32(const wchar_t *str, uint32 hval);
43 char *normpath(const char *path, char *normpath);