samba.git
5 years agodfs_server: Only build in case we build an AD DC too.
Andreas Schneider [Wed, 19 Nov 2014 09:30:23 +0000 (10:30 +0100)]
dfs_server: Only build in case we build an AD DC too.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4-rpc: dnsserver: Fix enumeration of IPv4 and IPv6 addresses
Guenter Kukkukk [Fri, 21 Nov 2014 15:57:45 +0000 (16:57 +0100)]
s4-rpc: dnsserver: Fix enumeration of IPv4 and IPv6 addresses

In the initial implementation only IPv4 addresses were supported.

Add IPv6 (and mixed IPv4/IPv6) support and all further needed conversion
routines to support w2k, dotnet, longhorn clients.

Signed-off-by: Guenter Kukkukk <linux@kukkukk.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Nov 26 03:44:07 CET 2014 on sn-devel-104

5 years agosamba-tool: Fix the IP output of "samba-tool dns serverinfo <some_server>"
Guenter Kukkukk [Fri, 21 Nov 2014 02:55:25 +0000 (03:55 +0100)]
samba-tool: Fix the IP output of "samba-tool dns serverinfo <some_server>"

Avoid hardcoded IP-strings, use standard python IP functions to format
IPv4 and IPv6 addresses correctly.

I have removed the display of the port number.
MS-DNSP 2.2.3.2.2.1 DNS_ADDR: (from May 15, 2014)
Port Number (2bytes): Senders MUST set this to zero, and receivers MUST ignore
it.

Signed-off-by: Guenter Kukkukk <linux@kukkukk.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agosamba-tool: Fix enum values in dns.py
Guenter Kukkukk [Fri, 21 Nov 2014 02:40:17 +0000 (03:40 +0100)]
samba-tool: Fix enum values in dns.py

DNS_ZONE_UPDATE_SECURE was used twice, DNS_ZONE_UPDATE_UNSECURE was missing.

Signed-off-by: Guenter Kukkukk <linux@kukkukk.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agolib: Fix header include protection #define
Volker Lendecke [Tue, 25 Nov 2014 11:55:26 +0000 (12:55 +0100)]
lib: Fix header include protection #define

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Nov 25 15:38:22 CET 2014 on sn-devel-104

5 years agoscript/autobuild.py: build 'samba' using --picky-developer
Stefan Metzmacher [Tue, 11 Nov 2014 13:54:41 +0000 (14:54 +0100)]
script/autobuild.py: build 'samba' using --picky-developer

This makes sure we don't get unexpected new compiler warnings.

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): Tue Nov 25 09:46:30 CET 2014 on sn-devel-104

5 years agowafsamba: change the default to allow_warnings=False for CURRENT_CFLAGS()
Stefan Metzmacher [Wed, 26 Feb 2014 06:34:51 +0000 (07:34 +0100)]
wafsamba: change the default to allow_warnings=False for CURRENT_CFLAGS()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowafsamba: change the default to allow_warnings=False for SAMBA_{SUBSYSTEM,LIBRARY...
Stefan Metzmacher [Wed, 26 Feb 2014 06:34:51 +0000 (07:34 +0100)]
wafsamba: change the default to allow_warnings=False for SAMBA_{SUBSYSTEM,LIBRARY,MODULE}()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:ntvfs/unixuid: remove unused allow_warnings=True
Stefan Metzmacher [Wed, 29 Oct 2014 11:27:28 +0000 (12:27 +0100)]
s4:ntvfs/unixuid: remove unused allow_warnings=True

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:librpc: remove unused allow_warnings=True for 'dcerpc'
Stefan Metzmacher [Wed, 29 Oct 2014 11:27:28 +0000 (12:27 +0100)]
s4:librpc: remove unused allow_warnings=True for 'dcerpc'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:lib/messaging: remove unused allow_warnings=True
Stefan Metzmacher [Wed, 29 Oct 2014 11:27:28 +0000 (12:27 +0100)]
s4:lib/messaging: remove unused allow_warnings=True

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:lib/events: remove unused allow_warnings=True
Stefan Metzmacher [Wed, 29 Oct 2014 11:27:28 +0000 (12:27 +0100)]
s4:lib/events: remove unused allow_warnings=True

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowafsamba: use -Wno-error=deprecated-declarations in picky-developer mode
Stefan Metzmacher [Thu, 22 May 2014 08:41:33 +0000 (10:41 +0200)]
wafsamba: use -Wno-error=deprecated-declarations in picky-developer mode

Currently we use too many deprecated function like
dcerpc_binding_handle_set_sync_ev() and others, but this should not be a reason
to require 'allow_warnings=True'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:torture: remove unused allow_warnings=True for 'TORTURE_BASIC' and 'TORTURE_VFS'
Stefan Metzmacher [Wed, 29 Oct 2014 11:26:38 +0000 (12:26 +0100)]
s4:torture: remove unused allow_warnings=True for 'TORTURE_BASIC' and 'TORTURE_VFS'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:torture/winbind: remove unused variables in struct_based.c
Stefan Metzmacher [Wed, 29 Oct 2014 10:39:39 +0000 (11:39 +0100)]
s4:torture/winbind: remove unused variables in struct_based.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:torture/locktest: comment out unused code and avoid smbcli_nt_error()
Stefan Metzmacher [Thu, 27 Feb 2014 08:08:17 +0000 (09:08 +0100)]
s4:torture/locktest: comment out unused code and avoid smbcli_nt_error()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:smb_server/smb2: remove unused _pad variables
Stefan Metzmacher [Thu, 27 Feb 2014 08:08:17 +0000 (09:08 +0100)]
s4:smb_server/smb2: remove unused _pad variables

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:smb_server/smb2: avoid unused warnings in smb2srv_setinfo_send()
Stefan Metzmacher [Thu, 27 Feb 2014 08:08:17 +0000 (09:08 +0100)]
s4:smb_server/smb2: avoid unused warnings in smb2srv_setinfo_send()

op->req and req have the same value.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:ntvfs/smb2: ifdef out unused code
Stefan Metzmacher [Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)]
s4:ntvfs/smb2: ifdef out unused code

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:ntvfs: explicitly handle RAW_FILEINFO_UNIX_{BASIC,LINK} in ntvfs_map_fileinfo()
Stefan Metzmacher [Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)]
s4:ntvfs: explicitly handle RAW_FILEINFO_UNIX_{BASIC,LINK} in ntvfs_map_fileinfo()

This avoids compiler warnings.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:nbt_server: avoid str_list related const warning
Stefan Metzmacher [Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)]
s4:nbt_server: avoid str_list related const warning

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:kdc: remove unused allow_warnings=True for 'MIT_SAMBA'
Stefan Metzmacher [Wed, 29 Oct 2014 11:21:07 +0000 (12:21 +0100)]
s4:kdc: remove unused allow_warnings=True for 'MIT_SAMBA'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:kdc: comment out unused code in db-glue.c
Stefan Metzmacher [Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)]
s4:kdc: comment out unused code in db-glue.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:libcli/raw: use smb_setfsinfo_level in smb_setfsinfo
Stefan Metzmacher [Thu, 27 Feb 2014 08:50:57 +0000 (09:50 +0100)]
s4:libcli/raw: use smb_setfsinfo_level in smb_setfsinfo

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:lib/registry: remove unused allow_warnings=True
Stefan Metzmacher [Wed, 29 Oct 2014 11:25:24 +0000 (12:25 +0100)]
s4:lib/registry: remove unused allow_warnings=True

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:lib/registry: fix compiler warnings
Stefan Metzmacher [Wed, 29 Oct 2014 11:24:44 +0000 (12:24 +0100)]
s4:lib/registry: fix compiler warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:lib/registry: avoid some const warnings
Stefan Metzmacher [Thu, 27 Feb 2014 08:49:47 +0000 (09:49 +0100)]
s4:lib/registry: avoid some const warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:wscript_build: remove unused allow_warnings=True for 'KRBCLIENT'
Stefan Metzmacher [Wed, 29 Oct 2014 11:21:07 +0000 (12:21 +0100)]
s3:wscript_build: remove unused allow_warnings=True for 'KRBCLIENT'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:winbindd: make use of talloc_string_sub2() in generate_krb5_ccache()
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:winbindd: make use of talloc_string_sub2() in generate_krb5_ccache()

This way we don't pass a given format string to talloc_asprintf().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:winbindd: avoid invalid pointer type warnings
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:winbindd: avoid invalid pointer type warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:utils: rename variables in regedit_*.c to fix shadow warnings
Stefan Metzmacher [Thu, 13 Nov 2014 08:12:56 +0000 (09:12 +0100)]
s3:utils: rename variables in regedit_*.c to fix shadow warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:utils: add debug functions instead of magic format strings in net_idmap_check.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:utils: add debug functions instead of magic format strings in net_idmap_check.c

This way the compiler can check the format string and doesn't generate warnings.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:torture: avoid nesting of macros and function calls in torture_cli_session_setup2()
Stefan Metzmacher [Thu, 23 Oct 2014 08:18:21 +0000 (10:18 +0200)]
s3:torture: avoid nesting of macros and function calls in torture_cli_session_setup2()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbd: avoid a compiler warning in open_sockets_smbd()
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:smbd: avoid a compiler warning in open_sockets_smbd()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbd: do casting of dm_sessid_t in steps
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:smbd: do casting of dm_sessid_t in steps

This makes it more explicit and avoids compiler warnings.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:wscript_build: remove unused allow_warnings=True for 'smbregistry'
Stefan Metzmacher [Wed, 29 Oct 2014 11:18:14 +0000 (12:18 +0100)]
s3:wscript_build: remove unused allow_warnings=True for 'smbregistry'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:registry: use discard_const_p() to avoid const warning in smb_iconv() define
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:registry: use discard_const_p() to avoid const warning in smb_iconv() define

I'm wondering why we have this in reg_parse_internal.h at all!

But for now just fix warnings...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:printing: fix some const warnings in print_iprint.c
Stefan Metzmacher [Thu, 3 Jul 2014 11:14:20 +0000 (13:14 +0200)]
s3:printing: fix some const warnings in print_iprint.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:printing: Avoid compiler warning about unused label
Kai Blin [Fri, 14 Mar 2014 08:07:16 +0000 (09:07 +0100)]
s3:printing: Avoid compiler warning about unused label

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:passdb: avoid invalid pointer type warnings in pdb_wbc_sam.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:passdb: avoid invalid pointer type warnings in pdb_wbc_sam.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:passdb: always copy the history in pdb_set_plaintext_passwd()
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:passdb: always copy the history in pdb_set_plaintext_passwd()

We should not write to memory marked as const
(returned from pdb_get_pw_history())!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:wscript_build: remove unused allow_warnings=True for 'param'
Stefan Metzmacher [Wed, 29 Oct 2014 11:13:23 +0000 (12:13 +0100)]
s3:wscript_build: remove unused allow_warnings=True for 'param'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:param: fix compiler warnings
Stefan Metzmacher [Wed, 29 Oct 2014 11:12:48 +0000 (12:12 +0100)]
s3:param: fix compiler warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:modules: remove unused allow_warnings=True for non_posix_acls, and vfs_media_harmony
Stefan Metzmacher [Wed, 29 Oct 2014 11:11:33 +0000 (12:11 +0100)]
s3:modules: remove unused allow_warnings=True for non_posix_acls, and vfs_media_harmony

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:modules: rename variables in vfs_fruit.c to fix shadow warnings
Stefan Metzmacher [Thu, 13 Nov 2014 08:12:56 +0000 (09:12 +0100)]
s3:modules: rename variables in vfs_fruit.c to fix shadow warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:librpc/idl: mark struct smbXsrv_client as [public]
Stefan Metzmacher [Wed, 29 Oct 2014 11:04:36 +0000 (12:04 +0100)]
s3:librpc/idl: mark struct smbXsrv_client as [public]

This avoids compiler warnings about unused code.

We don't use the NDR code for this yet, will be done
when we get multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:wscript_build: remove unused allow_warnings=True for 'ads'
Stefan Metzmacher [Wed, 29 Oct 2014 11:21:07 +0000 (12:21 +0100)]
s3:wscript_build: remove unused allow_warnings=True for 'ads'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:libads: avoid some compiler warnings in ldap.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:libads: avoid some compiler warnings in ldap.c

We use helper variables and explicit casts using
discard_const_p() to avoid bogus const warnings.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:libsmb: remove unused variables in cliconnect.c
Stefan Metzmacher [Thu, 23 Oct 2014 08:17:40 +0000 (10:17 +0200)]
s3:libsmb: remove unused variables in cliconnect.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:lib/netapi/examples: fix pointer from integer error in nltest.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:lib/netapi/examples: fix pointer from integer error in nltest.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:lib/netapi/tests: fix invalid switch enum level warning
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:lib/netapi/tests: fix invalid switch enum level warning

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:lib: fix/simplify srprs_hex()
Stefan Metzmacher [Thu, 13 Nov 2014 07:50:35 +0000 (08:50 +0100)]
s3:lib: fix/simplify srprs_hex()

There're a few problems with this function.

- it pretends to support values up to UINT64_MAX
  in it only returns 'unsigned' which support only
  values up to UINT32_MAX. Currently we only have
  callers with len=2 and len=8, so it's not a triggered
  bug.

  We just allow (len >= 1 && len <= 8) now.

- The compiler is not able to inspect the format string
  to sscanf().

  We copy up to 8 bytes into a stack buffer
  and always pass "%8x" to sscanf.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib-pyldb: Block elements should be surrounded by {} in py_msg.setitem()
Kamen Mazdrashki [Thu, 20 Nov 2014 03:07:47 +0000 (04:07 +0100)]
lib-pyldb: Block elements should be surrounded by {} in py_msg.setitem()

Change-Id: I0d09374b27708fcaad3523d985a2db7983dbd81a
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Nov 25 07:24:12 CET 2014 on sn-devel-104

5 years agolib-pyldb: Fix docstring for msg.add() method - it was "S.append()"
Kamen Mazdrashki [Thu, 20 Nov 2014 03:06:01 +0000 (04:06 +0100)]
lib-pyldb: Fix docstring for msg.add() method - it was "S.append()"

Change-Id: I9492d3c3993fc3d68d7bf24405db6e8cd746eaac
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib-ldb-test: Test copying message element from a message to a new message
Kamen Mazdrashki [Tue, 25 Nov 2014 02:50:52 +0000 (03:50 +0100)]
lib-ldb-test: Test copying message element from a message to a new message

Change-Id: Iefcafb418a170ee410aec900bb36eb8e01e946b1
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib-pyldb: Avoid crash when copying MessageElements between Python Message objects
Kamen Mazdrashki [Wed, 12 Nov 2014 00:17:56 +0000 (01:17 +0100)]
lib-pyldb: Avoid crash when copying MessageElements between Python Message objects

This patch allows for following snipets in Python:
  res = ldb.search(...)
  m_from = res[0]
  m_to = Message()
  m_to.add(m_from["attrName"])

The problem previously is that we are trying to reference a
ldb_message_element that may not be a memory context on its own.
For instance, when search request from above example returns
Messages with more than one attribute, this leads immediately
to "Bad talloc magic value" crash, every message element beside
the first one is not a memory context

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib-ldb_ldif: Stop processing if ldb_message element name is NULL
Kamen Mazdrashki [Wed, 12 Nov 2014 00:12:31 +0000 (01:12 +0100)]
lib-ldb_ldif: Stop processing if ldb_message element name is NULL

I have hit this while using Python bindings for testing and
forgot to pass 'name' argument to MessageElement constructor
Passing NULL as 'name' is obviously a mistake and this commits
aims to warn about such unintetional mistakes.

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib-ldb: Check for input parameter when searching attributes by name
Kamen Mazdrashki [Tue, 11 Nov 2014 01:56:32 +0000 (02:56 +0100)]
lib-ldb: Check for input parameter when searching attributes by name

This prevents a segfault that is hard to be tracked down from
Python bindings for instance.

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib-pyldb: Throw exception when we can't create MessageElement object
Kamen Mazdrashki [Mon, 10 Nov 2014 21:59:07 +0000 (22:59 +0100)]
lib-pyldb: Throw exception when we can't create MessageElement object

At the moment we return an error, but no exception and it is
hard to instantly see what the problem is from Python

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib-pyldb: Avoid leaking memory in error cases
Kamen Mazdrashki [Sun, 9 Nov 2014 03:31:36 +0000 (04:31 +0100)]
lib-pyldb: Avoid leaking memory in error cases

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib-pyldb: Avoid SEGFAULT in case we can't convert passed value to py_String
Kamen Mazdrashki [Sun, 9 Nov 2014 03:28:47 +0000 (04:28 +0100)]
lib-pyldb: Avoid SEGFAULT in case we can't convert passed value to py_String

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3-smbstatus: Fix exit code of profile output.
Andreas Schneider [Mon, 24 Nov 2014 16:46:27 +0000 (17:46 +0100)]
s3-smbstatus: Fix exit code of profile output.

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

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): Mon Nov 24 21:13:51 CET 2014 on sn-devel-104

5 years agomessaging3: Fix sending large messages on FreeBSD
Volker Lendecke [Mon, 24 Nov 2014 15:31:07 +0000 (16:31 +0100)]
messaging3: Fix sending large messages on FreeBSD

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agounix_msg: Reformat unix_dgram_send a bit
Volker Lendecke [Mon, 24 Nov 2014 15:27:39 +0000 (16:27 +0100)]
unix_msg: Reformat unix_dgram_send a bit

This makes the next commit a bit more readable

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3-smbclient: Return success if we listed the shares.
Andreas Schneider [Mon, 24 Nov 2014 15:26:13 +0000 (16:26 +0100)]
s3-smbclient: Return success if we listed the shares.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agodsdb: Remove a self-assignment
Volker Lendecke [Mon, 24 Nov 2014 13:34:24 +0000 (14:34 +0100)]
dsdb: Remove a self-assignment

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agodbwrap: Fix a enum conversion
Volker Lendecke [Mon, 24 Nov 2014 13:52:42 +0000 (14:52 +0100)]
dbwrap: Fix a enum conversion

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Nov 24 18:36:00 CET 2014 on sn-devel-104

5 years agoPrint number of slow tests from script rather than wscript.
Jelmer Vernooij [Sat, 1 Nov 2014 20:54:31 +0000 (13:54 -0700)]
Print number of slow tests from script rather than wscript.

Change-Id: I6eaa0803b95cc81f514a2176f4e06f1e3fff4077
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Mon Nov 24 13:06:46 CET 2014 on sn-devel-104

5 years agosam: Use samba.tests.subunitrun.
Jelmer Vernooij [Sun, 2 Nov 2014 17:00:09 +0000 (09:00 -0800)]
sam: Use samba.tests.subunitrun.

Change-Id: Ic2ac4b335cf805ddbd442a065c4eaf6ef2b210d9
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoUse samba.tests.subunitrun in dsdb ldap and ldap_schema tests.
Jelmer Vernooij [Sun, 2 Nov 2014 04:31:18 +0000 (21:31 -0700)]
Use samba.tests.subunitrun in dsdb ldap and ldap_schema tests.

Change-Id: I51ddc55720a23013a2c6ae20e3225f027348083c
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoUse samba.tests.subunitrun in urgent replication test.
Jelmer Vernooij [Sun, 2 Nov 2014 04:22:59 +0000 (21:22 -0700)]
Use samba.tests.subunitrun in urgent replication test.

Change-Id: I3e7a32876d557ac376326ab75e851298e874d584
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoInclude mimeparse, which is used by subunit/testtools.
Jelmer Vernooij [Sat, 1 Nov 2014 14:09:00 +0000 (07:09 -0700)]
Include mimeparse, which is used by subunit/testtools.

Change-Id: I984c82acc0bc82a165e8ea17d8948c465c786905
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Sat Nov 22 04:44:11 CET 2014 on sn-devel-104

5 years agoldap: Use samba.tests.subunitrun.
Jelmer Vernooij [Sun, 2 Nov 2014 17:44:05 +0000 (09:44 -0800)]
ldap: Use samba.tests.subunitrun.

Change-Id: I872654afb31a5eda8c88aac716f9ce79816e5f05
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agodeletetest: use samba.tests.subunitrun.
Jelmer Vernooij [Sun, 2 Nov 2014 17:39:17 +0000 (09:39 -0800)]
deletetest: use samba.tests.subunitrun.

Change-Id: I13565c7c14ea186709ce1de9038ef840c5b766b8
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoldap_syntaxes: Use samba.tests.subunitrun.
Jelmer Vernooij [Sun, 2 Nov 2014 17:32:58 +0000 (09:32 -0800)]
ldap_syntaxes: Use samba.tests.subunitrun.

Change-Id: Ib62b747876b4408fdc8ff44e9b4c63578e1a6408
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agopassword lockout: Use samba.tests.subunitrun.
Jelmer Vernooij [Sun, 2 Nov 2014 17:30:50 +0000 (09:30 -0800)]
password lockout: Use samba.tests.subunitrun.

Change-Id: I848099d22acd4a0ce7d589de48eb72e2d180ceae
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agopasswords: Use samba.tests.subunitrun.
Jelmer Vernooij [Sun, 2 Nov 2014 17:13:06 +0000 (09:13 -0800)]
passwords: Use samba.tests.subunitrun.

Change-Id: Ib806f63ef412fec264445eefd82146e5140b0bac
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agosec_descriptor: Use samba.tests.subunitrun.
Jelmer Vernooij [Sun, 2 Nov 2014 16:57:37 +0000 (08:57 -0800)]
sec_descriptor: Use samba.tests.subunitrun.

Change-Id: I5caba3e27ad21cc5381883a823e0ec5e2966a264
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agotoken_group: Use samba.tests.subunitrun.
Jelmer Vernooij [Sun, 2 Nov 2014 16:35:06 +0000 (08:35 -0800)]
token_group: Use samba.tests.subunitrun.

Change-Id: Id7c247451532eded1f44ef9b1aa1808dd18098c6
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agosites: Use samba.tests.subunitrun.
Jelmer Vernooij [Sun, 2 Nov 2014 16:37:08 +0000 (08:37 -0800)]
sites: Use samba.tests.subunitrun.

Change-Id: Ic06e1a0f7174683b6b817a5412b8635145329c00
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agospeedtest: Use samba.tests.subunitrun.
Jelmer Vernooij [Sun, 2 Nov 2014 16:32:24 +0000 (08:32 -0800)]
speedtest: Use samba.tests.subunitrun.

Change-Id: Id842c3f74aec24faeab68e975ff4d9e9a0dc337b
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agocredentials test: Use samba.tests.subunitrun.
Jelmer Vernooij [Sun, 2 Nov 2014 16:30:23 +0000 (08:30 -0800)]
credentials test: Use samba.tests.subunitrun.

Change-Id: I8970c66de9535cb8d48b17d88b2759b7d1e39cb8
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agosec_descriptor test: Simplify, use samba.tests.subunitrun module.
Jelmer Vernooij [Sun, 2 Nov 2014 16:23:36 +0000 (08:23 -0800)]
sec_descriptor test: Simplify, use samba.tests.subunitrun module.

Change-Id: I4ffda49cf3e209eaa28fc83f6fd9ded47f0ad7ee
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoMove option handling into samba.tests.subunitrun.
Jelmer Vernooij [Sun, 2 Nov 2014 04:17:39 +0000 (21:17 -0700)]
Move option handling into samba.tests.subunitrun.

Change-Id: I65a73b74854af636413f4f284147f3bcf28b6f82
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoMove option parsing to samba.tests.subunitrun.
Jelmer Vernooij [Sun, 2 Nov 2014 04:08:49 +0000 (21:08 -0700)]
Move option parsing to samba.tests.subunitrun.

Change-Id: I2939c1b6ebb9739530efa9bc4667668cff7a7aeb
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agosubunitrun: Use new samba.tests.subunitrun module.
Jelmer Vernooij [Sun, 2 Nov 2014 03:57:09 +0000 (20:57 -0700)]
subunitrun: Use new samba.tests.subunitrun module.

Change-Id: Ie32f16d72c80c831adfd9a8d32735fa348962123
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoAdd convenience class for old-style Samba subunit python tests.
Jelmer Vernooij [Sun, 2 Nov 2014 03:51:46 +0000 (20:51 -0700)]
Add convenience class for old-style Samba subunit python tests.

Change-Id: I84a97cc71cfa99c14e0c93ec19ff9eea6149bb5a
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoAdd bundled copy of 'extras' python module used by newer versions of testtools/subunit.
Jelmer Vernooij [Sat, 25 Oct 2014 18:09:10 +0000 (11:09 -0700)]
Add bundled copy of 'extras' python module used by newer versions of testtools/subunit.

Change-Id: I5ad9222ccb4228a4b16d54a578276d4b9d4e6c4d
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoClean up more whitespace.
Guy Harris [Fri, 21 Nov 2014 15:52:32 +0000 (15:52 +0000)]
Clean up more whitespace.

Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-By: Kamen Mazdrashki <kamenim@samba.org>
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
5 years agovfs_streams_xattr: check stream type
Ralph Boehme [Fri, 21 Nov 2014 13:56:08 +0000 (14:56 +0100)]
vfs_streams_xattr: check stream type

Only allow access to the stream type "$DATA". vfs_streams_depot does
this too and it fixes the failing test "smb2.streams.names".

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): Sat Nov 22 01:07:54 CET 2014 on sn-devel-104

5 years agovfs_streams_xattr: initialize pointer
Ralph Boehme [Fri, 21 Nov 2014 13:54:17 +0000 (14:54 +0100)]
vfs_streams_xattr: initialize pointer

Intitialize pointer to NULL, otherwise we talloc_free() an unitialized
pointer in the error code path.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_streams_xattr: fix check with samba_private_attr_name()
Ralph Boehme [Thu, 20 Nov 2014 15:33:22 +0000 (16:33 +0100)]
vfs_streams_xattr: fix check with samba_private_attr_name()

We want to check with samba_private_attr_name() whether the xattr name
is a private one, unfortunately it flags xattrs that begin with the
default streams prefix as private.  By only calling
samba_private_attr_name() in case the xattr does NOT begin with the
default prefix, we know that if it returns 'true' it definitely one of
our internal xattr like "user.DOSATTRIB".

This fixes a bug introduced in 634bcb09a08b927fd79ae0e16aeee2a123605f94
that denied all access to valid stream xattrs.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4-dns: dlz-bind: Add trailing '.' to all fqdn strings
Amitay Isaacs [Mon, 3 Nov 2014 00:57:50 +0000 (11:57 +1100)]
s4-dns: dlz-bind: Add trailing '.' to all fqdn strings

BIND 9.10.x is strict when sending records via putrr and putnamedrr.

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

Thanks to Guenter Kukkukk for identifying the problem and resolution.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Guenter Kukkukk <kukks@samba.org>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Nov 21 06:14:55 CET 2014 on sn-devel-104

5 years agos3:libsmb: fix some function header comments.
Michael Adam [Thu, 20 Nov 2014 11:59:15 +0000 (12:59 +0100)]
s3:libsmb: fix some function header comments.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Nov 20 18:45:28 CET 2014 on sn-devel-104

5 years agolib/ldb-samba: add ldif handler for msDS-TrustForestTrustInfo
Stefan Metzmacher [Wed, 19 Nov 2014 11:24:47 +0000 (12:24 +0100)]
lib/ldb-samba: add ldif handler for msDS-TrustForestTrustInfo

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agotdb_wrap: Make mutexes easier to use
Volker Lendecke [Tue, 30 Sep 2014 11:04:21 +0000 (11:04 +0000)]
tdb_wrap: Make mutexes easier to use

This patch makes sure we work fine and open without mutexes if they
are not supported.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agotdb: allow tdb_open_ex() with O_RDONLY of TDB_FEATURE_FLAG_MUTEX tdbs.
Stefan Metzmacher [Tue, 4 Nov 2014 08:51:51 +0000 (09:51 +0100)]
tdb: allow tdb_open_ex() with O_RDONLY of TDB_FEATURE_FLAG_MUTEX tdbs.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbprofile: profile async pread/pwrite/fsync syscalls
Stefan Metzmacher [Sat, 15 Nov 2014 22:58:15 +0000 (23:58 +0100)]
s3:smbprofile: profile async pread/pwrite/fsync syscalls

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): Wed Nov 19 23:13:10 CET 2014 on sn-devel-104

5 years agos3:smbprofile: track connect_count and disconnect_count
Stefan Metzmacher [Fri, 14 Nov 2014 11:47:01 +0000 (12:47 +0100)]
s3:smbprofile: track connect_count and disconnect_count

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbprofile: remove unused {START,END}_PROFILE_STAMP()
Stefan Metzmacher [Mon, 17 Nov 2014 19:05:09 +0000 (20:05 +0100)]
s3:smbprofile: remove unused {START,END}_PROFILE_STAMP()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>