Print this page
*** NO COMMENTS ***


 149 #define OPT_NOSUB       8
 150         {SHOPT_NOSUB, OPT_NOSUB, OPT_TYPE_BOOLEAN},
 151 #define OPT_SEC         9
 152         {SHOPT_SEC, OPT_SEC, OPT_TYPE_SECURITY},
 153 #define OPT_PUBLIC      10
 154         {SHOPT_PUBLIC, OPT_PUBLIC, OPT_TYPE_BOOLEAN, OPT_SHARE_ONLY},
 155 #define OPT_INDEX       11
 156         {SHOPT_INDEX, OPT_INDEX, OPT_TYPE_FILE},
 157 #define OPT_LOG         12
 158         {SHOPT_LOG, OPT_LOG, OPT_TYPE_LOGTAG},
 159 #define OPT_CKSUM       13
 160         {SHOPT_CKSUM, OPT_CKSUM, OPT_TYPE_STRINGSET},
 161 #define OPT_NONE        14
 162         {SHOPT_NONE, OPT_NONE, OPT_TYPE_ACCLIST},
 163 #define OPT_ROOT_MAPPING        15
 164         {SHOPT_ROOT_MAPPING, OPT_ROOT_MAPPING, OPT_TYPE_USER},
 165 #define OPT_CHARSET_MAP 16
 166         {"", OPT_CHARSET_MAP, OPT_TYPE_ACCLIST},
 167 #define OPT_NOACLFAB    17
 168         {SHOPT_NOACLFAB, OPT_NOACLFAB, OPT_TYPE_BOOLEAN},



 169 #ifdef VOLATILE_FH_TEST /* XXX added for testing volatile fh's only */
 170 #define OPT_VOLFH       18
 171         {SHOPT_VOLFH, OPT_VOLFH},
 172 #endif /* VOLATILE_FH_TEST */
 173         NULL
 174 };
 175 
 176 /*
 177  * Codesets that may need to be converted to UTF-8 for file paths.
 178  * Add new names here to add new property support. If we ever get a
 179  * way to query the kernel for character sets, this should become
 180  * dynamically loaded. Make sure changes here are reflected in
 181  * cmd/fs.d/nfs/mountd/nfscmd.c
 182  */
 183 
 184 static char *legal_conv[] = {
 185         "euc-cn",
 186         "euc-jp",
 187         "euc-jpms",
 188         "euc-kr",
 189         "euc-tw",
 190         "iso8859-1",


 996                                 value = strdup("global");
 997                         if (value != NULL)
 998                                 configlog(export,
 999                                     strlen(value) ? value : "global");
1000                         break;
1001                 case OPT_CHARSET_MAP:
1002                         /*
1003                          * Set EX_CHARMAP when there is at least one
1004                          * charmap conversion property. This will get
1005                          * checked by the nfs server when it needs to.
1006                          */
1007                         export->ex_flags |= EX_CHARMAP;
1008                         break;
1009                 case OPT_NOACLFAB:
1010                         if (value != NULL && (strcasecmp(value, "true") == 0 ||
1011                             strcmp(value, "1") == 0))
1012                                 export->ex_flags |= EX_NOACLFAB;
1013                         else
1014                                 export->ex_flags &= ~EX_NOACLFAB;
1015                         break;








1016                 default:
1017                         /* have a syntactic error */
1018                         (void) printf(dgettext(TEXT_DOMAIN,
1019                             "NFS: unrecognized option %s=%s\n"),
1020                             name != NULL ? name : "",
1021                             value != NULL ? value : "");
1022                         break;
1023                 }
1024                 if (name != NULL)
1025                         sa_free_attr_string(name);
1026                 if (value != NULL)
1027                         sa_free_attr_string(value);
1028         }
1029         return (ret);
1030 }
1031 
1032 /*
1033  * cleanup_export(export)
1034  *
1035  * Cleanup the allocated areas so we don't leak memory




 149 #define OPT_NOSUB       8
 150         {SHOPT_NOSUB, OPT_NOSUB, OPT_TYPE_BOOLEAN},
 151 #define OPT_SEC         9
 152         {SHOPT_SEC, OPT_SEC, OPT_TYPE_SECURITY},
 153 #define OPT_PUBLIC      10
 154         {SHOPT_PUBLIC, OPT_PUBLIC, OPT_TYPE_BOOLEAN, OPT_SHARE_ONLY},
 155 #define OPT_INDEX       11
 156         {SHOPT_INDEX, OPT_INDEX, OPT_TYPE_FILE},
 157 #define OPT_LOG         12
 158         {SHOPT_LOG, OPT_LOG, OPT_TYPE_LOGTAG},
 159 #define OPT_CKSUM       13
 160         {SHOPT_CKSUM, OPT_CKSUM, OPT_TYPE_STRINGSET},
 161 #define OPT_NONE        14
 162         {SHOPT_NONE, OPT_NONE, OPT_TYPE_ACCLIST},
 163 #define OPT_ROOT_MAPPING        15
 164         {SHOPT_ROOT_MAPPING, OPT_ROOT_MAPPING, OPT_TYPE_USER},
 165 #define OPT_CHARSET_MAP 16
 166         {"", OPT_CHARSET_MAP, OPT_TYPE_ACCLIST},
 167 #define OPT_NOACLFAB    17
 168         {SHOPT_NOACLFAB, OPT_NOACLFAB, OPT_TYPE_BOOLEAN},
 169 #define OPT_NOHIDE      18
 170         {SHOPT_NOHIDE, OPT_NOHIDE, OPT_TYPE_BOOLEAN},
 171 
 172 #ifdef VOLATILE_FH_TEST /* XXX added for testing volatile fh's only */
 173 #define OPT_VOLFH       19
 174         {SHOPT_VOLFH, OPT_VOLFH},
 175 #endif /* VOLATILE_FH_TEST */
 176         NULL
 177 };
 178 
 179 /*
 180  * Codesets that may need to be converted to UTF-8 for file paths.
 181  * Add new names here to add new property support. If we ever get a
 182  * way to query the kernel for character sets, this should become
 183  * dynamically loaded. Make sure changes here are reflected in
 184  * cmd/fs.d/nfs/mountd/nfscmd.c
 185  */
 186 
 187 static char *legal_conv[] = {
 188         "euc-cn",
 189         "euc-jp",
 190         "euc-jpms",
 191         "euc-kr",
 192         "euc-tw",
 193         "iso8859-1",


 999                                 value = strdup("global");
1000                         if (value != NULL)
1001                                 configlog(export,
1002                                     strlen(value) ? value : "global");
1003                         break;
1004                 case OPT_CHARSET_MAP:
1005                         /*
1006                          * Set EX_CHARMAP when there is at least one
1007                          * charmap conversion property. This will get
1008                          * checked by the nfs server when it needs to.
1009                          */
1010                         export->ex_flags |= EX_CHARMAP;
1011                         break;
1012                 case OPT_NOACLFAB:
1013                         if (value != NULL && (strcasecmp(value, "true") == 0 ||
1014                             strcmp(value, "1") == 0))
1015                                 export->ex_flags |= EX_NOACLFAB;
1016                         else
1017                                 export->ex_flags &= ~EX_NOACLFAB;
1018                         break;
1019                 case OPT_NOHIDE:
1020                         if (value != NULL && (strcasecmp(value, "true") == 0 ||
1021                             strcmp(value, "1") == 0))
1022                                 export->ex_flags |= EX_NOHIDE;
1023                         else
1024                                 export->ex_flags &= ~EX_NOHIDE;
1025 
1026                         break;
1027                 default:
1028                         /* have a syntactic error */
1029                         (void) printf(dgettext(TEXT_DOMAIN,
1030                             "NFS: unrecognized option %s=%s\n"),
1031                             name != NULL ? name : "",
1032                             value != NULL ? value : "");
1033                         break;
1034                 }
1035                 if (name != NULL)
1036                         sa_free_attr_string(name);
1037                 if (value != NULL)
1038                         sa_free_attr_string(value);
1039         }
1040         return (ret);
1041 }
1042 
1043 /*
1044  * cleanup_export(export)
1045  *
1046  * Cleanup the allocated areas so we don't leak memory