[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Thu Jun 21 06:08:06 MDT 2012


The branch, master has been updated
       via  33ff033 s4-provision: Give better clues on what Samba needs for s3fs ACL support
      from  9e116e8 s3-rpcclient: support all known netr_LogonControl2 variants properly

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 33ff033204c29adb669b3c93536fe4712428ec88
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Jun 21 16:21:54 2012 +1000

    s4-provision: Give better clues on what Samba needs for s3fs ACL support
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Thu Jun 21 14:07:55 CEST 2012 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/pysmbd.c                              |   15 +++++++++++++++
 .../scripting/python/samba/provision/__init__.py   |    8 +++++++-
 2 files changed, 22 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c
index 76167e1..5badb3a 100644
--- a/source3/smbd/pysmbd.c
+++ b/source3/smbd/pysmbd.c
@@ -183,7 +183,22 @@ static PyObject *py_smbd_set_simple_acl(PyObject *self, PyObject *args)
 	Py_RETURN_NONE;
 }
 
+/*
+  check if we have ACL support
+ */
+static PyObject *py_smbd_have_posix_acls(PyObject *self, PyObject *args)
+{
+#ifdef HAVE_POSIX_ACLS
+	return PyBool_FromLong(true);
+#else
+	return PyBool_FromLong(false);
+#endif
+}
+
 static PyMethodDef py_smbd_methods[] = {
+	{ "have_posix_acls",
+		(PyCFunction)py_smbd_have_posix_acls, METH_VARARGS,
+		NULL },
 	{ "set_simple_acl",
 		(PyCFunction)py_smbd_set_simple_acl, METH_VARARGS,
 		NULL },
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py
index c95db4e..d9d1ce9 100644
--- a/source4/scripting/python/samba/provision/__init__.py
+++ b/source4/scripting/python/samba/provision/__init__.py
@@ -1738,12 +1738,18 @@ def provision(logger, session_info, credentials, smbconf=None,
         if paths.sysvol is None:
             raise MissingShareError("sysvol", paths.smbconf)
 
+        if not smbd.have_posix_acls():
+            # This clue is only strictly correct for RPM and
+            # Debian-like Linux systems, but hopefully other users
+            # will get enough clue from it.
+            raise ProvisioningError("Samba was compiled without the posix ACL support that s3fs requires.  Try installing libacl1-dev or libacl-devel, then re-run configure and make.")
+            
         file = tempfile.NamedTemporaryFile(dir=os.path.abspath(paths.sysvol))
         try:
             try:
                 smbd.set_simple_acl(file.name, root_uid, wheel_gid)
             except Exception:
-                raise ProvisioningError("Your filesystem or build does not support posix ACLs, s3fs is unworkable in this mode")
+                raise ProvisioningError("Your filesystem or build does not support posix ACLs, which s3fs requires.  Try the mounting the filesystem with the 'acl' option.")
         finally:
             file.close()
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list