[SCM] pam wrapper repository - branch master updated
The branch, master has been updated via 3b5417b pypamtest: Fix Python 2.6 compatibility from 7d45bbb Bump version to 1.0.4 https://git.samba.org/?p=pam_wrapper.git;a=shortlog;h=master - Log - commit 3b5417be2f79a0d4bc9bf3c974ffd12219cb60b8 Author: Lumir Balhar Date: Fri Oct 13 15:36:15 2017 +0200 pypamtest: Fix Python 2.6 compatibility PyErr_NewExceptionWithDoc() isn't available in Python 2.6 so it can be used only in higher versions of Python. Signed-off-by: Lumir Balhar Reviewed-by: Andrew Bartlet Reviewed-by: Andreas Schneider --- Summary of changes: src/python/pypamtest.c | 9 + 1 file changed, 9 insertions(+) Changeset truncated at 500 lines: diff --git a/src/python/pypamtest.c b/src/python/pypamtest.c index 585f27d..a71fd35 100644 --- a/src/python/pypamtest.c +++ b/src/python/pypamtest.c @@ -1004,12 +1004,14 @@ static struct PyModuleDef pypamtestdef = { *** Initialize the module **/ +#if PY_VERSION_HEX >= 0x0207 /* >= 2.7.0 */ PyDoc_STRVAR(PamTestError__doc__, "pypamtest specific exception\n\n" "This exception is raised if the _pamtest() function fails. If _pamtest() " "returns PAMTEST_ERR_CASE (a test case returns unexpected error code), then " "the exception also details which test case failed." ); +#endif #if IS_PYTHON3 PyMODINIT_FUNC PyInit_pypamtest(void) @@ -1034,10 +1036,17 @@ PyMODINIT_FUNC initpypamtest(void) pypamtest_module_methods); #endif +#if PY_VERSION_HEX >= 0x0207 /* >= 2.7.0 */ PyExc_PamTestError = PyErr_NewExceptionWithDoc(discard_const_p(char, "pypamtest.PamTestError"), PamTestError__doc__, PyExc_EnvironmentError, NULL); +#else /* < 2.7.0 */ + PyExc_PamTestError = PyErr_NewException(discard_const_p(char, "pypamtest.PamTestError"), + PyExc_EnvironmentError, + NULL); +#endif + if (PyExc_PamTestError == NULL) { RETURN_ON_ERROR; } -- pam wrapper repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3bc8880 ctdb-tests: Add tests for event scripts with multiple '.'s via 7720ca0 ctdb-common: Ignore event scripts with multiple '.'s from f6d6af3 vfs_catia: Fix a potential memleak https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3bc8880ea0532abed1db002710d3dd6a91f750dc Author: Amitay Isaacs Date: Thu Oct 12 14:44:03 2017 +1100 ctdb-tests: Add tests for event scripts with multiple '.'s BUG: https://bugzilla.samba.org/show_bug.cgi?id=13070 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke Autobuild-User(master): Martin Schwenke Autobuild-Date(master): Wed Oct 18 10:19:48 CEST 2017 on sn-devel-144 commit 7720ca0729b127a93d78401aaf1341d79f9603a4 Author: Amitay Isaacs Date: Thu Oct 12 14:42:59 2017 +1100 ctdb-common: Ignore event scripts with multiple '.'s BUG: https://bugzilla.samba.org/show_bug.cgi?id=13070 This avoids running event script copies left by a package manager. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- Summary of changes: ctdb/common/run_event.c | 6 ++ ctdb/config/events.d/README | 4 +++- ctdb/tests/cunit/run_event_001.sh | 21 + 3 files changed, 30 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/run_event.c b/ctdb/common/run_event.c index e5d562c..0961d65 100644 --- a/ctdb/common/run_event.c +++ b/ctdb/common/run_event.c @@ -60,6 +60,12 @@ static int script_filter(const struct dirent *de) return 0; } + /* Ignore filenames with multiple '.'s */ + ptr = index(&de->d_name[3], '.'); + if (ptr != NULL) { + return 0; + } + return 1; } diff --git a/ctdb/config/events.d/README b/ctdb/config/events.d/README index 36f94bb..7025a4b 100644 --- a/ctdb/config/events.d/README +++ b/ctdb/config/events.d/README @@ -11,7 +11,9 @@ alphanumeric sort order. As a special case, any eventscript that ends with a '~' character will be ignored since this is a common postfix that some editors will append to -older versions of a file. +older versions of a file. Similarly, any eventscript with multiple '.'s +will be ignored as package managers can create copies with additional +suffix starting with '.' (e.g. .rpmnew, .dpkg-dist). Only executable event scripts are run by CTDB. Any event script that does not have execute permission is ignored. diff --git a/ctdb/tests/cunit/run_event_001.sh b/ctdb/tests/cunit/run_event_001.sh index f0ffe4f..35c256b 100755 --- a/ctdb/tests/cunit/run_event_001.sh +++ b/ctdb/tests/cunit/run_event_001.sh @@ -37,6 +37,27 @@ required_result 1 < "$scriptdir/10.test.rpmnew" < "$scriptdir/11.foo" <
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 09104dc unittests: Fix missing include of signal.h via 01e89ad python: Fix Python 2.6 compatibility via 88dc82d tests: Improve tests of samba.registry Python module via 87154bc python: Port samba.registry module to Python 3 compatible form from 3bc8880 ctdb-tests: Add tests for event scripts with multiple '.'s https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 09104dc41758bfee6dea2aebc80de52ac32a3c88 Author: Lumir Balhar Date: Wed Oct 11 21:02:24 2017 +0200 unittests: Fix missing include of signal.h Signed-off-by: Lumir Balhar Reviewed-by: Andrew Bartlet Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Oct 18 14:24:39 CEST 2017 on sn-devel-144 commit 01e89ada251eb8bf0556568604298d56d9b41043 Author: Lumir Balhar Date: Wed Oct 11 21:00:29 2017 +0200 python: Fix Python 2.6 compatibility PyErr_NewExceptionWithDoc() isn't available in Python 2.6 so it can be used only in higher versions of Python. Signed-off-by: Lumir Balhar Reviewed-by: Andrew Bartlet Reviewed-by: Andreas Schneider commit 88dc82d1f9d8b415f8bc3dc4272a9c2c12e5ad80 Author: Lumir Balhar Date: Wed Oct 11 13:05:01 2017 +0200 tests: Improve tests of samba.registry Python module Signed-off-by: Lumir Balhar Reviewed-by: Andrew Bartlet Reviewed-by: Andreas Schneider commit 87154bcfa9235a726f9d874e122620c678665434 Author: Lumir Balhar Date: Wed Oct 11 12:46:11 2017 +0200 python: Port samba.registry module to Python 3 compatible form Signed-off-by: Lumir Balhar Reviewed-by: Andrew Bartlet Reviewed-by: Andreas Schneider --- Summary of changes: lib/pam_wrapper/python/pypamtest.c | 9 + python/samba/tests/registry.py | 25 ++- selftest/tests.py | 2 +- source4/lib/registry/pyregistry.c | 31 +++-- source4/lib/registry/wscript_build | 16 --- testsuite/unittests/rpc_test_dummy_module.c | 1 + 6 files changed, 60 insertions(+), 24 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/pam_wrapper/python/pypamtest.c b/lib/pam_wrapper/python/pypamtest.c index 585f27d..a71fd35 100644 --- a/lib/pam_wrapper/python/pypamtest.c +++ b/lib/pam_wrapper/python/pypamtest.c @@ -1004,12 +1004,14 @@ static struct PyModuleDef pypamtestdef = { *** Initialize the module **/ +#if PY_VERSION_HEX >= 0x0207 /* >= 2.7.0 */ PyDoc_STRVAR(PamTestError__doc__, "pypamtest specific exception\n\n" "This exception is raised if the _pamtest() function fails. If _pamtest() " "returns PAMTEST_ERR_CASE (a test case returns unexpected error code), then " "the exception also details which test case failed." ); +#endif #if IS_PYTHON3 PyMODINIT_FUNC PyInit_pypamtest(void) @@ -1034,10 +1036,17 @@ PyMODINIT_FUNC initpypamtest(void) pypamtest_module_methods); #endif +#if PY_VERSION_HEX >= 0x0207 /* >= 2.7.0 */ PyExc_PamTestError = PyErr_NewExceptionWithDoc(discard_const_p(char, "pypamtest.PamTestError"), PamTestError__doc__, PyExc_EnvironmentError, NULL); +#else /* < 2.7.0 */ + PyExc_PamTestError = PyErr_NewException(discard_const_p(char, "pypamtest.PamTestError"), + PyExc_EnvironmentError, + NULL); +#endif + if (PyExc_PamTestError == NULL) { RETURN_ON_ERROR; } diff --git a/python/samba/tests/registry.py b/python/samba/tests/registry.py index 8016a0b..1a8a126 100644 --- a/python/samba/tests/registry.py +++ b/python/samba/tests/registry.py @@ -20,6 +20,9 @@ import os from samba import registry import samba.tests +from samba import WERRORError +from subprocess import Popen, PIPE + class HelperTests(samba.tests.TestCase): @@ -31,7 +34,6 @@ class HelperTests(samba.tests.TestCase): self.assertEquals("REG_DWORD", registry.str_regtype(4)) - class HiveTests(samba.tests.TestCaseInTempDir): def setUp(self): @@ -47,14 +49,27 @@ class HiveTests(samba.tests.TestCaseInTempDir): def test_ldb_new(self): self.assertTrue(self.hive is not None) -#def test_flush(self): -#self.hive.flush() +def test_set_value(self): +self.assertIsNone(self.hive.set_value('foo1', 1, 'bar1')) + +def test_flush(self): +self.assertIsNone(self.hive.set_value('foo2', 1, 'bar2'))
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 962a1b3 dbcheck: Allow removal of one-way links to missing objects from 09104dc unittests: Fix missing include of signal.h https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 962a1b32201fce0a49c6be55943d4fbb57ed781e Author: Andrew Bartlett Date: Tue Oct 17 23:01:51 2017 +1300 dbcheck: Allow removal of one-way links to missing objects If dbcheck is not run within the tombstone lifetime, these links can persist in the database forever. The risk of unintentional information loss is why these links are only removed within the same partition. A replication may be in progress which has created only one end of the link, so we must keep that. Signed-off-by: Andrew Bartlett Reviewed-by: Rowland Penny Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Oct 19 00:50:19 CEST 2017 on sn-devel-144 --- Summary of changes: python/samba/dbchecker.py | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py index 1a73fe0..82088a0 100644 --- a/python/samba/dbchecker.py +++ b/python/samba/dbchecker.py @@ -523,8 +523,26 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base))) # check if its a backlink linkID, _ = self.get_attr_linkID_and_reverse_name(attrname) if (linkID & 1 == 0) and str(dsdb_dn).find('\\0ADEL') == -1: -self.report("Not removing dangling forward link") -return + +linkID, reverse_link_name \ += self.get_attr_linkID_and_reverse_name(attrname) +if reverse_link_name is not None: +self.report("Not removing dangling forward link") +return + +nc_root = self.samdb.get_nc_root(dn) +target_nc_root = self.samdb.get_nc_root(dsdb_dn.dn) +if nc_root != target_nc_root: +self.report("Not removing dangling one-way " +"cross-partition link " +"(we might be mid-replication)") +return + +# Due to our link handling one-way links pointing to +# missing objects are plausible. +self.err_deleted_dn(dn, attrname, val, +dsdb_dn, dsdb_dn, True) + self.err_deleted_dn(dn, attrname, val, dsdb_dn, dsdb_dn, False) def err_missing_dn_GUID_component(self, dn, attrname, val, dsdb_dn, errstr): -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f7cdd39 rpc_client: Fix wording in a DEBUG statement via 267cd25 Removed unused 'oplock contention limit' config parameter via 44bcb08 s3: tests: Add smbclient test for utimes command. via 0030ce9 s3:Add a utimes command to smbclient so we can set the Windows times. from 962a1b3 dbcheck: Allow removal of one-way links to missing objects https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f7cdd396abfc4a5ff3c99e03398f28aa7342af69 Author: Volker Lendecke Date: Wed Oct 18 13:26:07 2017 +0200 rpc_client: Fix wording in a DEBUG statement Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Oct 19 04:57:44 CEST 2017 on sn-devel-144 commit 267cd25290c2a378a81c8733c8559c4f210dc07e Author: Christof Schmitt Date: Tue Oct 17 14:49:17 2017 -0700 Removed unused 'oplock contention limit' config parameter Signed-off-by: Christof Schmitt Reviewed-by: Jeremy Allison commit 44bcb08f83ead449851d8aeb92329cdb00cc2db4 Author: Jeremy Allison Date: Wed Oct 18 13:54:22 2017 -0700 s3: tests: Add smbclient test for utimes command. Signed-off-by: Jeremy Allison commit 0030ce900afcb6a4297c4a4dcf95bce51930d235 Author: Richard Sharpe Date: Mon Oct 16 13:51:51 2017 -0700 s3:Add a utimes command to smbclient so we can set the Windows times. Add an update to the smbclient man page. Signed-off-by: Richard Sharpe Reviewed-by: Jeremy Allison --- Summary of changes: WHATSNEW.txt | 1 + docs-xml/manpages/smbclient.1.xml | 8 ++ .../smbdotconf/locking/oplockcontentionlimit.xml | 26 - examples/scripts/shares/python/smbparm.py | 1 - lib/param/loadparm.c | 2 - source3/client/client.c| 122 + source3/param/loadparm.c | 1 - source3/rpc_client/cli_netlogon.c | 2 +- source3/script/tests/test_smbclient_s3.sh | 67 +++ 9 files changed, 199 insertions(+), 31 deletions(-) delete mode 100644 docs-xml/smbdotconf/locking/oplockcontentionlimit.xml Changeset truncated at 500 lines: diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 2f2f2f6..cc03f20 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -40,6 +40,7 @@ smb.conf changes Parameter Name Description Default -- --- --- + oplock contention limitRemoved NT4-style replication based net commands removed diff --git a/docs-xml/manpages/smbclient.1.xml b/docs-xml/manpages/smbclient.1.xml index 432f60d..0325982 100644 --- a/docs-xml/manpages/smbclient.1.xml +++ b/docs-xml/manpages/smbclient.1.xml @@ -1175,6 +1175,14 @@ + + utimes< + change time> + Changes the timestamps on a file by name. + Times should be specified in the format YY:MM:DD-HH:MM:SS or -1 for no change. + + + diff --git a/docs-xml/smbdotconf/locking/oplockcontentionlimit.xml b/docs-xml/smbdotconf/locking/oplockcontentionlimit.xml deleted file mode 100644 index edaa7d7..000 --- a/docs-xml/smbdotconf/locking/oplockcontentionlimit.xml +++ /dev/null @@ -1,26 +0,0 @@ -http://www.samba.org/samba/DTD/samba-doc";> - - - This is a very advanced smbd - 8 tuning option to improve the efficiency of the - granting of oplocks under multiple client contention for the same file. - - - - In brief it specifies a number, which causes smbd - 8not to grant an oplock even when requested if the - approximate number of clients contending for an oplock on the same file goes over this - limit. This causes smbd to behave in a similar - way to Windows NT. - - - - DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ AND UNDERSTOOD THE SAMBA OPLOCK CODE. - - - -2 - diff --git a/examples/scripts/shares/python/smbparm.py b/examples/scripts/shares/python/smbparm.py index f182f57..e0786a4 100644 --- a/examples/scripts/shares/python/smbparm.py +++ b/examples/scripts/shares/python/smbparm.py @@ -173,7 +173,6 @@ parm_table = { "PASSWDCHATDEBUG": ("passwd chat debug", SambaParmBool, P_GLOBAL, "No"), "SMBPASSWDFILE" : ("smb passwd file", SambaParmString, P_GLOBAL, "/etc/samba/private/smbpasswd"), "GETQUOTACOMMAND": ("get