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

123006 Commits

Author SHA1 Message Date
David Mulder
cd4efb95da gpo: Move all scripts to a sub-category in samba.admx
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-08-06 16:38:36 +00:00
David Mulder
b30a604f73 gpo: Apply Group Policy Weekly Scripts
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-08-06 16:38:35 +00:00
David Mulder
7e5c842cba gpo: Test gpo weekly scripts apply
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-08-06 16:38:35 +00:00
David Mulder
1810e4f10c gpo: Apply Group Policy Monthly Scripts
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-08-06 16:38:35 +00:00
David Mulder
63703c9a07 gpo: Test gpo monthly scripts apply
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-08-06 16:38:35 +00:00
David Mulder
42f043ab51 gpo: Apply Group Policy Hourly Scripts
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-08-06 16:38:35 +00:00
David Mulder
ae56a07ae7 gpo: Test gpo hourly scripts apply
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-08-06 16:38:35 +00:00
Ralph Boehme
182cde4f9e lib: fix smb_strtox.[c|h] license header
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Aug  5 10:17:06 UTC 2020 on sn-devel-184
2020-08-05 10:17:06 +00:00
Jeremy Allison
860510b196 s3: libsmb: Move all calls to convert_ss2service() to one place now all methods return a sockaddr_storage.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>

Autobuild-User(master): Isaac Boukris <iboukris@samba.org>
Autobuild-Date(master): Tue Aug  4 10:13:53 UTC 2020 on sn-devel-184
2020-08-04 10:13:53 +00:00
Jeremy Allison
03112db121 s3: libsmb: Now all resolution functions return a ss_list on success, we only need one local variable for this.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:43 +00:00
Jeremy Allison
ecaa424448 s3: libsmb: Change resolve_ads() to return a talloc'ed ss_list, matching the other name resolution methods.
Now we can move all the convert_ss2service() calls to one place.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:43 +00:00
Jeremy Allison
d53ade5beb s3: libsmb: Rewrite resolve_ads() to use the previously added dns_lookup_list() function.
Clean up internals - a LOT.

This one needs careful review. Ditch the (unused) port returns from
the SRV replies.

Internally uses talloc'ed arrays of struct sockaddr_storage
which it then convert to MALLOC'ed struct ip_service.

Still returns struct ip_service but this will be
fixed in the next commit.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:43 +00:00
Jeremy Allison
d0fa32bdcd s3: libsmb: Add in (currently unused) function dns_lookup_list().
This function takes a list of names returned from a DNS SRV
query which didn't have returned IP addresses and returns an
array of struct sockaddr_storage.

Currently synchronous, but this is the function that will
be changed to be asynchronous later.

Compiles but commented out for now so we don't get "unused
function" warnings.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:42 +00:00
Jeremy Allison
97781fe0ae s3: libsmb: Pass in TALLOC_CTX * parameter to resolve_ads() instead of creating one internally.
Pass in talloc_tos() to make it match the other resolve_XXX() functions.

No memory leaks as this is used for transient data and is cleaned up
when the calling frame in internal_resolve_name() is destroyed.

Preparing to have it return a talloc'ed struct sockaddr_storage array
rather than a malloc'ed struct ip_service array.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:42 +00:00
Jeremy Allison
2297c883b5 s3: libsmb: Cleanup - ensure ss_list variables are initialized with NULL.
No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:42 +00:00
Jeremy Allison
eaea3c0a62 s3: libsmb: Cleanup - put talloc parameter first in name_resolve_bcast().
No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:42 +00:00
Jeremy Allison
cef158a75c s3: libsmb: Cleanup - put talloc parameter first in resolve_wins().
No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:42 +00:00
Jeremy Allison
7ad92b3702 s3/s4: Cleanup. Move TALLOC_CTX * parameter to be first in resolve_lmhosts_file_as_sockaddr() to match modern conventions.
No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:42 +00:00
Jeremy Allison
f12cee2361 s3: libsmb: Cleanup - put talloc parameter first in resolve_hosts().
No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:42 +00:00
Jeremy Allison
53474b57e1 s3: libsmb: Cleanup - reformatting name_resolve_bcast() parameters inside internal_resolve_name().
No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:42 +00:00
Jeremy Allison
1cb67bd31c s3: libsmb: Cleanup - reformatting resolve_wins() parameters inside internal_resolve_name().
No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:42 +00:00
Jeremy Allison
e8db4b0909 s3: libsmb: Cleanup - reformatting resolve_lmhosts_file_as_sockaddr() parameters inside internal_resolve_name().
No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:42 +00:00
Jeremy Allison
d42ba0b1b6 s3: libsmb: Cleanup - reformatting 2nd use of resolve_ads() parameters inside internal_resolve_name().
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:42 +00:00
Jeremy Allison
cd3cc111a4 s3: libsmb: Cleanup - reformatting resolve_ads() parameters inside internal_resolve_name().
No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:42 +00:00
Jeremy Allison
dd165b2c96 s3: libsmb: Cleanup - reformatting resolve_hosts() parameters inside internal_resolve_name().
No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:42 +00:00
Jeremy Allison
2ad4889919 s3: libsmb: Cleanup - Remove incorrect comment in resolve_ads(). The DNS code copes fine with IPv6 addresses.
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:42 +00:00
Jeremy Allison
e07fa95349 s3: libsmb: Cleanup - modernize DEBUG -> DBG_ in internal_resolve_name()
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:41 +00:00
Jeremy Allison
14433e2afa s3: libsmb: Cleanup - split allocation and NULL check in internal_resolve_name().
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:41 +00:00
Jeremy Allison
1499fd8a2e s3: libsmb: Cleanup - use helper 'ok' bool for internal_resolve_name().
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:41 +00:00
Jeremy Allison
4abcb3001e s3: libsmb: Cleanup - use helper 'ok' bool for name_resolve_bcast().
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:41 +00:00
Jeremy Allison
d48d60595a s3: libsmb: Cleanup - use helper 'ok' bool for resolve_wins().
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:41 +00:00
Jeremy Allison
8e20de549f s3: libsmb: Cleanup - use helper 'ok' bool for resolve_lmhosts_file_as_sockaddr().
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:41 +00:00
Jeremy Allison
d4e430635e s3: libsmb: Cleanup - use helper 'ok' bool for resolve_hosts().
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:41 +00:00
Jeremy Allison
75469fcfbf s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for name_resolve_bcast().
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:41 +00:00
Jeremy Allison
ba656a7950 s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve_wins().
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:41 +00:00
Jeremy Allison
02f72478e2 s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for 0x1D name in resolve_wins().
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:41 +00:00
Jeremy Allison
114fe82343 s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve_lmhosts_file_as_sockaddr().
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:41 +00:00
Jeremy Allison
139d7a73c0 s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve_ads().
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:41 +00:00
Jeremy Allison
e74b323a4e s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for KDC resolve_ads().
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:41 +00:00
Jeremy Allison
bfe1b6eee9 s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve_hosts().
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:41 +00:00
Jeremy Allison
a4c85116e5 s3: libsmb: Cleanup - ensure we don't try and continue resolving names on failure of convert_ss2service().
Logic change, but correct error cleanup - jump to new 'fail:' label.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-04 08:51:41 +00:00
Jeremy Allison
12c526f151 s3: scripts: Selfttest. samba3.blackbox.smbclient_iconv.*
Fix missing 'include' in temporary client smb.conf file.

The current temporary generated smb.conf file for the client, "client_cp850_smbconf"
doesn't include the normal client smb.conf file "client.conf".

This means it's missing the:

interfaces = XXXX,YYYY

line we needed to find the server via socketwrapper. Currently this test is finding the server by accident :-).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Aug  4 06:30:25 UTC 2020 on sn-devel-184
2020-08-04 06:30:25 +00:00
Ralph Boehme
2327471756 lib: relicense smb_strtoul(l) under LGPLv3
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Aug  3 22:21:04 UTC 2020 on sn-devel-184
2020-08-03 22:21:02 +00:00
Samuel Thibault
611e643d14 ldap_server: fix hurd build
There is no hardcoded IOV_MAX iov limitation on GNU/Hurd. We however do
not want unbound allocation, so define it to a reasonable amount.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Aug  3 09:39:02 UTC 2020 on sn-devel-184
2020-08-03 09:39:02 +00:00
Douglas Bagnall
06f87f14b3 README.Coding: target Python 3.6+
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Aug  3 04:13:37 UTC 2020 on sn-devel-184
2020-08-03 04:13:37 +00:00
Douglas Bagnall
14210c248a python tests: drop python 2.6 compatibility functions
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-08-03 02:51:35 +00:00
Douglas Bagnall
9148f38c20 ndr: avoid excessive reallocing in pull_string_array
Before, talloc_realloc() was being called n times for an array of
length n. This could be very expensive on long string arrays since it
is reasonable to assume each realloc moves O(n) bytes.

This addresses at least one OSS-Fuzz bug, making a timing out test case
100 times faster. Credit to OSS-Fuzz.

REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19706

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-08-03 02:51:35 +00:00
Douglas Bagnall
9bf331b46a ndr: maintain proper talloc tree in pull_string_array
We don't want to leave other parts of the ndr struct hanging off this
string array just because LIBNDR_FLAG_REMAINING is used.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-08-03 02:51:35 +00:00
Douglas Bagnall
326bc84c0d oss-fuzz: use uninstrumented dynamic python
We can't link to the instrumented statically built Python, so instead
we use the system Python in the docker image.

REF: https://github.com/google/oss-fuzz/issues/4223
REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22618
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14451

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-08-03 02:51:35 +00:00
Ralph Boehme
698d20d39d smbd: remove get_current_vuid()
The last user was removed by 3d09993725.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Jul 29 13:44:47 UTC 2020 on sn-devel-184
2020-07-29 13:44:47 +00:00