1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/source3
Michael Tokarev 976326fa2b s3/util/py_net.c: fix samba-tool domain join&leave segfault
We process python args using PyArg_ParseTupleAndKeywords(), and use "p"
type modifier there.  According to documentation, this type modifier,
while works for a boolean type, expects an argument of type int. But in
py_net_join_member() and  py_net_leave() we use argument of type uint8_t
(no_dns_update, keep_account, r->in.debug). So when PyArg_ParseTupleAndKeywords()
tries to assign a value to &no_dns_update, it updates subsequent, unrelated bytes
too, - which ones depends on the stack and structure layout used by the compiler.

Fix this by using int type for all relevant variables, and by introducing proxy
variable "debug" (of the same type) for r->in.debug.

While at it, also ensure all variables have sensible default values.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed May 25 06:19:32 UTC 2022 on sn-devel-184
2022-05-25 06:19:32 +00:00
..
auth s3:auth: Fix user_in_list() for UNIX groups 2022-04-07 09:49:44 +00:00
build
client s3/client: Restore '-E' handling 2022-05-24 10:29:27 +00:00
exports
groupdb lib: relicense smb_strtoul(l) under LGPLv3 2020-08-03 22:21:02 +00:00
include smbd: add fstat_before_close fsp flag and logic 2022-05-02 19:13:31 +00:00
intl
lib s3:lib: Fix use_after_free: Using freed pointer "p" 2022-05-23 18:25:28 +00:00
libads s3:libads: Clear previous CLDAP ping flags when reusing the ADS_STRUCT 2022-05-23 19:18:38 +00:00
libgpo/gpext
libnet s3:libnet: Fix talloc frame not freed in order 2022-05-23 18:25:28 +00:00
librpc s3:rpc_server: Delete unused code and doc references 2021-12-10 14:02:30 +00:00
libsmb s3:libsmb: Covscan: unchecked return value for cli_credentials_set_smb_encryption() 2022-05-14 03:49:32 +00:00
locale s3:locale: Reformat shell scripts 2022-03-03 00:59:34 +00:00
locking s3: smbd: Move implicit call to lp_posix_cifsu_locktype() out of init_strict_lock_struct(). 2022-01-06 15:11:38 +00:00
modules smbd: Simplify copy_file() 2022-05-20 19:02:37 +00:00
nmbd source3: move lib/substitute.c functions out of proto.h 2021-11-11 13:49:32 +00:00
param s4: dns: Add customizable dns port option 2022-03-25 20:25:28 +00:00
passdb passdb: Introduce helper variables in make_pdb_method_name() 2022-04-26 21:41:29 +00:00
printing smbd: Simplify copy_file() 2022-05-20 19:02:37 +00:00
profile profile3: remove an unused include 2022-01-18 20:22:38 +00:00
registry registry3: Align some integer types 2022-05-20 19:02:37 +00:00
rpc_client s3:rpc_client: Fix memory allocation hierarchy 2022-04-30 00:10:34 +00:00
rpc_server srvsvcd: Silence a integer type warning 2022-05-20 19:59:07 +00:00
rpcclient s3:rpcclient: Fix crash in rpcclient 2022-03-07 00:00:32 +00:00
script s3/script/tests: Test smbclient -E redirects output to stderr 2022-05-24 09:33:31 +00:00
selftest selftest: Test for bug 15062 -- list "username" in netshareenum 2022-05-18 16:50:34 +00:00
services s3:services: Disable rcinit-based service control code 2021-12-10 14:02:30 +00:00
smbd smbd: Simplify copy_file() 2022-05-20 19:02:37 +00:00
torture Revert "vfs: remove dirfsp arg from SMB_VFS_CREATE_FILE()" 2022-04-28 13:12:33 +00:00
utils s3/util/py_net.c: fix samba-tool domain join&leave segfault 2022-05-25 06:19:32 +00:00
web
winbindd s3:winbind: Remove struct winbindd_child_dispatch_table 2022-05-19 18:50:24 +00:00
.clang_complete
.dmallocrc
.indent.pro
Doxyfile
mainpage.dox
smbadduser.in
wscript waf: re-add missing readlink test 2022-02-18 23:12:51 +00:00
wscript_build source3/lib/smbconf: add python bindings for init functions 2022-05-06 17:16:30 +00:00
wscript_configure_system_ncurses