1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

168 Commits

Author SHA1 Message Date
Douglas Bagnall
cb5f1f3b26 unittests.lib_util_modules: test module probe with "skel", not "unix"
The unix module is not available as a module on some systems.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-02-22 01:04:18 +01:00
Gary Lockyer
d11473b15d source3: remove sock_exec
Remove the sock_exec code which is no longer needed and additionally has been
used by exploit code.

This was originally test support code, the tests relying on the sock_exec
code have been removed.

Past exploits have used sock_exec as a proxy for system() matching a talloc
destructor prototype.

See for example:
Exploit for Samba vulnerabilty (CVE-2015-0240) at
    https://gist.github.com/worawit/051e881fc94fe4a49295
    and the Red Hat post at
    https://access.redhat.com/blogs/766093/posts/1976553

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Nov 20 07:20:13 CET 2017 on sn-devel-144
2017-11-20 07:20:13 +01:00
Lumir Balhar
09104dc417 unittests: Fix missing include of signal.h
Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Oct 18 14:24:39 CEST 2017 on sn-devel-144
2017-10-18 14:24:39 +02:00
Volker Lendecke
30ffc120e2 testsuite: Fix the 32-bit test build
samba_init_module returns 32-bit. For some reason on my
32-bit lxc "return 0" was converted to something but
NT_STATUS_OK, making initialization fail.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Sep 21 02:49:32 CEST 2017 on sn-devel-144
2017-09-21 02:49:32 +02:00
Andreas Schneider
1de4390353 unittests: Do not install the test_dummy rpc module
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12879

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jul  5 22:21:06 CEST 2017 on sn-devel-144
2017-07-05 22:21:06 +02:00
Andreas Schneider
5d18c5e5ec unittests: Add missing stdint.h include
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12878

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2017-07-05 17:54:10 +02:00
Andreas Schneider
61f827bcdd unittest: Add testsuite for smb_probe_module()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12780

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-06-06 18:36:07 +02:00
Andreas Schneider
90b69ba95d unittest: Add testsuite for is_known_pipename()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12780

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-06-06 18:36:06 +02:00
Andreas Schneider
94b7672d48 third_party: Add cmocka 1.1.1
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Apr 10 11:38:13 CEST 2017 on sn-devel-144
2017-04-10 11:38:13 +02:00
Ian Stakenvicius
7142a88441 waf: disable-python - don't include python.h in test_headers.c
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Mar 10 11:24:13 CET 2017 on sn-devel-144
2017-03-10 11:24:13 +01:00
Andreas Schneider
85d5b43392 waf: Do not install the unit test binary for krb5samba
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12552

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Feb 13 14:17:39 CET 2017 on sn-devel-144
2017-02-13 14:17:39 +01:00
Andreas Schneider
7585aa6c8f testsuite: Add cmocka unit test for smb_krb5_kt_open()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Dec 16 05:43:12 CET 2016 on sn-devel-144
2016-12-16 05:43:10 +01:00
Jelmer Vernooij
3123e2c66a Simplify handling of dependencies on external libraries in test_headers.
Signed-off-by: Jelmer Vernooij <jelmer@jelmer.uk>
2016-01-13 04:43:22 +01:00
Stefan Metzmacher
54ea6ff788 testsuite/headers: remove unused checks for ntdb.h
ntdb is already removed.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Karolin Seeger <kseeger@samba.org>
2015-07-21 19:04:15 +02:00
Volker Lendecke
334015ebca autobuild: Remove ntdb target
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-03-17 11:30:51 +01:00
Volker Lendecke
89052936ae Remove ntdb from scripts
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-03-17 11:30:51 +01:00
Ira Cooper
38de110b02 third_party/popt: Initial support for popt.
ctdb, ldb, and samba are supported builds for third_party popt.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-09 18:26:17 +02:00
Andreas Schneider
69b3a0cb3f testsuit: Fix fprintf format.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-15 11:07:40 -08:00
Jeremy Allison
821bd95156 Replace all uses of setXX[ug]id() and setgroups with samba_setXX[ug]id() calls.
Will allow thread-specific credentials to be added by modifying
the central definitions. Deliberately left the setXX[ug]id()
call in popt as this is not used in Samba.
2012-06-28 17:15:16 -07:00
Rusty Russell
1fe797aada ntdb: put it back into the build.
This doesn't do anything with it yet, just wires it back into the build.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-19 05:38:07 +02:00
Andrew Bartlett
9712912dfc testsuite/libsmbclient: Remove unused and expensive-to-link testsuite
This testsuite never got off the ground, and unlike the other
libsmbclient tests, it is not integrated into make test, has no driver
script we could integrate.

As it has been in this state for 10 years, and adding it to the compile
did not find any link-time issues (particularly in comparison to the
link-time cost for so many individual binaries), I am now removing them.

The libsmbclient examples are seperate to this, and remain in
examples/libsmbclient.

Andrew Bartlett
2012-05-02 10:53:51 +10:00
Amitay Isaacs
cac9bfe475 testsuite: Replace deprecated bzero with memset
This fixes build issues on solaris reported in bug #8767.

  https://bugzilla.samba.org/show_bug.cgi?id=8767

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Wed Feb 29 10:39:10 CET 2012 on sn-devel-104
2012-02-29 10:39:09 +01:00
Andrew Bartlett
62a66b00b6 testsuite: Remove unused and unlikely to be revived DejaGNU tests 2011-12-12 12:57:08 +01:00
Günther Deschner
ef87630594 s3-libsmbclient: make some functions static in testsuite code.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Oct 25 17:57:25 CEST 2011 on sn-devel-104
2011-10-25 17:57:25 +02:00
Andrew Bartlett
3ae478be0f build: compile (but do not install) all the libsmbclient tests
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Oct 20 13:49:39 CEST 2011 on sn-devel-104
2011-10-20 13:49:39 +02:00
Rusty Russell
ca1936fbb2 tdb_compat: use tdb_open_compat.
This is a helper for the common case of opening a tdb with a logging
function, but it doesn't do all the work, since TDB1 and TDB2's log
functions are different types.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Volker Lendecke
ce9d63d161 s3: Remove the smbtorture3 OPLOCK3 test
This is the last user of cli_receive_smb. Oplocks are nowadays tested
in smbtorture4, this mainly has historic value
2011-05-22 21:07:40 +02:00
Andrew Tridgell
46384cf60a headers: cope with non-system popt in test_headers
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Mar 16 09:09:40 CET 2011 on sn-devel-104
2011-03-16 09:09:40 +01:00
Andrew Tridgell
3cfa8216b9 headers: include Python.h first to avoid warnings 2011-03-16 08:23:25 +01:00
Andrew Tridgell
72ca88d604 build: fixed cflags for test_header
when using system libraries, we need the right cflags
2011-03-15 12:22:20 +11:00
Andrew Tridgell
ba9ae79e0b build: added automated testing of our public headers
we generate test_headers.h, which includes all of our public headers,
and check it compiles
2011-03-15 12:22:19 +11:00
Andrew Bartlett
cba7f8b827 s3:dom_sid Global replace of DOM_SID with struct dom_sid
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Lars Müller
8e26aa3d7c testsuite/libsmbclient use source3 in the path of the C and LFLAGS 2010-01-28 00:44:04 +01:00
Lars Müller
97c4c63990 Link testsuite/libsmbclient against required libtdb and libwbclient 2010-01-28 00:38:04 +01:00
Bo Yang
238bf25af4 s3: add a test to test libsmbclient
Signed-off-by: Bo Yang <boyang@samba.org>
2009-08-08 06:26:43 +08:00
Slava Semushin
3f5403220f testsuite/nsswitch/get{gr,pw}ent_r.c(dump_{gr,pw}ent): fixed wrong condition.
When fopen() fails it return NULL, so condition where return value
less than zero never evaluated to truth.

Found by cppcheck.
2009-06-06 22:45:02 +02:00
todd stecher
989ad44d32 Memory leaks and other fixes found by Coverity 2009-01-21 17:13:03 -08:00
Kai Blin
c88cbbfdf3 vlp: Move closer to the code tested. 2008-10-19 15:03:22 +02:00
Michael Adam
199eb31cc9 vlp: fix an implicit cast compile warning.
Michael
(This used to be commit bf46f614c4)
2008-04-10 01:11:31 +02:00
Kai Blin
5c1e5b30a5 vlp: Build vlp (virtual line printer) against current git on make
everything.
(This used to be commit 212ab58a3a)
2007-12-11 11:53:57 +01:00
Andrew Tridgell
153cfb9c83 r23801: The FSF has moved around a lot. This fixes their Mass Ave address.
(This used to be commit 87c91e4362)
2007-10-10 12:28:27 -05:00
Andrew Tridgell
28b9d61076 r23800: LGPL is now called GNU Lesser General Public License
not GNU Library General Public License
(This used to be commit 727a6cf2cb)
2007-10-10 12:28:26 -05:00
Andrew Tridgell
9fa1c63578 r23798: updated old Temple Place FSF addresses to new URL
(This used to be commit c676a97114)
2007-10-10 12:28:26 -05:00
Andrew Tridgell
5b4c4181b4 r23797: started fixing old FSF addresses. Fixed pcap2nbench COPYING file
(This used to be commit e87bb12093)
2007-10-10 12:28:26 -05:00
Andrew Tridgell
34bb47c9b0 r23791: found some more v2->v3 conversions
(This used to be commit b6cbac3db3)
2007-10-10 12:28:25 -05:00
Andrew Tridgell
58e9534300 r23785: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit d0e89d246d)
2007-10-10 12:28:23 -05:00
Jeremy Allison
2a9b4da0fa r23780: Find and fix more GPL2 -> GPL3.
Jeremy.
(This used to be commit c2f7ab1c17)
2007-10-10 12:28:21 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Lars Müller
b372fd2cff r14317: Use source/bin as dir to link pam_winbind instead of source/nsswitch/
The intention is to have the resulting binaries at one place.  This is
also usefull for upcoming changes to provide a test_pammodules rule.

With these changes I even got aware of
testsuite/nsswitch/pam_winbind_syms.exp  But this only covers
pam_winbind.
(This used to be commit 9883957b74)
2007-10-10 11:15:24 -05:00
Derrell Lipman
7a8ee79925 r6501: correct deprecated lvalue casts in testsuite/libsmbclient
(This used to be commit 6d22c3c343)
2007-10-10 10:56:43 -05:00