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

30661 Commits

Author SHA1 Message Date
Michael Adam
7e766a0a8a dbwrap: add dbwrap_flags argument to dbwrap_local_open()
To be consistent with db_open() and prepare for future
possible extensions.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-02-07 16:06:07 +01:00
Michael Adam
bbf0903d6b dbwrap: add a dbwrap_flags argument to db_open_tdb()
...for consistency and in preparation of future flags
that the tdb backend might be aware of.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-02-07 16:06:07 +01:00
David Disseldorp
54d07da81e torture: add zero length FSCTL_SRV_COPYCHUNK test
Windows Server 2012 returns NT_STATUS_INVALID_PARAMETER for
FSCTL_SRV_COPYCHUNK requests that include a server-side copy length of
zero, in line with MS-SMB2 3.3.5.15.6.

We should match this behaviour, so test for it.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-06 16:15:26 -08:00
Arvid Requate
98c961eb82 s4:samdb: respect SEARCH_FLAG_PRESERVEONDELETE
According to MS-ADTS section 3.1.1.5.5.1.1 the searchFlags must be
checked.

Signed-off-by: Arvid Requate <requate@univention.de>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Thu Feb  6 21:42:22 CET 2014 on sn-devel-104
2014-02-06 21:42:22 +01:00
Andrew Bartlett
741e5dca09 dsdb: Add more tests for DN+String and DN+Binary comparisons
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Feb  5 10:41:37 CET 2014 on sn-devel-104
2014-02-05 10:41:37 +01:00
Andrew Bartlett
262c3de3f8 dsdb: Return LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS rather than OPERATIONS_ERROR on EACCES and EPERM
This makes provision errors clearer in Samba.

Andrew Bartlett

Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2014-02-05 08:42:25 +01:00
Michael Adam
43d59d5cc4 loadparm: rename lp[cfg]_dir_mask to lp[cfg]_directory_mask for consistency with docs
Signed-off-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2014-02-03 13:27:25 +13:00
Michael Adam
4286e147a6 loadparm: rename lp[cfg]_print_ok to lp[cfg]_printable for consistency with docs
Signed-off-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2014-02-03 13:27:15 +13:00
Michael Adam
16c8762330 loadparm: rename lp[cfg]_readonly to lp[cfg]_read_only for consistency with docs
Signed-off-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2014-02-03 13:27:01 +13:00
Michael Adam
cdb6af95dd loadparm: rename lp[cfg]_hostsdeny to lp[cfg]_hosts_deny for consistency with docs
Signed-off-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2014-02-03 13:26:51 +13:00
Michael Adam
4670c43b32 loadparm: rename lp[cfg]_hostsallow to lp[cfg]_hosts_allow for consistency with docs
Signed-off-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2014-02-03 13:26:40 +13:00
Michael Adam
d85bab275a loadparm: rename lp[cfg]_pathname to lp[cfg]_path for consistency with docs
Signed-off-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2014-02-03 13:26:13 +13:00
Andrew Bartlett
fc77a69461 s4-resolve: Add lmhosts support into the source4 name resolve code
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-31 08:05:52 +01:00
Michael Brown
05c1fe5055 s4:tls_tstream: allow mode of SSL keyfile to be 0400, not only 0600
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10392

Signed-off-by: Michael Brown <michael@netdirect.ca>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jan 31 01:27:03 CET 2014 on sn-devel-104
2014-01-31 01:27:03 +01:00
Michael Adam
af360ede0e s4:torture:smb2: fix durable-open.reopen4
We currently don't support durable handles with delete-on-close:
with delete-on-close, we close a durable handle with delete-on-close
set upon disconnect.

This patch adapts the test to behave accordingly,
i.e. don't use delete-on-close...

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-01-30 12:26:45 -08:00
Garming Sam
72c6645760 s4-param: add error messages for failure to dump a parameter
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2014-01-28 17:26:36 +13:00
Garming Sam
931a370611 param: fix incorrect file error handling in s4 pyparam
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2014-01-28 17:26:36 +13:00
Garming Sam
e465634eec s4-testparm: modify dumping of parameters to use the lib/param code to have more consistent output
In making this change, it also fixes a bug where attempting to dump a parameter would immediately cause an error
(due to a lack of string conversion).

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2014-01-28 17:26:36 +13:00
Volker Lendecke
c437eaa625 heimdal: Fix a format error on FreeBSD10
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-01-24 13:42:38 -08:00
Noel Power
0f347e44e2 log winbind version (when requested) in winbindd log
winbindd currently only logs the INTERFACE version request,
it would be useful to additionally have the version returned
in the log also.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jim McDonough <jmcd@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Jan 22 21:57:04 CET 2014 on sn-devel-104
2014-01-22 21:57:04 +01:00
Stefan Metzmacher
38f8788d6b s4:torture/rpc: add invalidAuthenticate2
This add 'rpc.netlogon.netlogon.invalidAuthenticate2' as new test
it demonstrates the STATUS_BUFFER_OVERFLOW on computer names
larger than 15 characters.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jan 22 19:07:12 CET 2014 on sn-devel-104
2014-01-22 19:07:12 +01:00
Stefan Metzmacher
25fb73f282 s4:rpc_server/netlogon: return a zero return_authenticator and rid on error
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-22 17:12:29 +01:00
Andrew Bartlett
e758f41113 kdc: Add belts-and-braces check that we fail if the hdb version changes
This checks both if host system run-time Heimdal has changed version,
and that the build-time version is supported.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Jan 20 22:26:49 CET 2014 on sn-devel-104
2014-01-20 22:26:49 +01:00
Jeffrey Clark
368208069e Support for Heimdal's unified krb5 and hdb plugin system.
Fixes exportkeytab and a kdc crash when building against heimdal master.

Bug-Debian: http://bugs.debian.org/732342

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2014-01-21 08:30:36 +13:00
Stefan Metzmacher
dc561b7e2d dcerpc.idl: make use of union dcerpc_bind_ack_reason and fix all callers.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Jan 16 18:21:40 CET 2014 on sn-devel-104
2014-01-16 18:21:40 +01:00
Stefan Metzmacher
7a62a35577 s4:librpc/rpc: change dcerpc_map_reason() into dcerpc_map_nak_reason()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:53 +01:00
Stefan Metzmacher
0648f6e66e s4:librpc/rpc: add dcerpc_map_ack_reason()
This is not the value as dcerpc_bind_ack_reason values are not the same
as dcerpc_bind_nak_reason values.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:53 +01:00
Stefan Metzmacher
1a0eddbe6c s4:torture/libnet: fix compiler warnings in libnet_lookup.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:53 +01:00
Stefan Metzmacher
61a8525c8e s4:torture/libnet: check the result of libnet_LookupName()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:53 +01:00
Stefan Metzmacher
e5ac78e8b5 s4:torture/rpc: remove compiler warnings in ntsvcs.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
6ad66f49a8 s4:torture/rpc: remove compiler warnings in spoolss_notify.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
c5e9956b4c s4:torture/rpc: s/pipe/pipes/
pipe(2) is a system call.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
943e186b7a s4:torture/rpc: remove unused variables from alter_context.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
9b2dc0e46c s4:librpc: remove dcerpc_event_context()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
0400025237 s4:torture/rpc: avoid using dcerpc_event_context()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
095daba81d s4:torture/rpc: avoid usage of p->conn->event_ctx
torture_suite_add_rpc_iface_tcase() uses tctx->ev,
which means p->conn->event_ctx and tctx->ev are the same.

As we want to get rid of per connection tevent_context pointers,
we should use tctx->ev.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
16f4f2f0c7 s4:torture/libnet: remove bogus usage of p->conn->event_ctx
ctx->event_ctx and p->conn->event_ctx already have the same value
as torture->ev.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
124a89698b s4:winbind: let wb_samr_userdomgroups_send() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
ad14fb9545 s4:winbind: let wb_lsa_lookupnames_send() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
5559cdf5c2 s4:winbind: let wb_lsa_lookupsids_send() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
59bc7cb0df s4:winbind: make clear that we use the global tevent_context
We should avoid using the tevent_context pointer on a
dcecli_connection, it's the same as the global per task one
anyway.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
00d616e104 s4:winbind: correctly fill the libnet_context lsa and samr binding handles
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
d9573ae076 s4:libnet: let libnet_rpc_usermod() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
f33a558750 s4:libnet: let libnet_rpc_usermod_send() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
5bbcec0c2a s4:libnet: let libnet_rpc_userdel() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
0fdf392e6a s4:libnet: let libnet_rpc_userdel_send() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
adef841a59 s4:libnet: let libnet_rpc_useradd() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
e3b8df2b09 s4:libnet: let libnet_rpc_useradd_send() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Stefan Metzmacher
208991e497 s4:libnet: let libnet_rpc_userinfo() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Stefan Metzmacher
59fb19ebc4 s4:libnet: let libnet_rpc_userinfo_send() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Stefan Metzmacher
3c02eab248 s4:libnet: remove unused libnet_rpc_groupdel* code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Stefan Metzmacher
7a97662bb5 s4:libnet: let libnet_rpc_groupadd() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Stefan Metzmacher
1c6a2f8bca s4:libnet: let libnet_rpc_groupadd_send() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Stefan Metzmacher
959d94b153 s4:libnet: let libnet_rpc_groupinfo() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Stefan Metzmacher
0b3b0d225f s4:libnet: let libnet_rpc_groupinfo_send() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Stefan Metzmacher
6e5943af94 s4:libnet: avoid using dcecli_connection->event_ctx
We should avoid per connection tevent_contexts,
the one per libnet_context isn't much better, but a start.

Note the pointers have the same value.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Stefan Metzmacher
c477850467 s4:libnet: keep a dcerpc_binding_handle for samr and lsa
This completes commit a3ae9802d4.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Andrew Bartlett
bd0f9f4dec ntvfs: Remove CAP_UNIX from the ntvfs file server as it was never finished
Only some of the unix extensions where implemented, but this was enough
to caused the samba3.smbtorture_s3.plain(dc).LARGE_READX to fail when they
are enabled (as is the default in source3/param).

Signed-off-by: Andrew Bartlett <abartlet@samba.org>

Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-01-14 23:44:26 +01:00
Matthias Dieter Wallnöfer
0c2fbe5a0c samba:python - Py_RETURN_NONE remove compatibility code for releases < 2.4
http://www.python.org/doc//current/c-api/none.html

Reviewed-By: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date(master): Thu Jan  9 16:27:47 CET 2014 on sn-devel-104
2014-01-09 16:27:47 +01:00
Stefan Metzmacher
175b8e1475 s4:rpc_server: remember the hdr_signing negotiation result in dcesrv_auth
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jan  8 18:37:22 CET 2014 on sn-devel-104
2014-01-08 18:37:22 +01:00
Stefan Metzmacher
c4726e414d s4:rpc_server: use talloc_zero for struct dcesrv_connection
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-08 14:35:29 +01:00
Stefan Metzmacher
79996cd1eb s4:rpc_server: remove unused DCESRV_CALL_STATE_FLAG_HEADER_SIGNING
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-08 14:35:16 +01:00
Stefan Metzmacher
7d2abf520d s4:netlogon: implement "allow nt4 crypto" and "reject md5 clients" features.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jan  7 16:53:31 CET 2014 on sn-devel-104
2014-01-07 16:53:31 +01:00
Stefan Metzmacher
2e36fbc77d s4:netlogon: don't generate a debug message for SEC_CHAN_NULL.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 12:47:18 +01:00
Stefan Metzmacher
3b77b804cd s4:netlogon: correctly calculate the negotiate_flags
We need to bit-wise AND the client and server flags.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 12:47:18 +01:00
Gregor Beck
6b586c3cf6 s4:librpc: remove recv_data from transport
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jan  7 12:42:32 CET 2014 on sn-devel-104
2014-01-07 12:42:32 +01:00
Gregor Beck
9d2557d6e4 s4:librpc: factor out xxx_send_request() to dcerpc_send_request()
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:46 +01:00
Gregor Beck
445913133a s4:librpc: factor out xxx_send_read() to dcerpc_send_read()
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:46 +01:00
Gregor Beck
9832eb6bbf s4:librpc: factor out xxx_shutdown_pipe() to dcerpc_shutdown_pipe()
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:46 +01:00
Gregor Beck
30ca477c71 s4:librpc: factor out xxx_dead() to dcerpc_transport_dead()
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:46 +01:00
Gregor Beck
3193c27256 s4:librpc: remove server_name from transport
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:45 +01:00
Stefan Metzmacher
383ba3dacf s4:librpc: make 'struct dcerpc_pipe_connect' private
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:45 +01:00
Stefan Metzmacher
27d0d32105 s4:librpc: remove unused dcerpc_smb2.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:45 +01:00
Stefan Metzmacher
a9bb84c4b0 s4:librpc: implement dcerpc_pipe_open_smb2() in dcerpc_smb.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:45 +01:00
Stefan Metzmacher
7352f7f91d s4:librpc: make use of dcerpc_pipe_open_smb_send/recv for SMB2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:44 +01:00
Stefan Metzmacher
45fc961932 s4:librpc: pass dcecli_connection instead of dcerpc_pipe to dcerpc_secondary_smb_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:44 +01:00
Stefan Metzmacher
bebc05a973 s4:librpc: use dcerpc_binding_dup() instead of talloc_reference()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:44 +01:00
Stefan Metzmacher
a08ee93a2f s4:librpc: pass smbXcli_{conn,session,tcon} to dcerpc_pipe_open_smb_send()
This will allow it to be used also for smb2 later.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:44 +01:00
Stefan Metzmacher
f7b1ff2cf4 s4:librpc: don't talloc_reference smbcli_tree
It's the job of the caller to make sure it stays for the
whole lifetime of the connection.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:43 +01:00
Stefan Metzmacher
e6474ba2c2 s4:librpc: keep smbcli_tree/smb2_tree as talloc child of dcecli_connection
This will avoid the need of talloc_reference later.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:43 +01:00
Gregor Beck
d230f73e97 s4:librpc: use tstream_smbXcli_np in dcerpc_smb.c
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:43 +01:00
Gregor Beck
2ec65ea1e7 s4:librpc: use tstream in dcerpc_sock.c
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:43 +01:00
Stefan Metzmacher
01ea63e1a1 s4:librpc: make it possible for the transport to specify the max_xmit/recv_size
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:42 +01:00
Stefan Metzmacher
ef28ed685f libcli/smb: move some *TRANSACT_* flags to smb_constants.h
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:38 +01:00
Stefan Metzmacher
306cba4b8c libcli/smb: move some FILE_* flags to smb_constants.h
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:38 +01:00
Stefan Metzmacher
d821661484 s4:librpc/rpc: update alloc_hint for each fragment
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:36 +01:00
Stefan Metzmacher
ce84ade56c s4:librpc/rpc: remove unused rpc_request->ndr structure
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:36 +01:00
Stefan Metzmacher
cc899e8d96 s4:rpc_server: don't support functions DCERPC pipes in remoted backend
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:36 +01:00
Stefan Metzmacher
a0f781cca4 s4:librpc: fix memory leaks in dcerpc_request_recv_data()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-07 08:37:35 +01:00
Stefan Metzmacher
b61f71730f s4:librpc: fix memory leak in ncacn_pull()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-07 08:37:35 +01:00
Stefan Metzmacher
4cc3388c03 s4:pyrpc: fix talloc hierachie in dcerpc_InterfaceObject
The tevent_context is cached under the connection,
so we need to make sure it stays arround as long as the connection.

Otherwise it will segfault while dereferencing the tevent_context
on deallocation if a secondary connection is arround.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:34 +01:00
Stefan Metzmacher
13ccc5b517 s4:torture:spoolss_win: fix valgrind problem in test_EnumJobs()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:34 +01:00
Ricky Nance
0dc30b9fe8 samba_upgradedns: message the user if they need to change smb.conf
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Jan  7 06:05:15 CET 2014 on sn-devel-104
2014-01-07 06:05:15 +01:00
Stefan Metzmacher
54b5b3067f s4:gensec_gssapi: make sure gensec_gssapi_[un]seal_packet() rejects header signing
If header signing is requested we should error out instead of
silently ignoring it, our peer would hopefully reject it,
but we should also do that.

TODO: we should implement header signing using gss_wrap_iov().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 00:27:11 +01:00
Stefan Metzmacher
14f6c41754 s4:auth/gensec_gssapi: handle GENSEC_FEATURE_SIGN_PKT_HEADER in have_feature()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 00:27:11 +01:00
Stefan Metzmacher
661fe3cf89 s4:rpc_server: support DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN by default
If the gensec backend supports it there's no reason to disable it.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 00:27:11 +01:00
Stefan Metzmacher
7db1dc13b0 s4:librpc: always try to negotiate DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN
If the gensec backend supports it there's no reason not sign the header.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 00:27:11 +01:00
Volker Lendecke
168db8b9d2 waf: Fix the FreeBSD build with libinotify
Signed-off-by: Volker Lendecke <vl@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jan  6 19:50:22 CET 2014 on sn-devel-104
2014-01-06 19:50:22 +01:00
Stefan Metzmacher
056008df62 s4:selftest: run wbinfo tests at the end...
This avoids flakey crashes in the promoted_dc environment.

See the examples below, we had up to 50% of the daily build failing...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

https://git.samba.org/autobuild.flakey/2013-12-23-1942/samba.stdout

  [1586/1594 in 1h39m20s] samba4.drs.fsmo.python(promoted_dc)
  Testing for schema role transfer from localdc.samba.example.com to PROMOTEDVDC.samba.example.com
  FSMO transfer of 'schema' role successful
  Testing for schema role transfer from PROMOTEDVDC.samba.example.com to localdc.samba.example.com
  ERROR: Failed to initiate transfer of 'schema' role: LDAP error 52 LDAP_UNAVAILABLE -  <Failed FSMO transfer: WERR_DS_DRA_INTERNAL_ERROR> <>
  UNEXPECTED(failure): samba4.drs.fsmo.python(promoted_dc).fsmo.DrsFsmoTestCase.test_SchemaMasterTransfer(promoted_dc)
  REASON: _StringException: _StringException: Content-Type: text/x-traceback;charset=utf8,language=python
  traceback
  380

https://git.samba.org/autobuild.flakey/2013-12-24-1546/samba.stdout

  [1583/1594 in 1h36m4s] samba.tests.blackbox.samba_tool_drs
  ERROR: Testsuite[samba.tests.blackbox.samba_tool_drs]
  REASON: unable to set up environment promoted_dc - exiting

https://git.samba.org/autobuild.flakey/2013-12-24-1546/samba.stderr

  Unable to convert 1.2.840.86419.1.5.9939 to an attid, and can_change_pfm=false!
  Unable to convert governsID on CN=test-class30318,CN=Schema,CN=Configuration,DC=samba,DC=example,DC=com to DRS object - WERR_NOT_FOUND
  ../source4/rpc_server/drsuapi/getncchanges.c:1646: DsGetNCChanges 2nd replication on different DN CN=Configuration,DC=samba,DC=example,DC=com CN=Schema,CN=Configuration,DC=samba,DC=example,DC=com (last_dn CN=Schema,CN=Configuration,DC=samba,DC=example,DC=com)
  ===============================================================
  INTERNAL ERROR: Signal 11 in pid 884274 (4.2.0pre1-DEVELOPERBUILD)
  Please read the Trouble-Shooting section of the Samba HOWTO
  ===============================================================
  smb_panic(): calling panic action [/memdisk/autobuild/fl/b302436/samba/selftest/gdb_backtrace 884274]
  [Thread debugging using libthread_db enabled]
  0x00002af6b5c1977e in __libc_waitpid (pid=<value optimized out>,
      stat_loc=0x7fff67c7709c, options=<value optimized out>)
      at ../sysdeps/unix/sysv/linux/waitpid.c:32
  32	../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
  	in ../sysdeps/unix/sysv/linux/waitpid.c
  #0  0x00002af6b5c1977e in __libc_waitpid (pid=<value optimized out>,
      stat_loc=0x7fff67c7709c, options=<value optimized out>)
      at ../sysdeps/unix/sysv/linux/waitpid.c:32
          oldtype = <value optimized out>
          result = <value optimized out>
  #1  0x00002af6b5baeb39 in do_system (line=<value optimized out>)
      at ../sysdeps/posix/system.c:149
          __result = -512
          _buffer = {__routine = 0x2af6b5baee90 <cancel_handler>,
            __arg = 0x7fff67c77098, __canceltype = 0, __prev = 0x0}
          _avail = 1
          status = <value optimized out>
          save = <value optimized out>
          pid = 886733
          sa = {__sigaction_handler = {sa_handler = 0x1, sa_sigaction = 0x1},
            sa_mask = {__val = {65536, 0 <repeats 15 times>}}, sa_flags = 0,
            sa_restorer = 0x2af6b5b730f0}
          omask = {__val = {7808, 4294967295, 140734934511616, 1, 2195512, 0,
              0, 0, 47239032274944, 47239027992529, 140733193388033, 0, 0,
              47239099003120, 140734934511792, 47239558787328}}
  #2  0x00002af6b311821f in smb_panic_default (
      why=0x2af6b312a875 "internal error") at ../lib/util/fault.c:134
          result = 32767
          pidstr = "884274\000\000\001\375\376\320\366*\000\000\260\377\377\377"
          cmdstring = "/memdisk/autobuild/fl/b302436/samba/selftest/gdb_backtrace 884274\000\307g\377\177\000\000\001\000\000\000\000\000\000\000\320\301#", '\000' <repeats 30 times>"\240, \017\263\366*\000\000\321\247{\261\366*\000\000\001\000\000\000\005", '\000' <repeats 11 times>"\260, \016\v\321\366*\000\000X\351\017\263\366*\000\000\260q\307g\377\177\000\000\000\361\036\321\366*\000\000\020r\307g\377\177\000\000\240\301z\326\366*\000\000\000Z\304\320\366*\000"
          __FUNCTION__ = "smb_panic_default"
  #3  0x00002af6b31183b5 in smb_panic (why=0x2af6b312a875 "internal error")
      at ../lib/util/fault.c:162
  No locals.
  #4  0x00002af6b311809f in fault_report (sig=11) at ../lib/util/fault.c:77
          counter = 1
          __FUNCTION__ = "fault_report"
  #5  0x00002af6b31180b4 in sig_fault (sig=11) at ../lib/util/fault.c:88
  No locals.
  #6  <signal handler called>
  No symbol table info available.
  #7  0x00002af6cabef930 in replmd_check_urgent_objectclass (
      objectclass_el=0x0, situation=REPL_URGENT_ON_UPDATE)
      at ../source4/dsdb/samdb/ldb_modules/repl_meta_data.c:205
          i = 2
          j = 0
  #8  0x00002af6cabf29b6 in replmd_update_rpmd (module=0x2af6b17f2c20,
      schema=0x2af6d05e5570, req=0x2af6d05e8ad0, rename_attrs=0x0,
      msg=0x2af6d11ef100, seq_num=0x2af6d0c315b8, t=1387895162,
      is_urgent=0x7fff67c778bf, rodc=0x7fff67c778be)
      at ../source4/dsdb/samdb/ldb_modules/repl_meta_data.c:1432
          omd_value = 0x7fff67c77810
          ndr_err = 3508465920
          omd = {version = 1741125552, reserved = 32767, ctr = {ctr1 = {
                count = 3008684740, reserved = 10998, array = 0x7fff67c777b0}}}
          i = 10998
          now = 130323687620000000
          our_invocation_id = 0x2af6d1796390
          ret = 0
          attrs = 0x7fff67c77750
          attrs1 = {0x2af6cabff775 "replPropertyMetaData", 0x2af6cabffc8b "*",
            0x0}
          attrs2 = {0x2af6cabff76a "uSNChanged", 0x2af6cabffa98 "objectClass",
            0x2af6cabffc8d "instanceType", 0x0}
          res = 0x2af6d10b0eb0
          ldb = 0x2af6b17f2470
          objectclass_el = 0x0
          situation = REPL_URGENT_ON_UPDATE
          rmd_is_provided = false
          __FUNCTION__ = "replmd_update_rpmd"
  #9  0x00002af6cabf5a06 in replmd_modify (module=0x2af6b17f2c20,
      req=0x2af6d05e8ad0)
      at ../source4/dsdb/samdb/ldb_modules/repl_meta_data.c:2455
          msds_intid_struct = 0x2af6d05e8ad0
          ldb = 0x2af6b17f2470
          ac = 0x2af6d0c31580
          down_req = 0x2af6d0e6a100
          msg = 0x2af6d11ef100
          t = 1387895162
          ret = 1741125936
          is_urgent = false
          rodc = false
          functional_level = 3
          guid_blob = 0x0
          sd_propagation_control = 0x0
  #10 0x00002af6bf69f94d in dsdb_module_modify (module=0x2af6b17f2c20,
      message=0x2af6d1183fe0, dsdb_flags=4194304, parent=0x2af6ce6ea980)
      at ../source4/dsdb/samdb/ldb_modules/util.c:460
          ops = 0x2af6cae06b40
          mod_req = 0x2af6d05e8ad0
          ret = 0
          ldb = 0x2af6b17f2470
          tmp_ctx = 0x2af6d0ed62f0
          res = 0x2af6d0e6a100
          __FUNCTION__ = "dsdb_module_modify"
  #11 0x00002af6cabf7ebc in replmd_delete_internals (module=0x2af6b17f2c20,
      req=0x2af6ce6ea980, re_delete=true)
      at ../source4/dsdb/samdb/ldb_modules/repl_meta_data.c:3309
          ret = 0
          retb = true
          disallow_move_on_delete = false
          old_dn = 0x2af6d6a2a010
          new_dn = 0x2af6d0794a90
          rdn_name = 0x2af6d0885c10 "CN"
          rdn_value = 0x2af6d10d7368
          new_rdn_value = 0x2af6d0c45a00
          guid = {time_low = 48, time_mid = 0, time_hi_and_version = 0,
            clock_seq = "\200\251", node = "n\316\366*\000"}
          ldb = 0x2af6b17f2470
          schema = 0x2af6d05e5570
          msg = 0x2af6d1183fe0
          old_msg = 0x2af6d1902800
          el = 0x2af6d0874900
          tmp_ctx = 0x2af6d0b77560
          res = 0x2af6d0d57980
          parent_res = 0x30
          preserved_attrs = {0x2af6cac00fe1 "nTSecurityDescriptor",
            0x2af6cac055c3 "attributeID", 0x2af6cac055cf "attributeSyntax",
            0x2af6cac055df "dNReferenceUpdate", 0x2af6cac055f1 "dNSHostName",
            0x2af6cac055fd "flatName", 0x2af6cac05606 "governsID",
            0x2af6cac05610 "groupType", 0x2af6cabffc8d "instanceType",
            0x2af6cac0561a "lDAPDisplayName",
            0x2af6cac0562a "legacyExchangeDN", 0x2af6cabfe94d "isDeleted",
            0x2af6cabfe957 "isRecycled", 0x2af6cac020f8 "lastKnownParent",
            0x2af6cac021e8 "msDS-LastKnownRDN",
            0x2af6cac0563b "mS-DS-CreatorSID", 0x2af6cac0564c "mSMQOwnerID",
            0x2af6cac05658 "nCName", 0x2af6cabffa98 "objectClass",
            0x2af6cac0565f "distinguishedName", 0x2af6cabff5b5 "objectGUID",
            0x2af6cac05671 "objectSid", 0x2af6cac0567b "oMSyntax",
            0x2af6cac05684 "proxiedObjectName", 0x2af6cac014d8 "name",
            0x2af6cabff775 "replPropertyMetaData",
            0x2af6cac05696 "sAMAccountName",
            0x2af6cac056a5 "securityIdentifier", 0x2af6cac056b8 "sIDHistory",
            0x2af6cac056c3 "subClassOf", 0x2af6cac01ba8 "systemFlags",
            0x2af6cac056ce "trustPartner", 0x2af6cac056db "trustDirection",
            0x2af6cac056ea "trustType", 0x2af6cac056f4 "trustAttributes",
            0x2af6cabfe9b8 "userAccountControl", 0x2af6cabff76a "uSNChanged",
            0x2af6cabff75f "uSNCreated", 0x2af6cabff747 "whenCreated",
            0x2af6cabff753 "whenChanged", 0x0}
          i = 12
          el_count = 1
          deletion_state = OBJECT_TOMBSTONE
          next_deletion_state = OBJECT_TOMBSTONE
          __FUNCTION__ = "replmd_delete_internals"
  #12 0x00002af6cabfbbe3 in replmd_replicated_apply_isDeleted (
      ar=0x2af6d74c0b40)
      at ../source4/dsdb/samdb/ldb_modules/repl_meta_data.c:4718
          del_req = 0x2af6ce6ea980
          res = 0x2af6d0cdebf0
          tmp_ctx = 0x2af6d0949230
          deleted_objects_dn = 0x2af6d1a49f00
          msg = 0x2af6d0a39620
          ret = 0
  #13 0x00002af6cabf0766 in replmd_op_callback (req=0x2af6d05a21e0,
      ares=0x2af6d0d715c0)
      at ../source4/dsdb/samdb/ldb_modules/repl_meta_data.c:526
          ret = 10998
          ac = 0x2af6d74c0b40
          replmd_private = 0x2af6b188c7c0
          modified_partition = 0x2af6d141b670
          partition_ctrl = 0x2af6d1905f40
          partition = 0x2af6ce6bdbe0
          controls = 0x0
          __FUNCTION__ = "replmd_op_callback"
  #14 0x00002af6b1df7ca2 in ldb_module_done (req=0x2af6d05a21e0,
      ctrls=0x2af6d1629aa0, response=0x0, error=0)
      at ../lib/ldb/common/ldb_modules.c:832
          ares = 0x2af6d0d715c0
  #15 0x00002af6cabf896b in replmd_op_possible_conflict_callback (
      req=0x2af6d05a21e0, ares=0x2af6b1883eb0,
      callback=0x2af6cabf0334 <replmd_op_callback>)
      at ../source4/dsdb/samdb/ldb_modules/repl_meta_data.c:3606
          conflict_dn = 0x2af6cac03470
          ar = 0x2af6d74c0b40
          res = 0x2af6b354f89b
          attrs = {0x2af6cabff775 "replPropertyMetaData",
            0x2af6cabff5b5 "objectGUID", 0x0}
          ret = -682882240
          omd_value = 0x7fff67c77e20
          omd = {version = 1741127104, reserved = 32767, ctr = {ctr1 = {
                count = 0, reserved = 0, array = 0x28}}}
          rmd = 0x2af6d74c0ae0
          ndr_err = 10998
          rename_incoming_record = false
          rodc = false
          rmd_name = 0x7fff67c77e10
          omd_name = 0x2af6d74c0b40
          msg = 0x2af6b1883e50
          __FUNCTION__ = "replmd_op_possible_conflict_callback"
  #16 0x00002af6cabf93fb in replmd_op_add_callback (req=0x2af6d05a21e0,
      ares=0x2af6b1883eb0)
      at ../source4/dsdb/samdb/ldb_modules/repl_meta_data.c:3802
          ar = 0x2af6d74c0b40
  #17 0x00002af6b1df7ca2 in ldb_module_done (req=0x2af6d05a21e0,
      ctrls=0x2af6d1629aa0, response=0x0, error=0)
      at ../lib/ldb/common/ldb_modules.c:832
          ares = 0x2af6b1883eb0
  #18 0x00002af6ca3c8b6a in partition_req_callback (req=0x2af6d087a1e0,
      ares=0x2af6d05a1fa0) at ../source4/dsdb/samdb/ldb_modules/partition.c:213
          ac = 0x2af6d0949370
          module = 0x2af6cd27bf12
          nreq = 0x2af6d05b67b0
          ret = 0
          partition_ctrl = 0x2af6d0d71740
  #19 0x00002af6cd2752ab in ltdb_request_done (ctx=0x2af6d1cd7ed0, error=0)
      at ../lib/ldb/ldb_tdb/ldb_tdb.c:1280
          ldb = 0x2af6b17f2470
          req = 0x2af6d087a1e0
          ares = 0x2af6d05a1fa0
  #20 0x00002af6cd275597 in ltdb_callback (ev=0x2af6b17ef8c0,
      te=0x2af6d17f75d0, t=..., private_data=0x2af6d1cd7ed0)
      at ../lib/ldb/ldb_tdb/ldb_tdb.c:1390
          ctx = 0x2af6d1cd7ed0
          ret = 0
  #21 0x00002af6b3343259 in tevent_common_loop_timer_delay (ev=0x2af6b17ef8c0)
      at ../lib/tevent/tevent_timed.c:341
          current_time = {tv_sec = 0, tv_usec = 0}
          te = 0x2af6d17f75d0
  #22 0x00002af6b334558a in epoll_event_loop_once (ev=0x2af6b17ef8c0,
      location=0x2af6b1e1eef8 "../lib/ldb/common/ldb.c:621")
      at ../lib/tevent/tevent_epoll.c:912
          epoll_ev = 0x2af6b17efb00
          tval = {tv_sec = 47239056876603, tv_usec = 47239028210096}
          panic_triggered = false
  #23 0x00002af6b3342363 in std_event_loop_once (ev=0x2af6b17ef8c0,
      location=0x2af6b1e1eef8 "../lib/ldb/common/ldb.c:621")
      at ../lib/tevent/tevent_standard.c:112
          glue_ptr = 0x2af6b17ef9b0
          glue = 0x2af6b17ef9b0
          ret = 10998
  #24 0x00002af6b333c799 in _tevent_loop_once (ev=0x2af6b17ef8c0,
      location=0x2af6b1e1eef8 "../lib/ldb/common/ldb.c:621")
      at ../lib/tevent/tevent.c:530
          ret = 0
          nesting_stack_ptr = 0x0
  #25 0x00002af6b1e154c4 in ldb_wait (handle=0x2af6d67624c0, type=LDB_WAIT_ALL)
      at ../lib/ldb/common/ldb.c:621
          ev = 0x2af6b17ef8c0
          ret = 0
  #26 0x00002af6b1e1786b in ldb_extended (ldb=0x2af6b17f2470,
      oid=0x2af6b4c4f9ce "1.3.6.1.4.1.7165.4.4.1", data=0x2af6d0e2bc60,
      _res=0x7fff67c78240) at ../lib/ldb/common/ldb.c:1506
          req = 0x2af6d0c45a00
          ret = 0
          res = 0x2af6d69238f0
  #27 0x00002af6b4c4a0d6 in dsdb_replicated_objects_commit (ldb=0x2af6b17f2470,
      working_schema=0x0, objects=0x2af6d0e2bc60, notify_uSN=0x2af6d14a65f0)
      at ../source4/dsdb/repl/replicated_objects.c:773
          werr = {w = 0}
          ext_res = 0x0
          cur_schema = 0x0
          new_schema = 0x0
          ret = 0
          seq_num1 = 5554
          seq_num2 = 47239626746464
          used_global_schema = false
          tmp_ctx = 0x2af6d03c5860
          __FUNCTION__ = "dsdb_replicated_objects_commit"
  #28 0x00002af6c1c6babb in dreplsrv_op_pull_source_apply_changes_trigger (
      req=0x2af6d17daed0, r=0x2af6d17db0d0, ctr_level=6, ctr1=0x0,
      ctr6=0x2af6d1b02bb0) at ../source4/dsdb/repl/drepl_out_helpers.c:717
          state = 0x2af6d17db050
          rf1 = {blobsize = 274, consecutive_sync_failures = 0,
            last_success = 130323684670000000,
            last_attempt = 130323687610000000, result_last_attempt = {w = 0},
            other_info = 0x2af6d0949910, other_info_length = 66,
            replica_flags = 112, schedule = '\021' <repeats 84 times>,
            reserved = 0, highwatermark = {tmp_highest_usn = 12398,
              reserved_usn = 0, highest_usn = 12398}, source_dsa_obj_guid = {
              time_low = 984092159, time_mid = 850,
              time_hi_and_version = 18870, clock_seq = "\251X",
              node = "UF\324\223\205\241"}, source_dsa_invocation_id = {
              time_low = 1460694408, time_mid = 52035,
              time_hi_and_version = 18738, clock_seq = "\204}",
              node = "\264\365\276\372\256\303"}, transport_guid = {
              time_low = 0, time_mid = 0, time_hi_and_version = 0,
              clock_seq = "\000", node = "\000\000\000\000\000"}}
          service = 0x2af6d0ff6b00
          partition = 0x2af6d0b6f220
          drsuapi = 0x2af6d1c8d480
          schema = 0x2af6d05e5570
          working_schema = 0x0
          mapping_ctr = 0x2af6d1b02c10
          object_count = 50
          first_object = 0x2af6d0571800
          linked_attributes_count = 0
          linked_attributes = 0x2af6d5212140
          uptodateness_vector = 0x2af6d1a741c0
          objects = 0x2af6d0e2bc60
          more_data = false
          status = {w = 0}
          nt_status = {v = 3006553120}
          dsdb_repl_flags = 0
          __FUNCTION__ = "dreplsrv_op_pull_source_apply_changes_trigger"
  #29 0x00002af6c1c6b3e7 in dreplsrv_op_pull_source_get_changes_done (
      subreq=0x0) at ../source4/dsdb/repl/drepl_out_helpers.c:599
          req = 0x2af6d17daed0
          state = 0x2af6d17db050
          status = {v = 0}
          r = 0x2af6d17db0d0
          ctr_level = 6
          ctr1 = 0x0
          ctr6 = 0x2af6d1b02bb0
          extended_ret = DRSUAPI_EXOP_ERR_NONE
  #30 0x00002af6b333e2f8 in _tevent_req_notify_callback (req=0x2af6d1a73f70,
      location=0x2af6c1c7d5f8 "default/librpc/gen_ndr/ndr_drsuapi_c.c:712")
      at ../lib/tevent/tevent_req.c:102
  No locals.
  #31 0x00002af6b333e34d in tevent_req_finish (req=0x2af6d1a73f70,
      state=TEVENT_REQ_DONE,
      location=0x2af6c1c7d5f8 "default/librpc/gen_ndr/ndr_drsuapi_c.c:712")
      at ../lib/tevent/tevent_req.c:117
  No locals.
  #32 0x00002af6b333e374 in _tevent_req_done (req=0x2af6d1a73f70,
      location=0x2af6c1c7d5f8 "default/librpc/gen_ndr/ndr_drsuapi_c.c:712")
      at ../lib/tevent/tevent_req.c:123
  No locals.
  #33 0x00002af6c1c708df in dcerpc_drsuapi_DsGetNCChanges_r_done (
      subreq=0x2af6d122f4c0) at default/librpc/gen_ndr/ndr_drsuapi_c.c:712
          req = 0x2af6d1a73f70
          status = {v = 0}
  #34 0x00002af6b333e2f8 in _tevent_req_notify_callback (req=0x2af6d122f4c0,
      location=0x2af6b575b688 "../librpc/rpc/binding_handle.c:517")
      at ../lib/tevent/tevent_req.c:102
  No locals.
  #35 0x00002af6b333e34d in tevent_req_finish (req=0x2af6d122f4c0,
      state=TEVENT_REQ_DONE,
      location=0x2af6b575b688 "../librpc/rpc/binding_handle.c:517")
      at ../lib/tevent/tevent_req.c:117
  No locals.
  #36 0x00002af6b333e374 in _tevent_req_done (req=0x2af6d122f4c0,
      location=0x2af6b575b688 "../librpc/rpc/binding_handle.c:517")
      at ../lib/tevent/tevent_req.c:123
  No locals.
  #37 0x00002af6b5757ede in dcerpc_binding_handle_call_done (subreq=0x0)
      at ../librpc/rpc/binding_handle.c:517
          req = 0x2af6d122f4c0
          state = 0x2af6d122f640
          h = 0x2af6d0959d10
          error = {v = 0}
          out_flags = 0
          ndr_err = NDR_ERR_SUCCESS
  #38 0x00002af6b333e2f8 in _tevent_req_notify_callback (req=0x2af6d522f7a0,
      location=0x2af6b575b1d0 "../librpc/rpc/binding_handle.c:188")
      at ../lib/tevent/tevent_req.c:102
  No locals.
  #39 0x00002af6b333e34d in tevent_req_finish (req=0x2af6d522f7a0,
      state=TEVENT_REQ_DONE,
      location=0x2af6b575b1d0 "../librpc/rpc/binding_handle.c:188")
      at ../lib/tevent/tevent_req.c:117
  No locals.
  #40 0x00002af6b333e374 in _tevent_req_done (req=0x2af6d522f7a0,
      location=0x2af6b575b1d0 "../librpc/rpc/binding_handle.c:188")
      at ../lib/tevent/tevent_req.c:123
  No locals.
  #41 0x00002af6b5757398 in dcerpc_binding_handle_raw_call_done (subreq=0x0)
      at ../librpc/rpc/binding_handle.c:188
          req = 0x2af6d522f7a0
          state = 0x2af6d522f920
          error = {v = 0}
  #42 0x00002af6b333e2f8 in _tevent_req_notify_callback (req=0x2af6d0712430,
      location=0x2af6b44b8810 "../source4/librpc/rpc/dcerpc.c:322")
      at ../lib/tevent/tevent_req.c:102
  No locals.
  #43 0x00002af6b333e34d in tevent_req_finish (req=0x2af6d0712430,
      state=TEVENT_REQ_DONE,
      location=0x2af6b44b8810 "../source4/librpc/rpc/dcerpc.c:322")
      at ../lib/tevent/tevent_req.c:117
  No locals.
  #44 0x00002af6b333e472 in tevent_req_trigger (ev=0x2af6b17ef8c0,
      im=0x2af6d0712500, private_data=0x2af6d0712430)
      at ../lib/tevent/tevent_req.c:174
          req = 0x2af6d0712430
  #45 0x00002af6b333d6d4 in tevent_common_loop_immediate (ev=0x2af6b17ef8c0)
      at ../lib/tevent/tevent_immediate.c:135
          im = 0x2af6d0712500
          handler = 0x2af6b333e423 <tevent_req_trigger>
          private_data = 0x2af6d0712430
  #46 0x00002af6b3345570 in epoll_event_loop_once (ev=0x2af6b17ef8c0,
      location=0x2af6b15a7b9f "../source4/smbd/server.c:503")
      at ../lib/tevent/tevent_epoll.c:907
          epoll_ev = 0x2af6b17efb00
          tval = {tv_sec = 47239056876603, tv_usec = 47239028210096}
          panic_triggered = false
  #47 0x00002af6b3342363 in std_event_loop_once (ev=0x2af6b17ef8c0,
      location=0x2af6b15a7b9f "../source4/smbd/server.c:503")
      at ../lib/tevent/tevent_standard.c:112
          glue_ptr = 0x2af6b17ef9b0
          glue = 0x2af6b17ef9b0
          ret = 10998
  #48 0x00002af6b333c799 in _tevent_loop_once (ev=0x2af6b17ef8c0,
      location=0x2af6b15a7b9f "../source4/smbd/server.c:503")
      at ../lib/tevent/tevent.c:530
          ret = 0
          nesting_stack_ptr = 0x0
  #49 0x00002af6b333ca11 in tevent_common_loop_wait (ev=0x2af6b17ef8c0,
      location=0x2af6b15a7b9f "../source4/smbd/server.c:503")
      at ../lib/tevent/tevent.c:634
          ret = 0
  #50 0x00002af6b3342405 in std_event_loop_wait (ev=0x2af6b17ef8c0,
      location=0x2af6b15a7b9f "../source4/smbd/server.c:503")
      at ../lib/tevent/tevent_standard.c:138
          glue_ptr = 0x2af6b17ef9b0
          glue = 0x2af6b17ef9b0
          ret = 10998
  #51 0x00002af6b333cadc in _tevent_loop_wait (ev=0x2af6b17ef8c0,
      location=0x2af6b15a7b9f "../source4/smbd/server.c:503")
      at ../lib/tevent/tevent.c:653
  No locals.
  #52 0x00002af6b15a37bc in binary_smbd_main (
      binary_name=0x2af6b15a737b "samba", argc=6, argv=0x7fff67c78de8)
      at ../source4/smbd/server.c:503
          opt_daemon = false
          opt_interactive = true
          opt = -1
          pc = 0x2af6b17d5040
          static_init = {0x2af6b2ac7d8c <server_service_auth_init>,
            0x2af6b2aca9e7 <server_service_echo_init>, 0}
          shared_init = 0x2af6b18143b0
          event_ctx = 0x2af6b17ef8c0
          stdin_event_flags = 1
          status = {v = 0}
          model = 0x2af6b17d5b90 "single"
          max_runtime = 7500

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Jan  6 01:16:13 CET 2014 on sn-devel-104
2014-01-06 01:16:13 +01:00
Stefan Metzmacher
a7f1f5d6b8 Happy New Year 2014!
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-01-02 14:04:26 +01:00
Garming Sam
819e1f561d selftest: add rodc and other env tests for wbinfo
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Dec 23 17:17:39 CET 2013 on sn-devel-104
2013-12-23 17:17:39 +01:00
Volker Lendecke
970a6efa3b share_ldb: Fix a memleak
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): Tue Dec 17 03:50:58 CET 2013 on sn-devel-104
2013-12-17 03:50:58 +01:00
Volker Lendecke
20efaf9ea7 share_ldb: Fix CID 1138336 Dereference null return value
False positive, but this way we avoid another strchr

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-17 01:57:13 +01:00
Volker Lendecke
b067f1e35b share_ldb: Fix a memleak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-17 01:57:13 +01:00
Volker Lendecke
ec270cf6a8 share_ldb: Fix CID 1138337 Dereference null return value
False positive, but this way we avoid another strchr

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-17 01:57:13 +01:00
Volker Lendecke
65d0dceea5 ntvfs: Fix CID 241291 Argument cannot be negative
getgroups can return -1, which talloc_array won't be happy about

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-17 01:57:12 +01:00
Christian Ambach
ce975e61b8 s4:rpc_server/lsa_lookup fix a compile warning
about a set, but unused variable

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Dec 13 01:49:50 CET 2013 on sn-devel-104
2013-12-13 01:49:50 +01:00
Christian Ambach
2e1ed2c74b s4:libcli fix compiler warnings
about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-12 14:21:28 -08:00
Christian Ambach
7964a83447 s4:kdc fix compiler warnings
about set but unused variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-12 14:21:28 -08:00
Christian Ambach
877fe25a01 s4:echo_server fix compiler warnings
about set but unused variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-12 14:21:28 -08:00
Christian Ambach
9c2951a9ca s4:dsdb fix compiler warnings
about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-12 14:21:28 -08:00
Christian Ambach
cad07c7676 s4:dsdb fix compiler warnings
about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-12 14:21:28 -08:00
Christian Ambach
2bd15d1b83 s4:dsdb fix compiler warnings
about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-12 14:21:28 -08:00
Christian Ambach
fbc2dfddf4 s4:dsdb fix compiler warnings
about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-12 14:21:28 -08:00
Christian Ambach
f9e5cdfa3f s4:dsdb fix compiler warnings
about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-12 14:21:28 -08:00
Christian Ambach
e5cb10f591 s4:dsdb fix compiler warnings
about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-12 14:21:28 -08:00
Jeremy Allison
0dc6181894 CVE-2013-4408:s3:Ensure LookupNames replies arrays are range checked.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
2013-12-09 07:05:46 +01:00
Jeremy Allison
b0ba4a5621 CVE-2013-4408:s3:Ensure LookupSids replies arrays are range checked.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
2013-12-09 07:05:46 +01:00
Stefan Metzmacher
127de4f4ac CVE-2013-4408:s4:dcerpc_sock: check for invalid frag_len within sock_complete_packet()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-09 07:05:45 +01:00
Stefan Metzmacher
77c3518152 CVE-2013-4408:s4:dcerpc_smb2: check for invalid frag_len in send_read_request_continue()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-09 07:05:45 +01:00
Stefan Metzmacher
3be7907fd9 CVE-2013-4408:s4:dcerpc_smb: check for invalid frag_len in send_read_request_continue()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-09 07:05:45 +01:00
Stefan Metzmacher
db5fff3bc9 CVE-2013-4408:s4:dcerpc: check for invalid frag_len in ncacn_pull()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-09 07:05:45 +01:00
Michael Adam
5173322007 s4:torture:smb2: add new durable-v2-open.reopen1a test
- open session1 on tcp connection conn1
- open a durable handle on a session1
- do a session reconnect on a new tcp connection conn2
- doing a durable reconnect on session1 gives
  USER_SESSION_DELETED
- doing a durable reconnect on session2 succeeds

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Dec  6 15:59:15 CET 2013 on sn-devel-104
2013-12-06 15:59:15 +01:00
Michael Adam
a46059d534 s4:torture:smb2: add new durable-open.reopen1a test
- open session1 on tcp connection conn1
- open a durable handle on a session1
- do a session reconnect on a new tcp connection conn2
- doing a durable reconnect on session1 gives
  USER_SESSION_DELETED
- doing a durable reconnect on session2 succeeds

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-12-06 14:01:34 +01:00
Garming Sam
df9df74195 cldap: quieten error when abandon packet is sent
The specification indicates that no response needs to be sent when receiving
an abandon request packet.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Dec  6 07:13:29 CET 2013 on sn-devel-104
2013-12-06 07:13:29 +01:00
Andreas Schneider
4f06c681b9 s4-torture: Use talloc for asprintf.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-06 01:14:09 +01:00
Andreas Schneider
b871c3907a s4-torture: Fix out of bound array access.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-06 01:14:09 +01:00
Andreas Schneider
34f498525c s3-torture: Comment out dead code in spoolss test.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-06 01:14:09 +01:00
Andreas Schneider
3b3b52c013 s4-torture: Fix some compile warnings in spoolss.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-06 01:14:09 +01:00
Andreas Schneider
09cc58c1a7 s4-torture: Make sure handles are correctly initialized.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-06 01:14:09 +01:00
Andreas Schneider
ef2cd51586 s4-torture: Make sure the handles are initialized correctly.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-06 01:14:09 +01:00
Andreas Schneider
13e33ab98e s4-torture: Make sure the handles are not used uninitialized.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-06 01:14:09 +01:00
Andreas Schneider
9d53d9f7e5 s4-libcli: Add smb2_util_handle_empty().
Will be used in the next commit.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-06 01:14:09 +01:00
David Disseldorp
5be0995d98 torture: match Windows responses to bad shadow copy IDs
test_fsrvp_bad_id() issues DeleteShareMapping requests with invalid
shadow copy IDs, expect Windows Server 2012 return codes.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-06 01:14:09 +01:00
David Disseldorp
dbb6f07728 torture: test duplicate shares in FSRVP shadow-copy set
MS-FSRVP 3.1.4.4 documents the requirement for failure when duplicate
volume names are encountered on AddToShadowCopySet.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-06 01:14:09 +01:00
Jeremy Allison
48f426b22d smbtorture: New torture test for bug #9870.
Not fetching the latest modification time on a folder if we have read locks on it.

Prove we should just rely on the mtime value from the underlying
filesystem, even with an open handle.

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

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

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Dec  5 10:05:06 CET 2013 on sn-devel-104
2013-12-05 10:05:06 +01:00
David Disseldorp
549b70eb43 torture: enum snapshots after FSRVP creation
Issue an SMB2 ENUM_SNAPSHOTS ioctl following FSRVP snapshot creation to
cover Explorer previous file version use-cases.

This test will fail against Windows Server 2012, as FSRVP created
snapshots are not exposed via the ENUM_SNAPSHOTS ioctl.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-05 00:48:33 +01:00
Amitay Isaacs
bdb818d9b4 s4-rpc: dnsserver: Ignore duplicate dns zones from multiple locations
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Kai Blin <kai@samba.org>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Sat Nov 30 06:15:52 CET 2013 on sn-devel-104
2013-11-30 06:15:51 +01:00
Amitay Isaacs
97dd673157 s4-dns: Ignore duplicate dns zones from multiple locations in dlz_bind9
BIND DLZ module currently loads DNS zones from DNS partitions and domain
partitions using following prefixes:

   CN=MicrosoftDNS,DC=DomainDnsZones
   CN=MicrosoftDNS,DC=ForestDNSZones
   CN=MicrosoftDNS,CN=System

Windows supports DNS zones duplicated in DNS partitions and domain
partition and updates both of them simultaneously.

BIND DLZ module can handle DNS zones stored either in DNS partitions
or domain partition, but not both.  This patch ignores duplicate zones
from domain partition and allows BIND9 to work with AD with duplicate
DNS zones.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Kai Blin <kai@samba.org>
2013-11-30 14:22:57 +11:00
Jelmer Vernooij
92489bfed4 Cope with first element in hdb_method having a different name in different heimdal versions.
It's called `interface_version` in older Heimdal versions and
`version` in newer versions.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Nov 28 04:17:55 CET 2013 on sn-devel-104
2013-11-28 04:17:55 +01:00
Jelmer Vernooij
a0eac12d5a Use heim_octet_string typedef.
The struct version is not provided by newer versions of heimdal.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-11-28 02:25:55 +01:00
Jelmer Vernooij
ac27e88502 Remove no longer used et_deps.pl.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-11-28 02:25:55 +01:00
Jelmer Vernooij
09e6a5e156 Remove no longer used asn1_deps.pl.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-11-28 02:25:55 +01:00
David Disseldorp
cb353a34dd torture: test get/set compression ioctl permissions
Windows Server 2012[r2] exhibits some strange behaviour with regard
to handling the compression fsctls.
[READ/WRITE]_ATTR permissions are not required for the corresponding
get/set compression ioctls. WRITE_DATA is required for set compression.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Nov 22 19:57:48 CET 2013 on sn-devel-104
2013-11-22 19:57:48 +01:00
David Disseldorp
aa197c18c4 torture: split open from test_setup_create_fill
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-22 08:56:45 -08:00
David Disseldorp
2b435ad4b4 torture: attempt to set compression via SetInfo
Doing so should give a successful SetInfo response, however the
attribute should not be set in subsequent GetInfo / ioctl responses.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-22 08:56:45 -08:00
David Disseldorp
7dd05f55a8 torture: test dir non-inherit in compress_inherit_disable
Also add a note reguarding Windows 2008GM copy-chunk note:
Windows 2008GM (non-R2) fails the copy-chunk src=dest overlap test, as
it appears to use a different chunk copy algorithm to 208R2.
Takeaway advice is to avoid using copy-chunk when the source and
destination ranges overlap in the same file.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-22 08:56:45 -08:00
Andrew Bartlett
e665fc3940 lib/param: Consolidate code to enable smb signing on the server, always enable on AD DC
This uses the code from the source4/ SMB server (the NTVFS smb server)
in common, to force SMB Signing to be on when we are an AD DC.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Nov 22 13:13:05 CET 2013 on sn-devel-104
2013-11-22 13:13:03 +01:00
Arvid Requate
addabf1513 torture: test printing using "XPS_PASS" datatype
The "XPS_PASS" datatype is used by Windows 8.

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

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

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Nov 21 15:01:30 CET 2013 on sn-devel-104
2013-11-21 15:01:30 +01:00
Günther Deschner
6a0b75f901 docs: remove duplicate mention of "smbtorture" in smbtorture manpage.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-19 09:52:39 +01:00
Günther Deschner
e320d57ed6 docs: remove duplicate arguments listing in regdiff manpage.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-19 09:52:39 +01:00
Volker Lendecke
0d5f217cfe heimdal: Fix CID 745516 Use after free
If the loop is exited normally, i.e. we did not find anything proper
within DH_NUM_TRIES, we try to BN_free a second time.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Thu Nov 14 19:17:06 CET 2013 on sn-devel-104
2013-11-14 19:17:06 +01:00
Michael Adam
1c9c2e3b65 s4:rpc-server: fix lsa_lookupsids return value for the domain sid
We currently return type UNKNOWN and copy the domain sid to the name.
Instead we should return type DOMAIN and return NULL as name.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Nov 13 13:34:16 CET 2013 on sn-devel-104
2013-11-13 13:34:16 +01:00
Michael Adam
29d8edfe43 s4:rpc-server: fix use after free in dcesrv_lsa_lookup_sid()
Authority name may be accessed after
state has gone away and take domain_name with it.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-13 11:40:28 +01:00
Volker Lendecke
55b3d87036 heimdal: Fix CID 240779 Allocation size mismatch
The error Coverity complains about is in the malloc. krb5_enctypes is
an enum, so it is usually smaller than the size of a pointer. So we
overallocate, but in the memcpy further down we copy from potentially
invalid memory.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Nov 13 11:05:44 CET 2013 on sn-devel-104
2013-11-13 11:05:44 +01:00
Volker Lendecke
91b04f708f tls: Fix CID 242014 Uninitialized scalar variable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-13 09:01:55 +01:00
Volker Lendecke
2be1eeab7f tls: Fix some noblank line endings
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-13 09:01:55 +01:00
Volker Lendecke
2e6862e9c5 heimdal: Fix CID 241943 Uninitialized pointer read
In the error case without EXTRA_ADDRESSES we access ignore_addresses
without initialization

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-13 09:01:55 +01:00
Andreas Schneider
744abc8822 s4-dsdb: Fix a use after free segfault.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Nov 12 19:22:28 CET 2013 on sn-devel-104
2013-11-12 19:22:28 +01:00
Andreas Schneider
4cf8f10500 s4-torture: Relax time checking in CHECK_NTTIME.
NTTIME has a nanosecond resolution. We should be tolerate if the system
is busy writing and reading the value. To reproduce this problem just
run the test under valgrind.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-11-12 17:33:12 +01:00
Benjamin Franzke
0dd512eead s4:torture/netlogon: Test netlogon with additional attrs
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>

se enter the commit message for your changes. Lines starting

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Nov 12 00:57:19 CET 2013 on sn-devel-104
2013-11-12 00:57:19 +01:00
Benjamin Franzke
767bd6a4d4 s4:torture/ldap: Add test for netlogon over tcp
This patch moves the udp netlogon tests from cldap.c
to netlogon.c and passes a generic netlogon-send
function as parameter.

Therefore a tcp replacement for cldap_netlogon is also added.
The two variants tcp and udp are added as 2 new torture tests:

ldap.netlogon-udp & ldap.netlogon-tcp
Both tests succeed.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:55 +01:00
Benjamin Franzke
68ebb09193 s4:dsdb: Move cldap netlogon functions into samdb/ldb_modules
As netlogon is handled by the samdb now,
the corresponding functions should live there as well.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:54 +01:00
Benjamin Franzke
7106dcf2b8 s4:cldap_server: Do not handle netlogon ourself anymore
Netlogon is now handled by the ldb rootdse module.

The netlogon files will be moved to dsdb in the next commit.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:54 +01:00
Benjamin Franzke
0620c79d76 s4:dsdb/rootdse: Support netlogon request
This patch adds support for a netlogon ldap style request
over the tcp socket.  This is available since win2k3+ [1].

The automatic client join & configuration daemon "realmd" makes
use of this ability.
Realmd can now be used to join a computer to a samba 4 domain.
(See also:
https://lists.samba.org/archive/samba-technical/2013-October/095606.html)

Tested with:
ldapsearch -h samba-srv -x -b '' -s base "(&(NtVer=\06\00\00\00)(AAC=\00\00\00\00))" NetLogon

And compared the result in wireshark with cldap request issued by
examples/misc/cldap.pl.

[1]: http://wiki.wireshark.org/MS-CLDAP?action=recall&rev=8

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:54 +01:00
Benjamin Franzke
7a5a62547b s4:dsdb/rootdse: Pass rootdse context to rootdse_add_dynamic
This replaced the *module parameter, and uses ac->module in the function
instead, same for *req and *attrs.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:54 +01:00
Benjamin Franzke
3721274168 s4:cldap_server: Move netlogon parsing into utility function
To be used later by netlogon-request over ldap.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:54 +01:00
Benjamin Franzke
32ee231da5 s4:torture/cldap: Fix a typo
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:54 +01:00
Volker Lendecke
490418d636 gpo: Fix CID 1034880 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>

Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Mon Nov 11 22:59:10 CET 2013 on sn-devel-104
2013-11-11 22:59:10 +01:00
Volker Lendecke
4d97b5dcca gpo: Fix CID 1034881 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:09 +01:00
Volker Lendecke
b7420e44b1 ntvfs: Fix CID 1034883 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:09 +01:00
Volker Lendecke
144428058a backupkey: Fix CID 1034885 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:09 +01:00
Volker Lendecke
df8dff7dd2 samdb: Fix CID 241968 Uninitialized pointer read
Interestingly gcc does not catch this at all.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:09 +01:00
Volker Lendecke
c6ca14a78b heimdal: Fix 241482 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:09 +01:00
Volker Lendecke
55b0a16e9b registry: Fix Coverity ID 1034918 Wrong sizeof argument
sizeof(data_val) is the size of the pointer. This might well be 8 bytes
where the string is only 4 bytes long

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:08 +01:00
Volker Lendecke
ba370ae630 registry: Fix Coverity ID 1034917 Wrong sizeof argument
sizeof(data_val) is the size of the pointer. This might well be 8 bytes
where the string is only 4 bytes long

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:08 +01:00
Volker Lendecke
4e80a30daa registry: Fix Coverity ID 1034916 Wrong sizeof argument
sizeof(data_val) is the size of the pointer. This might well be 8 bytes
where the string is only 4 bytes long

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:08 +01:00
Volker Lendecke
0c8d5df5ca dsdb: Fix Coverity ID 1034907 Dereference before null check
"module" has already been dereferenced by ldb_module_get_private(module)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:08 +01:00
Volker Lendecke
096358f4e1 oLschema2ldif: Add some NULL checks
This should fix Coverity ID 1034812

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:08 +01:00
Michael Adam
97bbd631d8 s4:torture:smb2: add new lease.upgrade3 test to test the contended upgrade
Test what upgrades work when there is another lease already held,
in addition to the lease to be upgraded.

 The summary of the behaviour is this:
 -------------------------------------

 If we have two leases (lease1 and lease2) on the same file,
 then attempt to upgrade lease1 results in a change if and only
 if the requested lease state:
 - is valid,
 - is strictly a superset of lease1, and
 - can held together with lease2.

 In that case, the resuling lease state of the upgraded lease1
 is the state requested in the upgrade. lease2 is not broken
 and remains unchanged.

 Note that this contrasts the case of directly opening with
 an initial requested lease state, in which case you get that
 portion of the requested state that can be shared with the
 already existing leases (or the states that they get broken to).

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Mon Nov 11 18:04:47 CET 2013 on sn-devel-104
2013-11-11 18:04:47 +01:00
Michael Adam
363c4ade52 s4:torture:smb2: add comment explaining lease upgrade in the non-contended case
The summary of the behaviour is this:
-------------------------------------
An uncontended lease upgrade results in a change
if and only if the requested lease state is
- valid, and
- strictly a superset of the lease state already held.

In that case the resulting lease state is the one
requested in the upgrade.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-11-11 16:09:38 +01:00
Björn Baumbach
22af043d2f CVE-2013-4476: s4:libtls: check for safe permissions of tls private key file (key.pem)
If the tls key is not owned by root or has not mode 0600 samba will not
start up.

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Björn Baumbach <bb@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Mon Nov 11 13:07:16 CET 2013 on sn-devel-104
2013-11-11 13:07:16 +01:00
Björn Baumbach
e0248cde8d CVE-2013-4476: s4:libtls: Create tls private key file (key.pem) with mode 0600
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-11-11 11:14:36 +01:00
Andreas Schneider
12a2230581 s4-smb_server: Fix a use after free.
If we haven't allocated the smbsrv_session then we should not free it.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-08 09:45:10 -08:00
Andreas Schneider
27ca838c08 s4-lsa: Make sure we also duplicate the domain_name.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Nov  7 18:58:44 CET 2013 on sn-devel-104
2013-11-07 18:58:44 +01:00
Andreas Schneider
8ef055bad5 s4-lsa: Add missing null checks in dcesrv_lsa_lookup_name().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-11-07 17:02:55 +01:00
Andreas Schneider
0aa73958f0 s4-lsa: Fix a user after free in dcesrv_lsa_lookup_name().
Pair-Programmed-With: Volker Lendecke <vl@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-11-07 16:02:33 +01:00
Jeremy Allison
65882152cc Add regression test for bug #10229 - No access check verification on stream files.
Checks against a file with attribute READONLY, and
a security descriptor denying WRITE_DATA access.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Nov  4 23:10:10 CET 2013 on sn-devel-104
2013-11-04 23:10:10 +01:00
Volker Lendecke
4061954990 torture: Add smb2.rename.rename_dir_bench
This is a little benchmark test excercising parallel directory renames. With
lots of open files directory renames get pretty slow against some SMB server
implementations.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-04 12:06:05 -08:00
Nadezhda Ivanova
8a50509021 s4-dsdb: instanceType NC_HEAD is only allowed combined with WRITE for an originating add operation
As described in MS-ATDS 3.1.1.5.2.8.

Signed-off-by: Nadezhda Ivanova <nivanova@symas.com>
Reviewed-by:   Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date(master): Sun Nov  3 16:17:30 CET 2013 on sn-devel-104
2013-11-03 16:17:30 +01:00
Matthieu Patou
9c1c3bb4ec auth-kerberos: add the credentials.h so that enum credentials_obtained is defined
We had a warning about the enum being defined in the parameter list:
warning: ‘enum credentials_obtained’ declared inside parameter list

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>

Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Sun Oct 27 02:25:47 CET 2013 on sn-devel-104
2013-10-27 02:25:46 +01:00
David Disseldorp
68427f1e97 torture: add FSCTL_SRV_COPYCHUNK_WRITE access test
Check that FSCTL_SRV_COPYCHUNK_WRITE succeeds when the copy-chunk target
is opened with SEC_RIGHTS_FILE_WRITE only.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Oct 25 22:48:59 CEST 2013 on sn-devel-104
2013-10-25 22:48:59 +02:00
Nadezhda Ivanova
daefca2a1a s4-dsacl: Fixed incorrect handling of privileges in sec_access_check_ds
Restore and backup privileges are not relevant to ldap
access checks, and the TakeOwnership privilege should
grant write_owner right

Signed-off-by: Nadezhda Ivanova <nivanova@symas.com>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-25 09:45:57 +13:00
Volker Lendecke
2d51424569 torture: Add smb2.oplock.levelII501 test
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Thu Oct 24 16:15:50 CEST 2013 on sn-devel-104
2013-10-24 16:15:50 +02:00
Volker Lendecke
cdd232cc06 torture: Extend the raw.oplock.level_ii_1 test
smbd broke to none twice. Make sure this won't happen again :-)

This used to happen before the MSG_SMB_BREAK_RESPONSE merge. In
process_oplock_break_message we did not call remove_oplock, which would
have prevented this.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Oct 23 14:06:13 CEST 2013 on sn-devel-104
2013-10-23 14:06:12 +02:00
Volker Lendecke
64e734019f torture: Add a test showing we have to break L2 at open time
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-23 11:59:58 +02:00
Volker Lendecke
9d3e3a736c torture: Add oplock break to l2/none tests
The level we have to break to depends on the create disposition of the
second opener. If it's overwriting, break to none. If it's not, break
to level2.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-23 11:51:19 +02:00
Volker Lendecke
96faaf6c1e torture: Check break level in raw.oplock.exclusive5
This is what Windows does in this case, we don't survive that. We break
to LEVEL2 here. Fixes and more precise test to follow.

We don't survive this anymore. Re-enable later.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-23 11:49:05 +02:00
Volker Lendecke
7b51e9f8d3 torture: Add reproducer for bug 10216
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-23 11:45:55 +02:00
Volker Lendecke
e8a77df79e ntvfs: Fix CID 1107225 Resource leak
After the talloc_strdup, we don't need cwd anymore.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-21 16:34:35 -07:00
Volker Lendecke
ee78af33fe ntvfs: Fix Coverity ID 1107224 Resource leak
In this error path we were leaking "fd".

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-21 16:34:19 -07:00
Stefan Metzmacher
e6eb6b9e94 libcli/smb: move Filesystem Attributes defines to smb_constants.h
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17 16:08:29 +02:00
Stefan Metzmacher
a62927ef88 s4:librpc: let dcerpc_schannel_key_recv() return netlogon_creds_CredentialState
cli_credentials_set_netlogon_creds() should only be used directly before
a DCERPC bind in order to pass the session information to the
gensec layer.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:49:00 +13:00
Stefan Metzmacher
300a186a71 s4:librpc: make dcerpc_schannel_key_send/recv static
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:49:00 +13:00
Stefan Metzmacher
d610339028 s4:librpc/rpc: remove unused dcerpc_smb_tree()
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:55 +13:00
Stefan Metzmacher
e9998d1668 s4:librpc/rpc: make use of dcerpc_secondary_smb_send/recv() in dcerpc_secondary_context()
This avoids the use of dcerpc_smb_tree(), which is a layer violation.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:54 +13:00
Stefan Metzmacher
07ec60ce72 s4:librpc/rpc: add dcerpc_secondary_smb_send/recv()
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:54 +13:00
Stefan Metzmacher
ecb3150587 s4:librpc/rpc: remove unused dcerpc_smb_fnum()
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:53 +13:00
Stefan Metzmacher
3b53566ebb s4:tortore:raw/qfileinfo: don't use dcerpc_pipe_open_smb() to open a named pipe
We can directly use smb_raw_open() to open a handle to a named pipe.
This avoids the need for the layer violation functions
dcerpc_smb_tree() and dcerpc_smb_fnum().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:47 +13:00
Stefan Metzmacher
a3074521d4 s4:torture/samba3rpc: let rpc.authcontext be more robust against low level changes (part2)
We now use smbXcli_conn_is_connected() and
dcerpc_binding_handle_is_connected() to verify only the dcerpc layer
got an error. The expected error is EIO mapped to NT_STATUS_IO_DEVICE_ERROR.

NT_STATUS_INVALID_HANDLE should only be visible at the SMB layer,
but we keep this as allowed return value for now, until
the dcerpc layer is fixed.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:46 +13:00
Stefan Metzmacher
9d6b6dcd96 s4:torture/samba3rpc: let rpc.authcontext be more robust against low level code changes (part1)
Some code uses the low level smbXcli_session structure instead of
the smbcli_session structure and doesn't 'see' updates to the
smbcli_session structure.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:46 +13:00
Stefan Metzmacher
d052528974 s4:librpc: implement dcerpc_binding_handle_auth_info()
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:44 +13:00
Michael Adam
f50b6da7d5 s4:torture: add smb2.session.reauth6 : test failing reauth
This attempts reauth with invalid creds, hence
triggering the error path in the reauth code.
This invalidates the session and subsequente requests
on that connection fail.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct 15 22:50:27 CEST 2013 on sn-devel-104
2013-10-15 22:50:27 +02:00
Volker Lendecke
c92ac4c8ee torture: Extend raw.oplock.batch10
With FAKE_LEVEL_II_OPLOCKS around we did not grant LEVEL2 after
a NO_OPLOCK file got written to. Windows does grant LEVEL2 in this
case. With the have_level2_oplocks in brlocks.tdb we can now grant LEVEL2
in this case as well.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-15 01:52:29 +02:00
Volker Lendecke
13495c7eb3 auth4: Remove an unused variable
Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-15 10:58:23 +13:00
Nadezhda Ivanova
13a10d4314 s4-samldb: Do not allow deletion of objects with RID < 1000
According to [MS-SAMR] 3.1.5.7 Delete Pattern we should not allow deletion
of security objects with RID < 1000. This patch will prevent deletion of
well-known accounts and groups.

Signed-off-by: Nadezhda Ivanova <nivanova@symas.com>
Reviewed-by:   Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date(master): Mon Oct 14 13:31:50 CEST 2013 on sn-devel-104
2013-10-14 13:31:50 +02:00
Volker Lendecke
064433f265 libcli4: Remove an unused variable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Oct 13 17:58:23 CEST 2013 on sn-devel-104
2013-10-13 17:58:23 +02:00
Volker Lendecke
672c228310 torture: Extend the smb2.oplock.doc1 test
If delete_on_close is set, there is no oplock break. Check that.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-11 15:07:37 -07:00
Volker Lendecke
6fbbf94def torture: Extend the raw.oplock.doc1 test
If delete_on_close is set, there is no oplock break. Check that.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-11 15:07:34 -07:00
Andrew Bartlett
af3138e9b6 samba-tool domain join subdomain: Rework sambadns.py to allow setup of DomainDNSZone only
This skips handling the ForestDNSZone when we are setting up a subdomain.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Oct 11 10:27:49 CEST 2013 on sn-devel-104
2013-10-11 10:27:49 +02:00
Andrew Bartlett
48b979c4fe provision: Remove --username and --password options from samba-tool domain provision
This avoids confusion, because the LDAP backend does not use these,
and they do not set the password for the administrator account either!

This may break support for the 'existing' backend LDAP backend, but
that is nothing more than a stub for future development anyway, and
new work in this area should use EXTERNAL in any case.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-11 08:32:10 +02:00
Andrew Bartlett
6da2dcd17e dsdb: Provide a clearer error when we fail to store the sequence number in metadata.tdb
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-10 08:35:30 +02:00
Stefan Metzmacher
da7ef12b43 dsdb/tests/ldap: fix test_distinguished_name against w2k8r2
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-10 08:35:30 +02:00
Stefan Metzmacher
295b4de721 s4:dsdb/rootdse: report 'dnsHostName' instead of 'dNSHostName'
The attribute on the RootDSE object is called 'dnsHostName'
instead of 'dNSHostName' (which is used in the schema and on
all other directory objects).

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-10 08:35:22 +02:00
Stefan Metzmacher
ca173923a3 dsdb/tests/ldap: fix test_ldapServiceName against w2k8r2
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10193

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-10 08:35:10 +02:00
Volker Lendecke
3a72cdb33a torture: Remove an unused variable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-06 13:56:24 +02:00
Volker Lendecke
960bd9a584 torture: Continue buffer check after NOT_IMPLEMENTED infolevels
Patch from the SDC plugfest. Not every implementation supports every
infolevel, and we want to be able to test buffersize error behaviour
for all supported infolevels

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-06 13:56:15 +02:00
Volker Lendecke
b40fcf3f17 torture: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-06 13:54:58 +02:00
Michael Adam
7b624cf856 s4:torture:smb2: add durable-v2-open.reopen2c
- create durable with v1 request
- reconnect with v2 reconnect request
==> fails

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05 14:04:08 +02:00
Michael Adam
ba05f705a1 s4:torture:smb2: add durable-v2-open.reopen2b
- connect with durable v2
- reconnect with durable v1
=> succeeds

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05 14:04:08 +02:00
Michael Adam
0ecfe1755e s4:torture:smb2: add durable-v2-open.create-blob
test various combinations of durable create and reconnect
request blobs, according to
MS-SMB2, 3.3.5.9.12:
"Handling the SMB2_CREATE_DURABLE_HANDLE_RECONNECT_V2 Create Context"

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05 14:04:08 +02:00
Michael Adam
bd3b922a45 s4:torture:smb2: extend the durable-open.reopen2 test
Add tests for:
- filename and many other things don't matter in reconnect
- additionally specified DHnQ request blob is ignored.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05 14:04:08 +02:00
Michael Adam
6fc5661640 s4:torture:smb2: extend the durable-v2-open.reopen2 test
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05 14:04:08 +02:00
Michael Adam
d8cd54962b s4:torture:smb2: add a durable-open.reopen-lease-v2 test
like durable-open.reopen2-lease but with v2 lease requets

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05 14:04:08 +02:00
Michael Adam
43c4a65f91 s4:torture:smb2: add durable-v2-open.reopen2-lease-v2
lease v2 variant of the reopen2 test.
Test various success and failure cases.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05 14:04:08 +02:00
Michael Adam
5647287a42 s4:torture:smb2: add smb2_lease_v2_create() wrapper to smb2_lease_v2_create_share()
that sets share all. similar to smb2_lease_create()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05 14:04:08 +02:00
Michael Adam
d4f4d08d6c s4:torture:smb2: add durable-v2-open.reopen2-lease
lease v1 variant of the reopen2 test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05 14:04:08 +02:00
Michael Adam
1f14747094 s4:torture:smb2: add durable-open.reopen2-lease test
lease-variant of the reopen2 test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05 14:04:08 +02:00
Michael Adam
6c6643c364 s4:torture:smb2: fix durable-open lease tests to pass against windows.
Fix is: reconnect with same client-guid as on the first connection.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-05 14:04:07 +02:00
Michael Adam
a31ea15203 s4:torture:smb2: add smbcli_options argument to torture_smb2_connection_ext()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-05 14:04:07 +02:00
Michael Adam
596f802d5d s4:libcli:smb2: make smbcli_options argument to smb2_connect_(send|ext) const
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-05 14:04:07 +02:00
Michael Adam
5736f13400 s4:libcli:smb2: add the smb2_capabilities to the smbcli_options
and initialize them in lpcfg_smbcli_options() instead of
in smb2_transport_init() as previously.

This will allow us to control them from callers later.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-05 14:04:07 +02:00
Michael Adam
4e99a0fbfe s4:libcli:smb2: add the client_guid to the smbcli_options
and initialize it in lpcfg_smbcli_options() instead of
in smb2_transport_init() as previously.

Having the client guid in the smbcli_options will allow
us to control them from callers later.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-05 14:04:07 +02:00
Michael Adam
39a965ac83 s4:torture:spoolss: use smb2_connect() instead of smb2_connet_ext()
in print_test_smbd: we don't need to pass the previous_session_id.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05 14:04:07 +02:00
Michael Adam
14e3f4bd3b s4:torture:smb2: fix a comment in the durable-open.lock-oplock test
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-05 14:04:07 +02:00
Brian Martin
8fe1f405e9 samba_backup: fix bug, add command line parameter, improve error messages
Also remove .bak suffix from tdb/ldb backups for more consistent restore procedures

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Oct  5 13:51:34 CEST 2013 on sn-devel-104
2013-10-05 13:51:34 +02:00
Andrew Bartlett
89200c227f dsdb: Convert the full string from UTF16 to UTF8, including embedded NULLs
Bug: https://bugzilla.samba.org/show_bug.cgi?id=8077
Note that this doesn't fix the userParameters problem
completely, but it doesn't truncate the userParameters value
anymore.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Sep 26 22:05:12 CEST 2013 on sn-devel-104
2013-09-26 22:05:12 +02:00
Nadezhda Ivanova
fc486d861c s4-openldap: Restored openldap-related options to the provision script
At the moment they are only available if TEST_LDAP=yes to avoid accidental use
as the openldap backend is still failing some tests

Signed-off-by: Nadezhda Ivanova <nivanova@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date(master): Thu Sep 26 07:31:05 CEST 2013 on sn-devel-104
2013-09-26 07:31:05 +02:00
Andrew Bartlett
d787f7af49 pydsdb: Raise a more useful exception when dsdb_wellknown_dn fails.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-09-24 07:44:29 +02:00
Andrew Bartlett
51101b310a pydsdb: Give KeyError when we fail a schema lookup in python
This allows sensible exception handling.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-09-24 07:44:29 +02:00