The Samba-Bugzilla – Attachment 9832 Details for
Bug 10542
re-running provision fails with Samba 4.1 and blames posix ACLs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
4.1 patch cherry-picked from master
0001-provision-Fix-failures-on-re-provision-incorrectly-b.patch (text/plain), 4.10 KB, created by
Andrew Bartlett
on 2014-04-06 22:57:44 UTC
(
hide
)
Description:
4.1 patch cherry-picked from master
Filename:
MIME Type:
Creator:
Andrew Bartlett
Created:
2014-04-06 22:57:44 UTC
Size:
4.10 KB
patch
obsolete
>From e40462e7d6e5b30feee9355917984366b9eb812c Mon Sep 17 00:00:00 2001 >From: Garming Sam <garming@catalyst.net.nz> >Date: Wed, 27 Nov 2013 15:26:14 +1300 >Subject: [PATCH] provision: Fix failures on re-provision incorrectly blamed on > posix acl support. > >By doing the test later, there is an actual sam.ldb file that can be connected to. > >Signed-off-by: Garming Sam <garming@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Jelmer Vernooij <jelmer@samba.org> >(cherry picked from commit a89060a0217f8740798d1dac4466222301a4d81b) >--- > python/samba/provision/__init__.py | 51 +++++++++++++++++++------------------- > 1 file changed, 25 insertions(+), 26 deletions(-) > >diff --git a/python/samba/provision/__init__.py b/python/samba/provision/__init__.py >index 4af6b69..3b00cf0 100644 >--- a/python/samba/provision/__init__.py >+++ b/python/samba/provision/__init__.py >@@ -1527,6 +1527,31 @@ def setsysvolacl(samdb, netlogon, sysvol, uid, gid, domainsid, dnsdomain, > s4_passdb = None > > if not use_ntvfs: >+ s3conf = s3param.get_context() >+ s3conf.load(lp.configfile) >+ >+ file = tempfile.NamedTemporaryFile(dir=os.path.abspath(sysvol)) >+ try: >+ try: >+ smbd.set_simple_acl(file.name, 0755, gid) >+ except Exception: >+ 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.") >+ >+ raise ProvisioningError("Your filesystem or build does not support posix ACLs, which s3fs requires. " >+ "Try the mounting the filesystem with the 'acl' option.") >+ try: >+ smbd.chown(file.name, uid, gid) >+ except Exception: >+ raise ProvisioningError("Unable to chown a file on your filesystem. " >+ "You may not be running provision as root.") >+ finally: >+ file.close() >+ > # This will ensure that the smbd code we are running when setting ACLs > # is initialised with the smb.conf > s3conf = s3param.get_context() >@@ -2031,32 +2056,6 @@ def provision(logger, session_info, credentials, smbconf=None, > if paths.sysvol and not os.path.exists(paths.sysvol): > os.makedirs(paths.sysvol, 0775) > >- if not use_ntvfs and serverrole == "active directory domain controller": >- s3conf = s3param.get_context() >- s3conf.load(lp.configfile) >- >- if paths.sysvol is None: >- raise MissingShareError("sysvol", paths.smbconf) >- >- file = tempfile.NamedTemporaryFile(dir=os.path.abspath(paths.sysvol)) >- try: >- try: >- smbd.set_simple_acl(file.name, 0755, root_gid) >- except Exception: >- 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.") >- >- raise ProvisioningError("Your filesystem or build does not support posix ACLs, which s3fs requires. Try the mounting the filesystem with the 'acl' option.") >- try: >- smbd.chown(file.name, root_uid, root_gid) >- except Exception: >- raise ProvisioningError("Unable to chown a file on your filesystem. You may not be running provision as root.") >- finally: >- file.close() >- > ldapi_url = "ldapi://%s" % urllib.quote(paths.s4_ldapi_path, safe="") > > schema = Schema(domainsid, invocationid=invocationid, >-- >1.9.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
abartlet
:
review?
(
jelmer
)
Actions:
View
Attachments on
bug 10542
: 9832 |
9833
|
9834