[SCM] Samba Shared Repository - annotated tag tevent-0.12.1 created
The annotated tag, tevent-0.12.1 has been created at 8d0b4b728854c66158dc0650e7001edbd12c (tag) tagging 53692735c733d01acbd953641f831a1f5e0cf6c5 (commit) replaces talloc-2.3.4 tagged by Stefan Metzmacher on Thu Jun 9 06:26:25 2022 +0200 - Log - tevent: tag release tevent-0.12.1 -BEGIN PGP SIGNATURE- iQEzBAABCgAdFiEEkUejOXGVGO6QEby1R5ORYRMIQCUFAmKhdnEACgkQR5ORYRMI QCXr7ggAwZ384/Knfxrxhq43TO761G1FJnRmgWcaK59dHx3RqSjCTxqOvMmkbEjP GlXvQlLfrSq1x0ARJbuFrDbvU9JLm7ocLCwJhms//ITdcHjsghmWruCm//bU6I7S J1YEK9LIFGBPZx8yBlqwnF3f2SXoyLeh9LPMSY6agIHa+/aEsHz7AWZzC7vTmYmB pKxpAyHATmSccj4sYUdM/dLXkrk5EZeLlm7yp/XR7x+S0cddR6zAq9imnXVagUcB dFilp6KdqxDbuR09/C3Emf96+T61rmxpCvwNs+7tFoLPzaw/wRHc5+vkXSGy8Yi6 651BdZFamxQ4pKPuPP921ctVm6tdvw== =FQHQ -END PGP SIGNATURE- Stefan Metzmacher (1): tevent: version 0.12.1 --- -- Samba Shared Repository
[SCM] Samba Shared Repository - annotated tag tdb-1.4.7 created
The annotated tag, tdb-1.4.7 has been created at c9429738a68570cefe3e3268551f280df6840f0a (tag) tagging 27ceb1c3ad786386e746a5e2968780d791393b9e (commit) replaces talloc-2.3.4 tagged by Stefan Metzmacher on Thu Jun 9 06:25:19 2022 +0200 - Log - tdb: tag release tdb-1.4.7 -BEGIN PGP SIGNATURE- iQEzBAABCgAdFiEEkUejOXGVGO6QEby1R5ORYRMIQCUFAmKhdi8ACgkQR5ORYRMI QCXURwf+OcY8j1TAyMQRm2ki6nK2jhbRSGnHdX6H04ce4OVMkMaaMVPxV3aG5Yij OhOrpM/KjVF9Y26gsELb4AjFGRtwSu6tOTwiimxcP6jv6+1Q84X1Xy+SVGMecNcU JLsH8UdepM1KDpDXHmrhCWvMnqp0ooga5+XUdRjNrZjMbG1cBDVFUncg6HT9pAeM hkQxzKSArwzTTuTrB6UsNnOhMkc0a3fdIUO/r0Jb8LuUeRzENKKFn9auHoilXdru OqPf5uZQSj/3LooRwmN1En7/tnwu9xWU9C46YpcicqD5tpqXXSNT5571dcgYqsEt k3M23KjF1kS3QmZOKa4bvapLkf85Sw== =8PBU -END PGP SIGNATURE- Stefan Metzmacher (2): tevent: version 0.12.1 tdb: version 1.4.7 --- -- Samba Shared Repository
[SCM] Samba Shared Repository - annotated tag talloc-2.3.4 created
The annotated tag, talloc-2.3.4 has been created at 5fba8f7ddfd1631bde8a2c1fa6a4be4752a1ac5a (tag) tagging 0189ccf9fc3d2a77cc83cffe180e307bcdccebb4 (commit) replaces tevent-0.12.0 tagged by Stefan Metzmacher on Thu Jun 9 06:24:42 2022 +0200 - Log - talloc: tag release talloc-2.3.4 -BEGIN PGP SIGNATURE- iQEzBAABCgAdFiEEkUejOXGVGO6QEby1R5ORYRMIQCUFAmKhdgoACgkQR5ORYRMI QCVXtAf/ekxWEWcwIsm1QDsdLkn8Iqrizuh2G3ERuxITVc4/P2Vl+wzKedqJ0ser awdLX4jE58C2NEcgAlqdGLZjgmSjHoOPNGUWAauK+wRcGQT2x8OHTZQ7zKrBM/Y5 mLhjWI62PkIQ945i4WqNDImmJimAffNHAbehmq1BNYVA5vSIk6l6q/HnaAcqj7B3 jaiVfUChVYl2PCSjnrtGJlvrIQOFsgLwdo1LJKYkKRHSQvpyURjTQe1HhsNl0Gw7 WmciaAfyLSaiPnNpGSEVwdgKN/jIMCZqP0CV6028Cxay0a+kUBKmUlzz96isVMTJ tbPzJjcSIBh+jusVtPjNqwJwgFi5mw== =E8GQ -END PGP SIGNATURE- Andreas Schneider (85): s4:kdc: Set debug class for pac-glue python:tests: Check code error code in test_s4u2self_rodc_revealed s4:mit-samba: Pass flags to ks_get_pac() s4:mit-samba: Pass flags to mit_samba_get_pac() s4:kdc: pass down SAMBA_KDC_FLAG_PROTOCOL_TRANSITION to samba_kdc_update_pac() s4:kdc: Fix S4U2Proxy in RODC case to return an error python:tests: Add support for expected groups in krb5 tests python:tests: Add support for unexpected groups in krb5 tests python:tests: Add krb5 tests for asserted identity s4:torture: let remote_pac test for asserted identity sids s4:selftest: Do not print the env twice s4:dsdb:tests: Also pass tests if asserted identity is present s4:kdc: Add asserted identity SID to identify whether S4U2Self has occurred s3:passdb: Remove trailing spaces in lookup_sid.c s3:passdb: Add support to handle UPNs in lookup_name() s3:passdb: Use already defined pointer in lookup_name_smbconf() s3:passdb: Refactor lookup_name_smbconf() s3:passdb: Also allow to handle UPNs in lookup_name_smbconf() s3:tests: Reformat dlopen.sh s3:tests: Reformat printing_var_exp_lpr_cmd.sh s3:tests: Reformat test_acl_xattr.sh s3:tests: Reformat test_aio_outstanding.sh s3:tests: Reformat test_async_req.sh s3:tests: Reformat test_chdir_cache.sh s3:tests: Reformat test_close_denied_share.sh s3:tests: Reformat test_deadtime.sh s3:tests: Reformat test_delete_veto_files_only_rmdir.sh s3:tests: Reformat test_dfree_command.sh s3:tests: Reformat test_dfree_quota.sh s3:tests: Reformat test_dropbox.sh s3:tests: Reformat test_durable_handle_reconnect.sh s3:tests: Reformat test_failure.sh s3:tests: Reformat test_fifo.sh s3:tests: Reformat test_force_close_share.sh s3:tests: Reformat test_force_create_mode.sh s3:tests: Reformat test_force_group_change.sh s3:tests: Reformat test_force_user_unlink.sh s3:tests: Reformat test_forceuser_validusers.sh gitignore: Add .ropeproject for pylsp-rope plugin s3:tests: Reformat test_give_owner.sh s3:tests: Reformat test_groupmap.sh s3:tests: Reformat test_guest_auth.sh s3:tests: Reformat test_homes.sh s3:tests: Reformat test_inherit_owner.sh s3:tests: Reformat test_large_acl.sh s3:tests: Reformat test_libwbclient_threads.sh s3:tests: Reformat test_local_s3.sh gitlab-ci: Use openSUSE 15.3 for coverity lib:util: Do not error for array-bounds warning gitlab-ci: Update Fedora to version 36 third_party: Update waf to version 2.0.24 s3:printing: Initialize the printcap cache as soon as the bgqd starts s3:printing: Start samba-bgqd as soon as possible s3:tests: Reformat test_net_cache_samlogon.sh s3:tests: Reformat test_net_conf.sh s3:tests: Reformat test_net_cred_change.sh s3:tests: Reformat test_net_dom_join_fail_dc.sh s3:tests: Reformat test_net_lookup.sh s3:tests: Reformat test_net_machine_account.sh s3:tests: Reformat test_net_misc.sh s3:tests: Reformat test_net_registry.sh s3:tests: Reformat test_net_registry_check.sh s3:tests: Reformat test_net_registry_import.sh s3:tests: Reformat test_net_registry_roundtrip.sh s3:tests: Reformat test_net_rpc_join.sh s3:tests: Reformat test_net_rpc_join_creds.sh s3:tests: Reformat test_net_rpc_oldjoin.sh s3:tests: Reformat test_net_rpc_share_allowedusers.sh s3:tests: Reformat test_net_tdb.sh s3:tests: Reformat test_net_usershare.sh s3:tests: Reformat test_netfileenum.sh s3:tests: Reformat test_offline.sh s3:tests: Reformat test_open_eintr.sh s3:tests: Reformat test_preserve_case.sh s3:tests: Reformat test_printing_var_exp.sh s3:tests: Reformat test_pthreadpool.sh s3:tests: Reformat test_registry_upgrade.sh s3:tests: Reformat test_resolvconf.sh s3:tests: Reformat test_rpcclient.sh s3:tests: Reformat test_rpcclient_dfs.sh
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 174a76cc27f s3:smbd: Out-by-4 error in smbd read reply max_send clamp from 27ceb1c3ad7 tdb: version 1.4.7 https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 174a76cc27f25120af5a86bee3f26d9afad87d8f Author: Robert Sprowson Date: Sun Jul 19 12:59:00 2020 +0100 s3:smbd: Out-by-4 error in smbd read reply max_send clamp BUG: https://bugzilla.samba.org/show_bug.cgi?id=14443 Signed-off-by: Robert Sprowson Reviewed-by: Jeremy Allison Reviewed-by: Noel Power Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Jun 8 19:50:08 UTC 2022 on sn-devel-184 --- Summary of changes: source3/smbd/smb1_reply.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/smb1_reply.c b/source3/smbd/smb1_reply.c index 140d03242c3..6dfc636c9d8 100644 --- a/source3/smbd/smb1_reply.c +++ b/source3/smbd/smb1_reply.c @@ -2844,7 +2844,7 @@ static void reply_lockread_locked(struct tevent_req *subreq) /* * However the requested READ size IS affected by max_send. Insanity JRA. */ - maxtoread = req->xconn->smb1.sessions.max_send - (smb_size + 5*2 + 3); + maxtoread = req->xconn->smb1.sessions.max_send - (MIN_SMB_SIZE + 5*2 + 3); if (numtoread > maxtoread) { DBG_WARNING("requested read size (%zu) is greater than " @@ -2940,7 +2940,7 @@ void reply_read(struct smb_request *req) /* * The requested read size cannot be greater than max_send. JRA. */ - maxtoread = xconn->smb1.sessions.max_send - (smb_size + 5*2 + 3); + maxtoread = xconn->smb1.sessions.max_send - (MIN_SMB_SIZE + 5*2 + 3); if (numtoread > maxtoread) { DEBUG(0,("reply_read: requested read size (%u) is greater than maximum allowed (%u/%u). \ -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 27ceb1c3ad7 tdb: version 1.4.7 via 53692735c73 tevent: version 0.12.1 via 0189ccf9fc3 talloc: version 2.3.4 from 8e701978a70 s3:tests: Reformat test_rpcclientsrvsvc.sh https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 27ceb1c3ad786386e746a5e2968780d791393b9e Author: Stefan Metzmacher Date: Wed Jun 8 15:02:53 2022 +0200 tdb: version 1.4.7 * Fix build problems BUG: https://bugzilla.samba.org/show_bug.cgi?id=15071 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Jun 8 17:57:53 UTC 2022 on sn-devel-184 commit 53692735c733d01acbd953641f831a1f5e0cf6c5 Author: Stefan Metzmacher Date: Wed Jun 8 15:04:08 2022 +0200 tevent: version 0.12.1 * Fix build problems BUG: https://bugzilla.samba.org/show_bug.cgi?id=15071 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider commit 0189ccf9fc3d2a77cc83cffe180e307bcdccebb4 Author: Stefan Metzmacher Date: Wed Jun 8 15:01:55 2022 +0200 talloc: version 2.3.4 * Fix build problems BUG: https://bugzilla.samba.org/show_bug.cgi?id=15071 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- Summary of changes: .../ABI/{pytalloc-util-2.3.0.sigs => pytalloc-util-2.3.4.sigs} | 0 lib/talloc/ABI/{talloc-2.1.10.sigs => talloc-2.3.4.sigs}| 0 lib/talloc/wscript | 2 +- lib/tdb/ABI/{tdb-1.3.17.sigs => tdb-1.4.7.sigs} | 0 lib/tdb/wscript | 2 +- lib/tevent/ABI/{tevent-0.12.0.sigs => tevent-0.12.1.sigs} | 6 +++--- lib/tevent/wscript | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) copy lib/talloc/ABI/{pytalloc-util-2.3.0.sigs => pytalloc-util-2.3.4.sigs} (100%) copy lib/talloc/ABI/{talloc-2.1.10.sigs => talloc-2.3.4.sigs} (100%) copy lib/tdb/ABI/{tdb-1.3.17.sigs => tdb-1.4.7.sigs} (100%) copy lib/tevent/ABI/{tevent-0.12.0.sigs => tevent-0.12.1.sigs} (100%) Changeset truncated at 500 lines: diff --git a/lib/talloc/ABI/pytalloc-util-2.3.0.sigs b/lib/talloc/ABI/pytalloc-util-2.3.4.sigs similarity index 100% copy from lib/talloc/ABI/pytalloc-util-2.3.0.sigs copy to lib/talloc/ABI/pytalloc-util-2.3.4.sigs diff --git a/lib/talloc/ABI/talloc-2.1.10.sigs b/lib/talloc/ABI/talloc-2.3.4.sigs similarity index 100% copy from lib/talloc/ABI/talloc-2.1.10.sigs copy to lib/talloc/ABI/talloc-2.3.4.sigs diff --git a/lib/talloc/wscript b/lib/talloc/wscript index f0c266a7878..30896636404 100644 --- a/lib/talloc/wscript +++ b/lib/talloc/wscript @@ -1,7 +1,7 @@ #!/usr/bin/env python APPNAME = 'talloc' -VERSION = '2.3.3' +VERSION = '2.3.4' import os import sys diff --git a/lib/tdb/ABI/tdb-1.3.17.sigs b/lib/tdb/ABI/tdb-1.4.7.sigs similarity index 100% copy from lib/tdb/ABI/tdb-1.3.17.sigs copy to lib/tdb/ABI/tdb-1.4.7.sigs diff --git a/lib/tdb/wscript b/lib/tdb/wscript index 2eb25b7f235..71ada311dc2 100644 --- a/lib/tdb/wscript +++ b/lib/tdb/wscript @@ -1,7 +1,7 @@ #!/usr/bin/env python APPNAME = 'tdb' -VERSION = '1.4.6' +VERSION = '1.4.7' import sys, os diff --git a/lib/tevent/ABI/tevent-0.12.0.sigs b/lib/tevent/ABI/tevent-0.12.1.sigs similarity index 100% copy from lib/tevent/ABI/tevent-0.12.0.sigs copy to lib/tevent/ABI/tevent-0.12.1.sigs index 22a8ce33413..0e4d1e1fe26 100644 --- a/lib/tevent/ABI/tevent-0.12.0.sigs +++ b/lib/tevent/ABI/tevent-0.12.1.sigs @@ -67,14 +67,14 @@ tevent_get_trace_signal_callback: void (struct tevent_context *, tevent_trace_si tevent_get_trace_timer_callback: void (struct tevent_context *, tevent_trace_timer_callback_t *, void *) tevent_immediate_get_tag: uint64_t (const struct tevent_immediate *) tevent_immediate_set_tag: void (struct tevent_immediate *, uint64_t) -tevent_queue_entry_get_tag: uint64_t (const struct tevent_queue_entry *) -tevent_queue_entry_set_tag: void (struct tevent_queue_entry *, uint64_t) tevent_loop_allow_nesting: void (struct tevent_context *) tevent_loop_set_nesting_hook: void (struct tevent_context *, tevent_nesting_hook, void *) tevent_num_signals: size_t (void) tevent_queue_add: bool (struct tevent_queue *, struct tevent_context *, struct tevent_req *, tevent_queue_trigger_fn_t, void *) tevent_queue_add_entry: struct tevent_queue_entry *(struct tevent_queue *, struct tevent_context *, struct tevent_req *, tevent_queue_trigger_fn_t, void *) tevent_queue_add_optimize_empty: struct tevent_queue_entry *(struct tevent_queue *, struct tevent_context *, struct tevent_req *, tevent_queue_trigger_fn_t, void *) +tevent_queue_entry_get_tag: uint64_t (const
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8e701978a70 s3:tests: Reformat test_rpcclientsrvsvc.sh via c4b343e54b6 s3:tests: Reformat test_rpcclient_samlogon.sh via 48e1458bdbf s3:tests: Reformat test_rpcclient_pw_nt_hash.sh via b923da58578 s3:tests: Reformat test_rpcclient_netsessenum.sh via 24638a2e5e3 s3:tests: Reformat test_rpcclient_lookup.sh via 66577ad12db s3:tests: Reformat test_rpcclient_dfs.sh via 7f3b7a38e80 s3:tests: Reformat test_rpcclient.sh via e4eecb31d61 s3:tests: Reformat test_resolvconf.sh via e6225d77a60 s3:tests: Reformat test_registry_upgrade.sh via 3b6558d4e38 s3:tests: Reformat test_pthreadpool.sh via 07875d85696 s3:tests: Reformat test_printing_var_exp.sh via 162a803d2a7 s3:tests: Reformat test_preserve_case.sh via e01f7d72507 s3:tests: Reformat test_open_eintr.sh via 478ed598f9e s3:tests: Reformat test_offline.sh via ae8f5dec1fa s3:tests: Reformat test_netfileenum.sh from 1b6d675feb5 lib/smbconf: expose smbconf error codes to python wrapper https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8e701978a70d8323e0004be86e448c8c02341aa8 Author: Andreas Schneider Date: Fri Apr 22 15:34:10 2022 +0200 s3:tests: Reformat test_rpcclientsrvsvc.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Jun 8 14:13:35 UTC 2022 on sn-devel-184 commit c4b343e54b66207ca9b6cfb1d63cb3558d69a5a0 Author: Andreas Schneider Date: Fri Apr 22 15:34:10 2022 +0200 s3:tests: Reformat test_rpcclient_samlogon.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner commit 48e1458bdbfacbc1d37bc9e9e197f5e7e6b0e238 Author: Andreas Schneider Date: Fri Apr 22 15:34:10 2022 +0200 s3:tests: Reformat test_rpcclient_pw_nt_hash.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner commit b923da58578d28424781378072f3d38a69fb9756 Author: Andreas Schneider Date: Fri Apr 22 15:34:10 2022 +0200 s3:tests: Reformat test_rpcclient_netsessenum.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner commit 24638a2e5e3cd669d8488618d94059b977f6172b Author: Andreas Schneider Date: Fri Apr 22 15:34:10 2022 +0200 s3:tests: Reformat test_rpcclient_lookup.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner commit 66577ad12db1cdf61ff5ba479a1992073ef19929 Author: Andreas Schneider Date: Fri Apr 22 15:34:10 2022 +0200 s3:tests: Reformat test_rpcclient_dfs.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner commit 7f3b7a38e80ce3f03c7caa728e0880fe080b9647 Author: Andreas Schneider Date: Fri Apr 22 15:34:10 2022 +0200 s3:tests: Reformat test_rpcclient.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner commit e4eecb31d61de5ba66216ec9486faca87b82682f Author: Andreas Schneider Date: Fri Apr 22 15:34:10 2022 +0200 s3:tests: Reformat test_resolvconf.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner commit e6225d77a60e3da41d7a456885a2e48a574f907c Author: Andreas Schneider Date: Fri Apr 22 15:34:10 2022 +0200 s3:tests: Reformat test_registry_upgrade.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner commit 3b6558d4e38f9d56de871240514db7ac66e9960a Author: Andreas Schneider Date: Fri Apr 22 15:34:10 2022 +0200 s3:tests: Reformat test_pthreadpool.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner commit 07875d856969847d017e40fcefc123188c9838b7 Author: Andreas Schneider Date: Fri Apr 22 15:34:10 2022 +0200 s3:tests: Reformat test_printing_var_exp.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner commit 162a803d2a7f7e7933e2b2e1a4d3f23d7b6b2804 Author: Andreas Schneider Date: Fri Apr 22 15:34:10 2022 +0200 s3:tests: Reformat test_preserve_case.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Guenther
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1b6d675feb5 lib/smbconf: expose smbconf error codes to python wrapper from fdc98ff5560 s3:tests: Reformat test_net_usershare.sh https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1b6d675feb54d32224047ea59598c04a7a287038 Author: John Mulligan Date: Mon Jun 6 15:55:22 2022 -0400 lib/smbconf: expose smbconf error codes to python wrapper The smbconf library defines an enum of error codes that can be returned from the C calls. The error codes were getting stored in the python SMBConfError type but it was not easy to access or obvious what the integer code represented. This change makes it easier to get the returned error code: via a `error_code` attribute on the exception value. It also exposes the integer constants to the module. Simple tests for a few of the more obvious error codes check that this new error handling correctly exposes the error code values. Signed-off-by: John Mulligan Reviewed-by: Andreas Schneider Reviewed-by: Guenther Deschner Autobuild-User(master): Günther Deschner Autobuild-Date(master): Wed Jun 8 13:13:10 UTC 2022 on sn-devel-184 --- Summary of changes: lib/smbconf/pysmbconf.c | 39 ++- python/samba/tests/smbconf.py | 21 + 2 files changed, 55 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/smbconf/pysmbconf.c b/lib/smbconf/pysmbconf.c index b0aca4508af..1b3c101005a 100644 --- a/lib/smbconf/pysmbconf.c +++ b/lib/smbconf/pysmbconf.c @@ -35,7 +35,6 @@ static void py_raise_SMBConfError(sbcErr err) /* * TODO: have the exception type accept arguments in new/init -* and make the error value accessible as a property */ args = Py_BuildValue("(is)", err, sbcErrorString(err)); if (args == NULL) { @@ -44,11 +43,22 @@ static void py_raise_SMBConfError(sbcErr err) return; } v = PyObject_Call(PyExc_SMBConfError, args, NULL); - Py_DECREF(args); - if (v != NULL) { - PyErr_SetObject((PyObject *) Py_TYPE(v), v); - Py_DECREF(v); + if (v == NULL) { + Py_CLEAR(args); + return; + } + /* +* It's clearer to set an explicit error_code attribute for use in calling +* code to check what kind of SMBConfError was raised. +*/ + if (PyObject_SetAttrString(v, "error_code", PyTuple_GetItem(args, 0)) == -1) { + Py_CLEAR(v); + Py_CLEAR(args); + return; } + Py_CLEAR(args); + PyErr_SetObject((PyObject *) Py_TYPE(v), v); + Py_DECREF(v); } /* @@ -780,5 +790,24 @@ MODULE_INIT_FUNC(smbconf) return NULL; } +/* + * ADD_FLAGS macro borrowed from source3/libsmb/pylibsmb.c + */ +#define ADD_FLAGS(val) PyModule_AddObject(m, #val, PyLong_FromLong(val)) + + ADD_FLAGS(SBC_ERR_OK); + ADD_FLAGS(SBC_ERR_NOT_IMPLEMENTED); + ADD_FLAGS(SBC_ERR_NOT_SUPPORTED); + ADD_FLAGS(SBC_ERR_UNKNOWN_FAILURE); + ADD_FLAGS(SBC_ERR_NOMEM); + ADD_FLAGS(SBC_ERR_INVALID_PARAM); + ADD_FLAGS(SBC_ERR_BADFILE); + ADD_FLAGS(SBC_ERR_NO_SUCH_SERVICE); + ADD_FLAGS(SBC_ERR_IO_FAILURE); + ADD_FLAGS(SBC_ERR_CAN_NOT_COMPLETE); + ADD_FLAGS(SBC_ERR_NO_MORE_ITEMS); + ADD_FLAGS(SBC_ERR_FILE_EXISTS); + ADD_FLAGS(SBC_ERR_ACCESS_DENIED); + return m; } diff --git a/python/samba/tests/smbconf.py b/python/samba/tests/smbconf.py index e023e2ad59b..1f432a34608 100644 --- a/python/samba/tests/smbconf.py +++ b/python/samba/tests/smbconf.py @@ -324,6 +324,27 @@ class SMBConfTests(samba.tests.TestCase): names = sconf.share_names() self.assertEqual(names, ["hello", "goodnight"]) +def test_error_badfile(self): +with self.assertRaises(self.smbconf.SMBConfError) as raised: +self.smbconf.init_txt("/foo/bar/baz/_I-dont/.exist/-ok-") +self.assertEqual( +self.smbconf.SBC_ERR_BADFILE, raised.exception.error_code) + +def test_error_not_supported(self): +sconf = self.smbconf.init_txt(self.example_conf_default) +with self.assertRaises(self.smbconf.SMBConfError) as raised: +sconf.set_global_parameter("client min protocol", "NT1") +self.assertEqual( +self.smbconf.SBC_ERR_NOT_SUPPORTED, raised.exception.error_code) + +def test_error_no_such_service(self): +sconf = self.smbconf.init_txt(self.example_conf_default) +with self.assertRaises(self.smbconf.SMBConfError) as raised: +sconf.get_share("zilch"), +self.assertEqual( +self.smbconf.SBC_ERR_NO_SUCH_SERVICE,
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via fdc98ff5560 s3:tests: Reformat test_net_usershare.sh via 4c00642e726 s3:tests: Reformat test_net_tdb.sh via 6170f97bb11 s3:tests: Reformat test_net_rpc_share_allowedusers.sh via 7a916f886f3 s3:tests: Reformat test_net_rpc_oldjoin.sh via e1142d35206 s3:tests: Reformat test_net_rpc_join_creds.sh via 6b934192a08 s3:tests: Reformat test_net_rpc_join.sh via d9217a3eef6 s3:tests: Reformat test_net_registry_roundtrip.sh via d15210955bf s3:tests: Reformat test_net_registry_import.sh via d87d67a2e07 s3:tests: Reformat test_net_registry_check.sh via 08b02d4bb83 s3:tests: Reformat test_net_registry.sh via de01136107f s3:tests: Reformat test_net_misc.sh via a0802f556f2 s3:tests: Reformat test_net_machine_account.sh via 534ae9349ab s3:tests: Reformat test_net_lookup.sh via cf873c09d86 s3:tests: Reformat test_net_dom_join_fail_dc.sh via bdc6adaad58 s3:tests: Reformat test_net_cred_change.sh from b9188763823 s3:tests: Reformat test_net_conf.sh https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit fdc98ff5560903d64b10980d66826e8c50ef204a Author: Andreas Schneider Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_usershare.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Jun 8 07:28:08 UTC 2022 on sn-devel-184 commit 4c00642e726bd9687113d482c72526b5dedec83a Author: Andreas Schneider Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_tdb.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 6170f97bb11ac510508afd95927b6762f7bd8cf9 Author: Andreas Schneider Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_rpc_share_allowedusers.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 7a916f886f335296de86bbfe3fe74d5951f09b50 Author: Andreas Schneider Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_rpc_oldjoin.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit e1142d35206921995ea7a6e82d5bbdfe8dd90f02 Author: Andreas Schneider Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_rpc_join_creds.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 6b934192a08b99035668ad8ac90236e9228295f3 Author: Andreas Schneider Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_rpc_join.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit d9217a3eef6011c86b13e89fb3428dfd3f1baa5e Author: Andreas Schneider Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_registry_roundtrip.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit d15210955bffa7e2fade03c7e22dde20a9c03285 Author: Andreas Schneider Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_registry_import.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit d87d67a2e071c6f3e8e1fa6bd576b08a321058a1 Author: Andreas Schneider Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_registry_check.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 08b02d4bb839611bee22d625fb50db3f7c1395f4 Author: Andreas Schneider Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_registry.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit de01136107f0f52531ccee17dc8732f8e353b085 Author: Andreas Schneider Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_misc.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit a0802f556f23b585db6cac2d639e412aa83f47f2 Author: Andreas Schneider Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_machine_account.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett