diff options
| author | Andrew Bartlett <abartlet@samba.org> | 2015-10-10 09:30:17 +1300 |
|---|---|---|
| committer | Jeremy Allison <jra@samba.org> | 2015-10-23 22:27:30 +0200 |
| commit | 71dcc76b70d8e249624f9bf057fc4fd3a44125e1 (patch) | |
| tree | 885ea66f041ef4b751510364131f4545a98b05a7 /python | |
| parent | 0ccf842e12c0b5de52a89f1b6d74eba3a5e3feb5 (diff) | |
| download | samba-71dcc76b70d8e249624f9bf057fc4fd3a44125e1.tar.gz samba-71dcc76b70d8e249624f9bf057fc4fd3a44125e1.tar.bz2 samba-71dcc76b70d8e249624f9bf057fc4fd3a44125e1.zip | |
build: Enable NTVFS file server to be omitted
We now only build it by default with --enable-sefltest, or otherwise
if requested.
The NTVFS file server still has features not present in the smbd file
server, such as a CIFS/SMB proxy, and a radically different design,
but it is also not undergoing any ongoing development so this keeps it
in a safe state for care and maintaince, with less of a security risk
if such an issue were to come up.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'python')
| -rw-r--r-- | python/pyglue.c | 11 | ||||
| -rw-r--r-- | python/samba/__init__.py | 1 | ||||
| -rw-r--r-- | python/samba/netcmd/domain.py | 37 |
3 files changed, 42 insertions, 7 deletions
diff --git a/python/pyglue.c b/python/pyglue.c index 3fc6e38691f..81244a24973 100644 --- a/python/pyglue.c +++ b/python/pyglue.c @@ -121,6 +121,15 @@ static PyObject *py_get_debug_level(PyObject *self) return PyInt_FromLong(DEBUGLEVEL); } +static PyObject *py_is_ntvfs_fileserver_built(PyObject *self) +{ +#ifdef WITH_NTVFS_FILESERVER + Py_RETURN_TRUE; +#else + Py_RETURN_FALSE; +#endif +} + /* return the list of interface IPs we have configured takes an loadparm context, returns a list of IPs in string form @@ -267,6 +276,8 @@ static PyMethodDef py_misc_methods[] = { "(for testing) compare two strings using Samba's strcasecmp_m()"}, { "strstr_m", (PyCFunction)py_strstr_m, METH_VARARGS, "(for testing) find one string in another with Samba's strstr_m()"}, + { "is_ntvfs_fileserver_built", (PyCFunction)py_is_ntvfs_fileserver_built, METH_NOARGS, + "is the NTVFS file server built in this installation?" }, { NULL } }; diff --git a/python/samba/__init__.py b/python/samba/__init__.py index 84b0b1fb2d5..b04e83cd115 100644 --- a/python/samba/__init__.py +++ b/python/samba/__init__.py @@ -374,3 +374,4 @@ unix2nttime = _glue.unix2nttime generate_random_password = _glue.generate_random_password strcasecmp_m = _glue.strcasecmp_m strstr_m = _glue.strstr_m +is_ntvfs_fileserver_built = _glue.is_ntvfs_fileserver_built diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py index 250fdf9e319..9e6fe717b65 100644 --- a/python/samba/netcmd/domain.py +++ b/python/samba/netcmd/domain.py @@ -224,7 +224,7 @@ class cmd_domain_provision(Command): Option("--ol-mmr-urls", type="string", metavar="LDAPSERVER", help="List of LDAP-URLS [ ldap://<FQHN>:<PORT>/ (where <PORT> has to be different than 389!) ] separated with comma (\",\") for use with OpenLDAP-MMR (Multi-Master-Replication), e.g.: \"ldap://s4dc1:9000,ldap://s4dc2:9000\""), Option("--use-xattrs", type="choice", choices=["yes", "no", "auto"], help="Define if we should use the native fs capabilities or a tdb file for storing attributes likes ntacl, auto tries to make an inteligent guess based on the user rights and system capabilities", default="auto"), - Option("--use-ntvfs", action="store_true", help="Use NTVFS for the fileserver (default = no)"), + Option("--use-rfc2307", action="store_true", help="Use AD to store posix attributes (default = no)"), ] @@ -239,9 +239,16 @@ class cmd_domain_provision(Command): Option("--ldap-backend-nosync", help="Configure LDAP backend not to call fsync() (for performance in test environments)", action="store_true"), ] + ntvfs_options = [ + Option("--use-ntvfs", action="store_true", help="Use NTVFS for the fileserver (default = no)"), + ] + if os.getenv('TEST_LDAP', "no") == "yes": takes_options.extend(openldap_options) + if samba.is_ntvfs_fileserver_built(): + takes_options.extend(ntvfs_options) + takes_args = [] def run(self, sambaopts=None, versionopts=None, @@ -490,8 +497,6 @@ class cmd_domain_dcpromo(Command): action="store_true"), Option("--machinepass", type=str, metavar="PASSWORD", help="choose machine password (otherwise random)"), - Option("--use-ntvfs", help="Use NTVFS for the fileserver (default = no)", - action="store_true"), Option("--dns-backend", type="choice", metavar="NAMESERVER-BACKEND", choices=["SAMBA_INTERNAL", "BIND9_DLZ", "NONE"], help="The DNS server backend. SAMBA_INTERNAL is the builtin name server (default), " @@ -502,6 +507,14 @@ class cmd_domain_dcpromo(Command): Option("--verbose", help="Be verbose", action="store_true") ] + 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_args = ["domain", "role?"] def run(self, domain, role=None, sambaopts=None, credopts=None, @@ -569,8 +582,6 @@ class cmd_domain_join(Command): help="choose machine password (otherwise random)"), Option("--adminpass", type="string", metavar="PASSWORD", help="choose adminstrator password when joining as a subdomain (otherwise random)"), - Option("--use-ntvfs", help="Use NTVFS for the fileserver (default = no)", - action="store_true"), Option("--dns-backend", type="choice", metavar="NAMESERVER-BACKEND", choices=["SAMBA_INTERNAL", "BIND9_DLZ", "NONE"], help="The DNS server backend. SAMBA_INTERNAL is the builtin name server (default), " @@ -581,6 +592,13 @@ class cmd_domain_join(Command): Option("--verbose", help="Be verbose", action="store_true") ] + ntvfs_options = [ + Option("--use-ntvfs", help="Use NTVFS for the fileserver (default = no)", + action="store_true") + ] + if samba.is_ntvfs_fileserver_built(): + takes_options.extend(ntvfs_options) + takes_args = ["domain", "role?"] def run(self, domain, role=None, sambaopts=None, credopts=None, @@ -1358,8 +1376,6 @@ class cmd_domain_classicupgrade(Command): Option("--verbose", help="Be verbose", 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 storing attributes likes ntacl, auto tries to make an inteligent guess based on the user rights and system capabilities", default="auto"), - Option("--use-ntvfs", help="Use NTVFS for the fileserver (default = no)", - action="store_true"), Option("--dns-backend", type="choice", metavar="NAMESERVER-BACKEND", choices=["SAMBA_INTERNAL", "BIND9_FLATFILE", "BIND9_DLZ", "NONE"], help="The DNS server backend. SAMBA_INTERNAL is the builtin name server (default), " @@ -1369,6 +1385,13 @@ class cmd_domain_classicupgrade(Command): default="SAMBA_INTERNAL") ] + ntvfs_options = [ + Option("--use-ntvfs", help="Use NTVFS for the fileserver (default = no)", + action="store_true") + ] + if samba.is_ntvfs_fileserver_built(): + takes_options.extend(ntvfs_options) + takes_args = ["smbconf"] def run(self, smbconf=None, targetdir=None, dbdir=None, testparm=None, |
