amitay/samba.git
4 years agoctdb/server/ctdb_client.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/server/ctdb_client.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/server/ctdb_call.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/server/ctdb_call.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/include/ctdb_private.h: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/include/ctdb_private.h: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/ib/ibwrapper_test.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/ib/ibwrapper_test.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/ib/ibw_ctdb.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/ib/ibw_ctdb.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/doc/readonlyrecords.txt: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/doc/readonlyrecords.txt: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/doc/ctdb.1.xml: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/doc/ctdb.1.xml: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/doc/ctdb-tunables.7.xml: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/doc/ctdb-tunables.7.xml: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/doc/ctdb-statistics.7.xml: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/doc/ctdb-statistics.7.xml: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/common/srvid.h: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/common/srvid.h: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/client/client.h: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/client/client.h: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agobuildtools/wafsamba/wscript: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
buildtools/wafsamba/wscript: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agobuildtools/wafsamba/samba_install.py: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
buildtools/wafsamba/samba_install.py: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource4/scripting/bin/samba_upgradeprovision: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:10 +0000 (02:41 +0200)]
source4/scripting/bin/samba_upgradeprovision: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource4/rpc_server/lsa/lsa_lookup.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source4/rpc_server/lsa/lsa_lookup.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource4/libcli/libcli.h: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source4/libcli/libcli.h: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource4/libcli/clireadwrite.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source4/libcli/clireadwrite.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource4/dsdb/schema/schema_description.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source4/dsdb/schema/schema_description.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource3/winbindd/winbindd_util.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source3/winbindd/winbindd_util.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource3/utils/net_rpc.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source3/utils/net_rpc.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource3/smbd/reply.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source3/smbd/reply.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource3/registry/reg_parse.h: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source3/registry/reg_parse.h: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource3/registry/reg_import.h: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source3/registry/reg_import.h: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource3/registry/reg_format.h: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source3/registry/reg_format.h: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource3/modules/vfs_virusfilter.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source3/modules/vfs_virusfilter.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource3/modules/vfs_recycle.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source3/modules/vfs_recycle.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agopython/samba/upgradehelpers.py: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
python/samba/upgradehelpers.py: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agopython/samba/netcmd/gpo.py: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
python/samba/netcmd/gpo.py: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agopython/samba/dbchecker.py: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
python/samba/dbchecker.py: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agolibrpc/ndr/ndr_compression.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
librpc/ndr/ndr_compression.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agolibgpo/gpo_filesync.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
libgpo/gpo_filesync.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agolib/tdb/docs/tracing.txt: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
lib/tdb/docs/tracing.txt: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agolib/replace/xattr.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
lib/replace/xattr.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoexamples/VFS/skel_transparent.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
examples/VFS/skel_transparent.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agodynconfig/wscript: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
dynconfig/wscript: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agos3:smbclient added ABI signature file
Puran Chand [Mon, 21 Oct 2019 06:09:18 +0000 (11:39 +0530)]
s3:smbclient added ABI signature file

Signed-off-by: Puran Chand <pchand@vmware.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Oct 30 22:18:15 UTC 2019 on sn-devel-184

4 years agos4: torture: Add additional smbc_readdirplus2() tests into readdirplus_seek().
Jeremy Allison [Fri, 18 Oct 2019 18:44:07 +0000 (11:44 -0700)]
s4: torture: Add additional smbc_readdirplus2() tests into readdirplus_seek().

Make sure we haven't broken anything :-).

Signed-off-by: Puran Chand <pchand@vmware.com>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4: torture Add a test for smbc_readdirplus2()
Jeremy Allison [Fri, 18 Oct 2019 18:29:19 +0000 (11:29 -0700)]
s4: torture Add a test for smbc_readdirplus2()

Signed-off-by: Puran Chand <pchand@vmware.com>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3: libsmb: Added new API smbc_readdirplus2()
Jeremy Allison [Fri, 18 Oct 2019 17:29:48 +0000 (10:29 -0700)]
s3: libsmb: Added new API smbc_readdirplus2()

Returns the same as smbc_readdirplus() but also
can return a struct stat if passed in by the caller.

struct stat is synthesized from the data
returned by the SMB server.

Signed-off-by: Puran Chand <pchand@vmware.com>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3: libsmb: Add missing ino field to internal struct smbc_dirplus_list.
Jeremy Allison [Fri, 18 Oct 2019 16:45:33 +0000 (09:45 -0700)]
s3: libsmb: Add missing ino field to internal struct smbc_dirplus_list.

This should have been added to struct libsmb_file_info, but
this is user-visible so I don't want to change this now. Adding
it to the containing struct allows us to synthesise a struct stat
to return from smbc_readdirplus2() to return all the info from
the server to callers.

Signed-off-by: Puran Chand <pchand@vmware.com>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3: libsmb: Move setting all struct stat fields into setup_stat().
Jeremy Allison [Fri, 18 Oct 2019 17:48:55 +0000 (10:48 -0700)]
s3: libsmb: Move setting all struct stat fields into setup_stat().

That way we only have one place where a struct stat is synthesised
for libsmbclient callers.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3: libsmb: Move setting st->st_ino into setup_stat.
Jeremy Allison [Fri, 18 Oct 2019 16:34:02 +0000 (09:34 -0700)]
s3: libsmb: Move setting st->st_ino into setup_stat.

Signed-off-by: Puran Chand <pchand@vmware.com>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3: libsmb: Change generate_inode()/setup_stat() to modern coding standards.
Jeremy Allison [Fri, 18 Oct 2019 16:24:38 +0000 (09:24 -0700)]
s3: libsmb: Change generate_inode()/setup_stat() to modern coding standards.

Change setup_stat() to be void. It doesn't return anything. Export
so it can be used by upcoming smbc_readdirplus2() call.

Remove unused SMBCCTX *context parameters.
Remove unused talloc_stackframe().

Signed-off-by: Puran Chand <pchand@vmware.com>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3: utils: smbtree. Ensure we don't call cli_RNetShareEnum() on an SMB1 connection.
Jeremy Allison [Tue, 29 Oct 2019 19:11:49 +0000 (12:11 -0700)]
s3: utils: smbtree. Ensure we don't call cli_RNetShareEnum() on an SMB1 connection.

Last unprotected call of cli_RNetShareEnum(). Not a libsmbclient
bug here but might as well fix the last caller as part of the
fix for the bug.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: libsmb: Ensure we don't call cli_RNetShareEnum() on an SMB1 connection.
Jeremy Allison [Tue, 29 Oct 2019 19:11:01 +0000 (12:11 -0700)]
s3: libsmb: Ensure we don't call cli_RNetShareEnum() on an SMB1 connection.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3:smb2_server: add message mid to SMB2 request done log message
Ralph Boehme [Wed, 30 Oct 2019 14:05:13 +0000 (15:05 +0100)]
s3:smb2_server: add message mid to SMB2 request done log message

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Oct 30 18:42:35 UTC 2019 on sn-devel-184

4 years agos3:smb2_server: modernize a debug statement
Ralph Boehme [Wed, 30 Oct 2019 13:23:20 +0000 (14:23 +0100)]
s3:smb2_server: modernize a debug statement

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib/adouble: pass filesize to ad_unpack()
Ralph Boehme [Thu, 24 Oct 2019 15:15:18 +0000 (17:15 +0200)]
lib/adouble: pass filesize to ad_unpack()

ad_unpack() needs the filesize, not the capped IO size we're using in the caller
to read up to "size" bystem from the ._ AppleDouble file.

This fixes a regression introduced by bdc257a1cbac7e8c73a084b618ba642476807483
for bug 13968.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14171
RN: vfs_fruit returns capped resource fork length

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 Oct 30 14:52:34 UTC 2019 on sn-devel-184

4 years agolib/adouble: drop ad_data reallocate logic
Ralph Boehme [Fri, 25 Oct 2019 13:21:32 +0000 (15:21 +0200)]
lib/adouble: drop ad_data reallocate logic

Simply set the buffer size to AD_XATTR_MAX_HDR_SIZE. When reading the
AppleDouble file, read up to AD_XATTR_MAX_HDR_SIZE from the file.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agolib/adouble: README.Coding fix: multi-line if expression
Ralph Boehme [Thu, 24 Oct 2019 15:26:08 +0000 (17:26 +0200)]
lib/adouble: README.Coding fix: multi-line if expression

Also remove a TAB.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agolib/adouble: fix a long line
Ralph Boehme [Thu, 24 Oct 2019 15:17:28 +0000 (17:17 +0200)]
lib/adouble: fix a long line

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agotorture: expand test "vfs.fruit.resource fork IO" to check size
Ralph Boehme [Fri, 25 Oct 2019 13:41:40 +0000 (15:41 +0200)]
torture: expand test "vfs.fruit.resource fork IO" to check size

Reveals a bug where the resource fork size is capped at 65454 bytes.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agoCVE-2019-14833 dsdb: send full password to check password script
Björn Baumbach [Tue, 6 Aug 2019 14:32:32 +0000 (16:32 +0200)]
CVE-2019-14833 dsdb: send full password to check password script

utf8_len represents the number of characters (not bytes) of the
password. If the password includes multi-byte characters it is required
to write the total number of bytes to the check password script.
Otherwise the last bytes of the password string would be ignored.

Therefore we rename utf8_len to be clear what it does and does
not represent.

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

Signed-off-by: Björn Baumbach <bb@sernet.de>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Tue Oct 29 11:58:45 UTC 2019 on sn-devel-184

4 years agoCVE-2019-14833: Use utf8 characters in the unacceptable password
Andrew Bartlett [Wed, 18 Sep 2019 23:50:01 +0000 (11:50 +1200)]
CVE-2019-14833: Use utf8 characters in the unacceptable password

This shows that the "check password script" handling has a bug.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12438
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
4 years agoCVE-2019-10218 - s3: libsmb: Protect SMB2 client code from evil server returned names.
Jeremy Allison [Tue, 6 Aug 2019 19:08:09 +0000 (12:08 -0700)]
CVE-2019-10218 - s3: libsmb: Protect SMB2 client code from evil server returned names.

Disconnect with NT_STATUS_INVALID_NETWORK_RESPONSE if so.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
4 years agoCVE-2019-10218 - s3: libsmb: Protect SMB1 client code from evil server returned names.
Jeremy Allison [Mon, 5 Aug 2019 20:39:53 +0000 (13:39 -0700)]
CVE-2019-10218 - s3: libsmb: Protect SMB1 client code from evil server returned names.

Disconnect with NT_STATUS_INVALID_NETWORK_RESPONSE if so.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
4 years agolibnet_join: add SPNs for additional-dns-hostnames entries
Isaac Boukris [Fri, 13 Sep 2019 07:56:10 +0000 (10:56 +0300)]
libnet_join: add SPNs for additional-dns-hostnames entries

and set msDS-AdditionalDnsHostName to the specified list.

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

Signed-off-by: Isaac Boukris <iboukris@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Oct 25 10:43:08 UTC 2019 on sn-devel-184

4 years agodocs-xml: add "additional dns hostnames" smb.conf option
Isaac Boukris [Tue, 17 Sep 2019 18:38:07 +0000 (21:38 +0300)]
docs-xml: add "additional dns hostnames" smb.conf option

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

Signed-off-by: Isaac Boukris <iboukris@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 years agolibnet_join_set_machine_spn: simplify adding uniq spn to array
Isaac Boukris [Wed, 18 Sep 2019 20:15:57 +0000 (23:15 +0300)]
libnet_join_set_machine_spn: simplify adding uniq spn to array

and do not skip adding a fully qualified spn to netbios-aliases
in case a short spn already existed.

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

Signed-off-by: Isaac Boukris <iboukris@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 years agolibnet_join_set_machine_spn: simplify memory handling
Isaac Boukris [Wed, 18 Sep 2019 18:29:47 +0000 (21:29 +0300)]
libnet_join_set_machine_spn: simplify memory handling

and avoid a possible memory leak when passing null to
add_string_to_array() as mem_ctx.

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

Signed-off-by: Isaac Boukris <iboukris@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 years agolibnet_join_set_machine_spn: improve style and make a bit room for indentation
Isaac Boukris [Wed, 18 Sep 2019 17:00:34 +0000 (20:00 +0300)]
libnet_join_set_machine_spn: improve style and make a bit room for indentation

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

Signed-off-by: Isaac Boukris <iboukris@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 years agolibnet_join: build dnsHostName from netbios name and lp_dnsdomain()
Isaac Boukris [Thu, 29 Aug 2019 21:22:15 +0000 (00:22 +0300)]
libnet_join: build dnsHostName from netbios name and lp_dnsdomain()

This make the join process much more reliable, and avoids "Constraint
violation" error when the fqdn returned from getaddrinfo has already
got assigned an SPN.

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

Signed-off-by: Isaac Boukris <iboukris@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 years agos4:dirsync: fix interaction of dirsync and extended_dn controls
Stefan Metzmacher [Fri, 4 Oct 2019 12:57:40 +0000 (14:57 +0200)]
s4:dirsync: fix interaction of dirsync and extended_dn controls

Azure AD connect reports discovery errors:
  reference-value-not-ldap-conformant
for attributes member and manager.
The key is that it sends the LDAP_SERVER_EXTENDED_DN_OID without
an ExtendedDNRequestValue blob, which means the flag value should
be treated as 0 and the HEX string format should be used.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14153
RN: Prevent azure ad connect from reporting discovery errors:
reference-value-not-ldap-conformant

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Oct 24 11:06:58 UTC 2019 on sn-devel-184

4 years agos4:tests/dirsync: add tests for dirsync with extended_dn
Stefan Metzmacher [Tue, 22 Oct 2019 10:12:32 +0000 (12:12 +0200)]
s4:tests/dirsync: add tests for dirsync with extended_dn

This demonstrates a problems that the extended_dn returned
by the dirsync module always uses the SDDL format for GUID/SID
components.

Azure AD connect reports discovery errors:
  reference-value-not-ldap-conformant
for attributes member and manager.
The key is that it sends the LDAP_SERVER_EXTENDED_DN_OID without
an ExtendedDNRequestValue blob, which means the flag value should
be treated as 0 and the HEX string format should be used.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3: remove now unneeded call to cmdline_messaging_context()
Ralph Boehme [Sat, 4 May 2019 10:12:48 +0000 (12:12 +0200)]
s3: remove now unneeded call to cmdline_messaging_context()

This was only needed as dbwrap_open() had a bug where it asked for the ctdb
connection before initializing messaging. The previous commit fixed that so we
can now safely remove the calls to cmdline_messaging_context() from all tools
that don't use messaging.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct 24 09:33:47 UTC 2019 on sn-devel-184

4 years agos3:dbwrap: initialize messaging before getting the ctdb connection
Ralph Boehme [Sat, 4 May 2019 10:12:04 +0000 (12:12 +0200)]
s3:dbwrap: initialize messaging before getting the ctdb connection

This is a better fix for bug #13465.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agowaf: Symlink the compile database to the source dir for clangd
Andreas Schneider [Tue, 22 Oct 2019 07:32:58 +0000 (09:32 +0200)]
waf: Symlink the compile database to the source dir for clangd

https://github.com/ycm-core/YouCompleteMe
https://github.com/abingham/emacs-ycmd

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Oct 24 08:11:19 UTC 2019 on sn-devel-184

4 years agowaf: Create clang compilation database
Andreas Schneider [Tue, 25 Sep 2018 16:13:26 +0000 (18:13 +0200)]
waf: Create clang compilation database

http://clang.llvm.org/docs/JSONCompilationDatabase.html

This can be used by ymcd or clangd.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agoctdb-tests: Add vacuuming tests
Martin Schwenke [Wed, 14 Aug 2019 05:26:25 +0000 (15:26 +1000)]
ctdb-tests: Add vacuuming tests

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu Oct 24 05:28:21 UTC 2019 on sn-devel-184

4 years agoctdb-tests: Add handling of process clean-up on a cluster node
Martin Schwenke [Sat, 28 Sep 2019 22:27:33 +0000 (08:27 +1000)]
ctdb-tests: Add handling of process clean-up on a cluster node

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Factor out function check_cattdb_num_records()
Martin Schwenke [Mon, 12 Aug 2019 11:02:47 +0000 (21:02 +1000)]
ctdb-tests: Factor out function check_cattdb_num_records()

This can be use in multiple vacuuming tests.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Add ctdb-db-test tool
Martin Schwenke [Thu, 1 Aug 2019 05:33:52 +0000 (15:33 +1000)]
ctdb-tests: Add ctdb-db-test tool

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-client: Factor out function client_db_tdb()
Martin Schwenke [Fri, 27 Sep 2019 06:49:01 +0000 (16:49 +1000)]
ctdb-client: Factor out function client_db_tdb()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Implement DB_VACUUM control
Martin Schwenke [Tue, 30 Jul 2019 04:17:11 +0000 (14:17 +1000)]
ctdb-daemon: Implement DB_VACUUM control

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-vacuum: Only schedule next vacuum event if vacuuuming is scheduled
Martin Schwenke [Tue, 15 Oct 2019 05:36:44 +0000 (16:36 +1100)]
ctdb-vacuum: Only schedule next vacuum event if vacuuuming is scheduled

At the moment vacuuming is always scheduled.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Factor out code to create vacuuming child
Martin Schwenke [Tue, 30 Jul 2019 04:16:13 +0000 (14:16 +1000)]
ctdb-daemon: Factor out code to create vacuuming child

This changes the behaviour for some failures from exiting to simply
attempting to schedule the next run.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-vacuum: Simplify recording of in-progress vacuuming child
Martin Schwenke [Fri, 4 Oct 2019 02:06:21 +0000 (12:06 +1000)]
ctdb-vacuum: Simplify recording of in-progress vacuuming child

There can only be one, so simplify the logic.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-protocol: Add marshalling for control DB_VACUUM
Martin Schwenke [Tue, 30 Jul 2019 00:52:05 +0000 (10:52 +1000)]
ctdb-protocol: Add marshalling for control DB_VACUUM

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-protocol: Add marshalling for struct ctdb_db_vacuum
Martin Schwenke [Tue, 30 Jul 2019 06:59:37 +0000 (16:59 +1000)]
ctdb-protocol: Add marshalling for struct ctdb_db_vacuum

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-protocol: Add new control CTDB_CONTROL_DB_VACUUM
Martin Schwenke [Tue, 30 Jul 2019 00:34:03 +0000 (10:34 +1000)]
ctdb-protocol: Add new control CTDB_CONTROL_DB_VACUUM

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-vacuum: Avoid processing any more packets
Amitay Isaacs [Tue, 1 Oct 2019 05:05:10 +0000 (15:05 +1000)]
ctdb-vacuum: Avoid processing any more packets

All the vacuum operations if required have an event loop to ensure
completion of pending operations.  Once all the steps are complete,
there is no reason to process any more packets.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Avoid memory leak when packet is deferred
Amitay Isaacs [Wed, 6 Jun 2018 13:47:13 +0000 (15:47 +0200)]
ctdb-daemon: Avoid memory leak when packet is deferred

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-recoverd: No need for database detach handler
Amitay Isaacs [Fri, 16 Feb 2018 06:17:38 +0000 (17:17 +1100)]
ctdb-recoverd: No need for database detach handler

The only reason for recoverd attaching to databases was to migrate
records to the local node as part of vacuuming.  Recovery daemon does
not take part in database vacuuming any more.

The actual database recovery is handled via the recovery_helper and
recovery daemon should not need to attach to the databases any more.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-recoverd: Drop VACUUM_FETCH message handling
Amitay Isaacs [Fri, 16 Feb 2018 06:13:35 +0000 (17:13 +1100)]
ctdb-recoverd: Drop VACUUM_FETCH message handling

This is now implemented in the ctdb daemon using VACUMM_FETCH control.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-vacuum: Replace VACUUM_FETCH message with control
Amitay Isaacs [Fri, 16 Feb 2018 06:01:21 +0000 (17:01 +1100)]
ctdb-vacuum: Replace VACUUM_FETCH message with control

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-vacuum: Add processing of fetch queue
Amitay Isaacs [Fri, 16 Feb 2018 06:00:40 +0000 (17:00 +1100)]
ctdb-vacuum: Add processing of fetch queue

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Add implementation of VACUUM_FETCH control
Amitay Isaacs [Fri, 16 Feb 2018 04:30:13 +0000 (15:30 +1100)]
ctdb-daemon: Add implementation of VACUUM_FETCH control

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-tests: Add marshalling tests for new control
Amitay Isaacs [Fri, 16 Feb 2018 06:28:49 +0000 (17:28 +1100)]
ctdb-tests: Add marshalling tests for new control

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-protocol: Add marshalling for new control VACUUM_FETCH
Amitay Isaacs [Thu, 15 Feb 2018 00:57:44 +0000 (11:57 +1100)]
ctdb-protocol: Add marshalling for new control VACUUM_FETCH

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-protocol: Add new control VACUUM_FETCH
Amitay Isaacs [Thu, 15 Feb 2018 00:57:24 +0000 (11:57 +1100)]
ctdb-protocol: Add new control VACUUM_FETCH

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-tests: Drop code releated to obsolete controls
Amitay Isaacs [Thu, 15 Feb 2018 01:28:11 +0000 (12:28 +1100)]
ctdb-tests: Drop code releated to obsolete controls

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-protocol: Drop code related to obsolete controls
Amitay Isaacs [Thu, 15 Feb 2018 01:13:53 +0000 (12:13 +1100)]
ctdb-protocol: Drop code related to obsolete controls

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb: Avoid malloc/memcpy/free in ctdb_ltdb_fetch()
Volker Lendecke [Tue, 8 Oct 2019 11:02:41 +0000 (13:02 +0200)]
ctdb: Avoid malloc/memcpy/free in ctdb_ltdb_fetch()

Make use of tdb_parse_record()

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
4 years agosamba-tool: py3 compatiblity in 'user syncpasswords --daemon'
Heinz Hoelzl [Wed, 9 Oct 2019 21:14:15 +0000 (10:14 +1300)]
samba-tool: py3 compatiblity in 'user syncpasswords --daemon'

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

Signed-off-by: Heinz Hölzl <heinz.hoelzl@gvcc.net>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Björn Baumbach <bb@sernet.de>
Autobuild-User(master): Björn Baumbach <bb@sernet.de>
Autobuild-Date(master): Wed Oct 23 15:54:43 UTC 2019 on sn-devel-184

4 years agoreplace: Only link libnsl and libsocket if requrired
Andreas Schneider [Mon, 21 Oct 2019 15:08:08 +0000 (17:08 +0200)]
replace: Only link libnsl and libsocket if requrired

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

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 Oct 23 08:23:13 UTC 2019 on sn-devel-184

4 years agos3:lib:wins fix a compile warning on Ubuntu 18.04
Christian Ambach [Tue, 22 Oct 2019 09:02:05 +0000 (11:02 +0200)]
s3:lib:wins fix a compile warning on Ubuntu 18.04

gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1) with -O2 puts up a warning here:
../../source3/lib/wins_srv.c: In function ‘wins_srv_tags’:
../../source3/lib/wins_srv.c:235:3: error: assuming signed overflow does not
occur when simplifying conditional to constant [-Werror=strict-overflow]
   for (j=0;j<count;j++) {
   ^~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Oct 23 04:57:09 UTC 2019 on sn-devel-184

4 years agosmbd: Save 520 bytes of writable memory from every smbd
Volker Lendecke [Mon, 21 Oct 2019 12:38:47 +0000 (14:38 +0200)]
smbd: Save 520 bytes of writable memory from every smbd

Move what can be const from the "data" to the "text" segment

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Oct 23 02:37:12 UTC 2019 on sn-devel-184

4 years agosmbd: Remove an unused #define from mangle_hash2.c
Volker Lendecke [Mon, 21 Oct 2019 12:37:04 +0000 (14:37 +0200)]
smbd: Remove an unused #define from mangle_hash2.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosmbd: Mark #else/#endif with the if-#define
Volker Lendecke [Tue, 22 Oct 2019 06:30:01 +0000 (08:30 +0200)]
smbd: Mark #else/#endif with the if-#define

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-tests: Add -l option to set number of local daemons
Martin Schwenke [Thu, 17 Oct 2019 05:42:36 +0000 (16:42 +1100)]
ctdb-tests: Add -l option to set number of local daemons

This is the only place where setting an environment variable by hand
is recommended, so remove the anomaly.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Oct 22 21:02:11 UTC 2019 on sn-devel-184