From: Ralph Boehme Date: Wed, 9 Mar 2016 12:53:09 +0000 (+0100) Subject: testparm: vfs_fruit checks X-Git-Tag: tdb-1.3.9~467 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e88ccdd73847c70c76c07eec6334bd15b5c4180;p=thirdparty%2Fsamba.git testparm: vfs_fruit checks - vfs_fruit requires "ea support = yes" - OS X clients negotiate AAPL on the first tcon, so mixing shares with and without fruit will globally disable AAPL if the first tcon is without fruit Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index 5912d18e085..e1d66ce68e4 100644 --- a/source3/utils/testparm.c +++ b/source3/utils/testparm.c @@ -345,7 +345,11 @@ static void do_per_share_checks(int s) { const char **deny_list = lp_hosts_deny(s); const char **allow_list = lp_hosts_allow(s); + const char **vfs_objects = NULL; int i; + static bool uses_fruit; + static bool doesnt_use_fruit; + static bool fruit_mix_warned; if(deny_list) { for (i=0; deny_list[i]; i++) { @@ -426,6 +430,26 @@ static void do_per_share_checks(int s) "parameter is ignored when using CUPS libraries.\n\n", lp_servicename(talloc_tos(), s)); } + + vfs_objects = lp_vfs_objects(s); + if (vfs_objects && str_list_check(vfs_objects, "fruit")) { + uses_fruit = true; + if (!lp_ea_support(s) && !lp_ea_support(-1)) { + fprintf(stderr, + "ERROR: Service \"%s\" uses vfs_fruit, but " + "that requires \"ea support = yes\".\n\n", + lp_servicename(talloc_tos(), s)); + } + } else { + doesnt_use_fruit = true; + } + + if (uses_fruit && doesnt_use_fruit && !fruit_mix_warned) { + fruit_mix_warned = true; + fprintf(stderr, + "WARNING: some services use vfs_fruit, others don't. Mounting them " + "in conjunction on OS X clients results in undefined behaviour.\n\n"); + } } int main(int argc, const char *argv[])