From: Andrew Bartlett Date: Sun, 13 May 2018 23:30:17 +0000 (+1200) Subject: samba-tool domain: Create a common --use-ntvfs option for provision, join, dcpromo... X-Git-Tag: ldb-1.4.0~223 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f55eab600fef592204056823ea82d89c11bd0bef;p=thirdparty%2Fsamba.git samba-tool domain: Create a common --use-ntvfs option for provision, join, dcpromo and classicupgrade The NTVFS fileserver mode is still integral to the selftest system (often simply used to make the rest of the command run and not fuss with POSIX ACLs and permissions). Signed-off-by: Andrew Bartlett Reviewed-by: Gary Lockyer --- diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py index a1a936d98d9..9f914ea0403 100644 --- a/python/samba/netcmd/domain.py +++ b/python/samba/netcmd/domain.py @@ -120,6 +120,11 @@ common_provision_join_options = [ Option("--quiet", help="Be quiet", action="store_true"), ] +common_ntvfs_options = [ + Option("--use-ntvfs", help="Use NTVFS for the fileserver (default = no)", + action="store_true") +] + def get_testparm_var(testparm, smbconf, varname): errfile = open(os.devnull, 'w') p = subprocess.Popen([testparm, '-s', '-l', @@ -280,7 +285,6 @@ class cmd_domain_provision(Command): ] ntvfs_options = [ - Option("--use-ntvfs", action="store_true", help="Use NTVFS for the fileserver (default = no)"), Option("--use-xattrs", type="choice", choices=["yes","no","auto"], metavar="[yes|no|auto]", help="Define if we should use the native fs capabilities or a tdb file for " @@ -295,7 +299,8 @@ class cmd_domain_provision(Command): takes_options.extend(openldap_options) if samba.is_ntvfs_fileserver_built(): - takes_options.extend(ntvfs_options) + takes_options.extend(common_ntvfs_options) + takes_options.extend(ntvfs_options) takes_args = [] @@ -585,12 +590,8 @@ class cmd_domain_dcpromo(Command): takes_options.extend(common_provision_join_options) - ntvfs_options = [ - Option("--use-ntvfs", action="store_true", help="Use NTVFS for the fileserver (default = no)"), - ] - if samba.is_ntvfs_fileserver_built(): - takes_options.extend(ntvfs_options) + takes_options.extend(common_ntvfs_options) takes_args = ["domain", "role?"] @@ -1573,8 +1574,6 @@ class cmd_domain_classicupgrade(Command): ] ntvfs_options = [ - Option("--use-ntvfs", help="Use NTVFS for the fileserver (default = no)", - action="store_true"), Option("--use-xattrs", type="choice", choices=["yes","no","auto"], metavar="[yes|no|auto]", help="Define if we should use the native fs capabilities or a tdb file for " @@ -1583,6 +1582,7 @@ class cmd_domain_classicupgrade(Command): default="auto") ] if samba.is_ntvfs_fileserver_built(): + takes_options.extend(common_ntvfs_options) takes_options.extend(ntvfs_options) takes_args = ["smbconf"]