summaryrefslogtreecommitdiff
path: root/source4/torture/libnetapi
AgeCommit message (Collapse)AuthorFilesLines
2026-03-20s4:torture:libnetapi: group fix cast-align warningsGary Lockyer1-7/+54
Adds code to check that buffer is aligned correctly for the expected types. Then suppresses the cast-align warnings with discard_align_p Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Volker Lendecke <vl@samba.org>
2026-03-20s4:torture:libnetapi: user fix cast-align warningsGary Lockyer1-11/+24
Use talloc_get_type_abort to suppress cats-align warnings. As buffer is allocated via talloc it will be correctly aligned. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Volker Lendecke <vl@samba.org>
2023-09-11netapi: Pass net's cmdline credentials to libnetapi_net_init()Samuel Cabrero1-6/+2
Avoid unnecessary credentials allocation and initialization by passing the net's cmdline creds to libnetapi_net_init() directly. Fixes the problem of running cli_credentials_guess() (which runs password callbacks) twice, one for the net's cmdline creds and a second time for the creds initialized in libnetapi_net_init(), just to override them immediately after. Example: $ export PASSWD_FD=0 $ ./bin/net offlinejoin composeodj <...> foo bar Password is read from STDIN twice. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-09-11netapi: Pass loadparm_context to libnetapi_net_init()Samuel Cabrero1-1/+1
The net's tool cmdline lp_ctx can be reused, no need to init a new one except for external library users. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-14s4:torture:libnetapi: Fix code spellingAndreas Schneider2-2/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-22torture: Fix build on freebsd, missing deps on cmdlineAmitay Isaacs1-1/+1
Missing dependency causes build failure on freebsd. [2928/3944] Compiling source4/torture/util_smb.c In file included from ../../source4/torture/util_smb.c:22: ../../lib/cmdline/cmdline.h:22:10: fatal error: 'popt.h' file not found ^~~~~~~~ 1 error generated. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Jun 22 02:05:17 UTC 2021 on sn-devel-184
2021-06-16s4:torture: Migrate smbtorture to new cmdline option parserAndreas Schneider2-4/+4
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-03-16lib: Remove init_names()Volker Lendecke1-1/+0
is_myname() looks at lp_* directly, nmbd maintains its own list: We don't need the baroque loadparm handler anymore. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-08-28lib/util: remove extra safe_string.h fileMatthew DeVore2-0/+4
lib/util/safe_string.h is similar to source3/include/safe_string.h, but the former has fewer checks. It is missing bcopy, strcasecmp, and strncasecmp. Add the missing elements to lib/util/safe_string.h remove the other safe_string.h which is in the source3-specific path. To accomodate existing uses of str(n?)casecmp, add #undef lines to source files where they are used. Signed-off-by: Matthew DeVore <matvore@google.com> Reviewed-by: David Mulder <dmulder@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Aug 28 02:18:40 UTC 2020 on sn-devel-184
2018-11-22s4:torture: Initialize pointers in libnetapi user testAndreas Schneider1-2/+2
Found by Undefined Sanitizer. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2017-05-11s4: popt: Global replace of cmdline_credentials -> ↵Jeremy Allison1-2/+2
popt_get_cmdline_credentials(). Add one use of popt_set_cmdline_credentials(). Fix 80 column limits when cmdline_credentials changes to popt_get_cmdline_credentials(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-05s4: torture: Change torture_register_suite() to add a TALLOC_CTX *.Jeremy Allison1-2/+2
Change callers to use the passed in TALLOC_CTX * instead of talloc_autofree_context(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
2017-04-22lib: modules: Change XXX_init interface from XXX_init(void) to ↵Jeremy Allison1-1/+1
XXX_init(TALLOC_CTX *) Not currently used - no logic changes inside. This will make it possible to pass down a long-lived talloc context from the loading function for modules to use instead of having them internally all use talloc_autofree_context() which is a hidden global. Updated all known module interface numbers, and added a WHATSNEW. Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 22 01:17:00 CEST 2017 on sn-devel-144
2016-09-28werror: replace WERR_GENERAL_FAILURE with WERR_GEN_FAILURE in ↵Günther Deschner1-1/+1
source4/torture/libnetapi/libnetapi.c Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2016-03-04s4/torture/libnetapi/libnetapi_user.c: fix typoAurelien Aptel1-1/+1
fixed misplaced parenthesis and wrong sizeof(). Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: David Disseldorf <ddis@suse.de>
2015-04-22s4:torture:libnetapi: use lp_load_global() instead of lp_load()Michael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
2015-03-20s4:torture/libnetapi: remove allow_warnings=TrueStefan Metzmacher1-1/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Mar 20 23:23:55 CET 2015 on sn-devel-104
2015-03-20s4:torture/libnetapi: avoid compiler warningStefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-30Fix several talloc stack frames not freedSamuel Cabrero1-0/+1
Signed-off-by: Samuel Cabrero <scabrero@zentyal.com> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Kamen Mazdrashki <kamenim@samba.org> Autobuild-Date(master): Fri May 30 15:29:29 CEST 2014 on sn-devel-104
2014-04-02s4:torture/libnetapi: explicitly use allow_warnings=TrueStefan Metzmacher1-0/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2012-07-18source4/torture: add talloc_stackframe()Rusty Russell1-0/+3
We need a stackframe to call lp_load(). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Wed Jul 18 09:31:07 CEST 2012 on sn-devel-104
2011-10-11lib/param move source4 param code to the top levelAndrew Bartlett1-1/+1
This is done so that the lpcfg_ functions are available across the whole build, either with the struct loadparm_context loaded from an smb.conf directly or as a wrapper around the source3 param code. This is not the final, merged loadparm, but simply one step to make it easier to solve other problems while we make our slow progress on this difficult problem. Andrew Bartlett
2011-06-21s4-torture Enable libnetapi and libsmbclient tests using combined buildAndrew Bartlett2-10/+23
Because we now always build the source3 code, we can link directly against a private libnetapi and libsmbclient to test the behaviour of these important APIs. We use a private libnetapi_net_init(), and by using this interface rather than the public one, we can ensure that the correct smb.conf is loaded (as smbtorture4 is a Samba4 semantics binary). The #include of the source3 includes.h is required to do the manual lp_load(). Andrew Bartlett
2010-12-11s4-smbtorture: Make test names lowercase and dot-separated.Jelmer Vernooij1-5/+5
This is consistent with the test names used by selftest, should make the names less confusing and easier to integrate with other tools. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Dec 11 04:16:13 CET 2010 on sn-devel-104
2010-10-31s4: Remove the old perl/m4/make/mk-based build system.Jelmer Vernooij2-55/+0
The new waf-based build system now has all the same functionality, and the old build system has been broken for quite some time. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
2010-09-20s4-smbtorture: add NetRemoteTOD libnetapi torture test.Günther Deschner4-2/+80
Guenther
2010-04-11subunit: Support formatting compatible with upstream subunit, for consistency.Jelmer Vernooij2-18/+18
Upstream subunit makes a ":" after commands optional, so I've fixed any places where we might trigger commands accidently. I've filed a bug about this in subunit.
2010-04-06s4-waf: removed the AUTOGENERATED markersAndrew Tridgell1-4/+0
we won't be using the mk -> wscript generator again
2010-04-06s4-waf: mark the wscript files as python so vim/emacs knows how to highlight ↵Andrew Tridgell1-0/+2
them
2010-04-06build: waf quicktest nearly worksAndrew Tridgell1-1/+1
Rewrote wafsamba using a new dependency handling system, and started adding the waf test code
2010-04-06build: commit all the waf build files in the treeAndrew Tridgell1-0/+14
2009-06-17s4-smbtorture: add test for NetUserSetInfo level 0 (user rename).Günther Deschner1-2/+13
Guenther
2009-06-17s4-smbtorture: use TORTURE_TEST_USER define in libnetapi user test.Günther Deschner1-17/+15
Guenther
2009-06-04s4:torture Make Samba4 build on hosts with an older libnetapiAndrew Bartlett1-1/+6
For example, Samba4 would not build (for the last week) on Fedora 10, with samba-common 3.2.11 installed. Andrew Bartlett
2009-06-03s4:torture/libnetapi: fix netapi detectionStefan Metzmacher1-3/+7
We need to set SMB_ENABLE(TORTURE_LIBNETAPI,NO) first to overwrite the default of YES for MODULES and then only set it to YES if netapi was found. metze
2009-05-29s4-smbtorture: add NETAPI-GROUP test.Günther Deschner3-1/+523
Guenther
2009-05-29s4-smbtorture: add NETAPI-USER test.Günther Deschner3-1/+479
Guenther
2009-05-29s4-smbtorture: add very basic LIBNETAPI testsuite.Günther Deschner3-0/+121
Guenther