summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGregor Beck <gbeck@sernet.de>2011-07-06 15:10:27 +0200
committerVolker Lendecke <vlendec@samba.org>2011-07-07 12:49:00 +0200
commitcd83c1d9582e3252b2c964d77aebf1d241d371a6 (patch)
tree5f768a29a628a44baa3f2b4f7fdfdd4df26543e3 /source3/utils
parent749d022a0c68dd7d9f62b034e37fbe509dba2c46 (diff)
downloadsamba-cd83c1d9582e3252b2c964d77aebf1d241d371a6.tar.gz
samba-cd83c1d9582e3252b2c964d77aebf1d241d371a6.tar.bz2
samba-cd83c1d9582e3252b2c964d77aebf1d241d371a6.zip
s3:testparm: avoid spurious warnings about dos mode mapping and create mask if store dos attributes is set
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Jul 7 12:49:01 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/testparm.c46
1 files changed, 27 insertions, 19 deletions
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index 966b61e58e..9b224d4c1b 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -307,25 +307,33 @@ static void do_per_share_checks(int s)
lp_servicename(s) );
}
- if (lp_map_hidden(s) && !(lp_create_mask(s) & S_IXOTH)) {
- fprintf(stderr,"Invalid combination of parameters for service %s. \
- Map hidden can only work if create mask includes octal 01 (S_IXOTH).\n",
- lp_servicename(s) );
- }
- if (lp_map_hidden(s) && (lp_force_create_mode(s) & S_IXOTH)) {
- fprintf(stderr,"Invalid combination of parameters for service %s. \
- Map hidden can only work if force create mode excludes octal 01 (S_IXOTH).\n",
- lp_servicename(s) );
- }
- if (lp_map_system(s) && !(lp_create_mask(s) & S_IXGRP)) {
- fprintf(stderr,"Invalid combination of parameters for service %s. \
- Map system can only work if create mask includes octal 010 (S_IXGRP).\n",
- lp_servicename(s) );
- }
- if (lp_map_system(s) && (lp_force_create_mode(s) & S_IXGRP)) {
- fprintf(stderr,"Invalid combination of parameters for service %s. \
- Map system can only work if force create mode excludes octal 010 (S_IXGRP).\n",
- lp_servicename(s) );
+ if (!lp_store_dos_attributes(s) && lp_map_hidden(s)
+ && !(lp_create_mask(s) & S_IXOTH))
+ {
+ fprintf(stderr,"Invalid combination of parameters for service "
+ "%s. Map hidden can only work if create mask includes "
+ "octal 01 (S_IXOTH).\n", lp_servicename(s));
+ }
+ if (!lp_store_dos_attributes(s) && lp_map_hidden(s)
+ && (lp_force_create_mode(s) & S_IXOTH))
+ {
+ fprintf(stderr,"Invalid combination of parameters for service "
+ "%s. Map hidden can only work if force create mode "
+ "excludes octal 01 (S_IXOTH).\n", lp_servicename(s));
+ }
+ if (!lp_store_dos_attributes(s) && lp_map_system(s)
+ && !(lp_create_mask(s) & S_IXGRP))
+ {
+ fprintf(stderr,"Invalid combination of parameters for service "
+ "%s. Map system can only work if create mask includes "
+ "octal 010 (S_IXGRP).\n", lp_servicename(s));
+ }
+ if (!lp_store_dos_attributes(s) && lp_map_system(s)
+ && (lp_force_create_mode(s) & S_IXGRP))
+ {
+ fprintf(stderr,"Invalid combination of parameters for service "
+ "%s. Map system can only work if force create mode "
+ "excludes octal 010 (S_IXGRP).\n", lp_servicename(s));
}
#ifdef HAVE_CUPS
if (lp_printing(s) == PRINT_CUPS && *(lp_printcommand(s)) != '\0') {