[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Fri Jul 22 20:41:01 UTC 2022
The branch, master has been updated
via b4d7540bb47 gpo: samba-gpupdate use s3 param for registry conf
from 30c40046ef0 ctdb-build: Add missing dependency on talloc
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit b4d7540bb4798e6801accf34a26fc0f2636bdd1f
Author: David Mulder <dmulder at suse.com>
Date: Mon Jul 18 09:19:24 2022 -0600
gpo: samba-gpupdate use s3 param for registry conf
Cause samba-gpupdate to use an s3 param so that
it can load settings from registry configuration.
Signed-off-by: David Mulder <dmulder at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri Jul 22 20:40:51 UTC 2022 on sn-devel-184
-----------------------------------------------------------------------
Summary of changes:
python/samba/getopt.py | 9 +++++++++
python/samba/gp/gpclass.py | 7 +------
source4/scripting/bin/samba-gpupdate | 2 +-
3 files changed, 11 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/python/samba/getopt.py b/python/samba/getopt.py
index 7b8d2ef46c5..a271cd8a736 100644
--- a/python/samba/getopt.py
+++ b/python/samba/getopt.py
@@ -93,6 +93,15 @@ class SambaOptions(optparse.OptionGroup):
return self._lp
+class Samba3Options(SambaOptions):
+ """General Samba-related command line options with an s3 param."""
+
+ def __init__(self, parser):
+ SambaOptions.__init__(self, parser)
+ from samba.samba3 import param as s3param
+ self._lp = s3param.get_context()
+
+
class VersionOptions(optparse.OptionGroup):
"""Command line option for printing Samba version."""
def __init__(self, parser):
diff --git a/python/samba/gp/gpclass.py b/python/samba/gp/gpclass.py
index 0c95cdb66c0..39a34a75cf0 100644
--- a/python/samba/gp/gpclass.py
+++ b/python/samba/gp/gpclass.py
@@ -32,7 +32,6 @@ import re
from samba.net import Net
from samba.dcerpc import nbt
from samba.samba3 import libsmb_samba_internal as libsmb
-from samba.samba3 import param as s3param
import samba.gpo as gpo
from samba.param import LoadParm
from uuid import UUID
@@ -406,14 +405,10 @@ def check_safe_path(path):
def check_refresh_gpo_list(dc_hostname, lp, creds, gpos):
- # the SMB bindings rely on having a s3 loadparm
- s3_lp = s3param.get_context()
- s3_lp.load(lp.configfile)
-
# Force signing for the connection
saved_signing_state = creds.get_smb_signing()
creds.set_smb_signing(SMB_SIGNING_REQUIRED)
- conn = libsmb.Conn(dc_hostname, 'sysvol', lp=s3_lp, creds=creds)
+ conn = libsmb.Conn(dc_hostname, 'sysvol', lp=lp, creds=creds)
# Reset signing state
creds.set_smb_signing(saved_signing_state)
cache_path = lp.cache_path('gpo_cache')
diff --git a/source4/scripting/bin/samba-gpupdate b/source4/scripting/bin/samba-gpupdate
index 8c4923aa68f..4b3f057f534 100755
--- a/source4/scripting/bin/samba-gpupdate
+++ b/source4/scripting/bin/samba-gpupdate
@@ -57,7 +57,7 @@ from samba.gp.util.logging import logger_init
if __name__ == "__main__":
parser = optparse.OptionParser('samba-gpupdate [options]')
- sambaopts = options.SambaOptions(parser)
+ sambaopts = options.Samba3Options(parser)
# Get the command line options
parser.add_option_group(sambaopts)
--
Samba Shared Repository
More information about the samba-cvs
mailing list