metze/samba/wip.git
10 years agos3:rpcclient: try to use NETLOGON_NEG_SUPPORTS_AES
Stefan Metzmacher [Sat, 15 Jun 2013 07:41:52 +0000 (09:41 +0200)]
s3:rpcclient: try to use NETLOGON_NEG_SUPPORTS_AES

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:rpc_client: try to use NETLOGON_NEG_SUPPORTS_AES
Stefan Metzmacher [Sat, 15 Jun 2013 07:41:52 +0000 (09:41 +0200)]
s3:rpc_client: try to use NETLOGON_NEG_SUPPORTS_AES

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:libnet_join: try to use NETLOGON_NEG_SUPPORTS_AES
Stefan Metzmacher [Sat, 15 Jun 2013 07:41:52 +0000 (09:41 +0200)]
s3:libnet_join: try to use NETLOGON_NEG_SUPPORTS_AES

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:auth_domain: try to use NETLOGON_NEG_SUPPORTS_AES
Stefan Metzmacher [Sat, 15 Jun 2013 07:41:52 +0000 (09:41 +0200)]
s3:auth_domain: try to use NETLOGON_NEG_SUPPORTS_AES

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:libsmb: remove unused cli_state->is_guestlogin
Stefan Metzmacher [Mon, 5 Aug 2013 18:26:54 +0000 (20:26 +0200)]
s3:libsmb: remove unused cli_state->is_guestlogin

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agotorture: add smb2 FSCTL_[GET/SET]_COMPRESSION test
David Disseldorp [Wed, 7 Aug 2013 15:16:12 +0000 (17:16 +0200)]
torture: add smb2 FSCTL_[GET/SET]_COMPRESSION test

This test simply creates a file and checks the compression state before
and after FSCTL_SET_COMPRESSION(COMPRESSION_FORMAT_DEFAULT).

The test expects the compression state to be COMPRESSION_FORMAT_LZNT1
after set, conforming to Windows Server behaviour.

If the server responds to the first FSCTL_GET_COMPRESSION request with
NT_STATUS_NOT_SUPPORTED or NT_STATUS_INVALID_DEVICE_REQUEST, then the
test is skipped. This allows it to run during selftest.

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 Aug  9 22:03:39 CEST 2013 on sn-devel-104

10 years agolib: add FSCTL_[GET/SET]_COMPRESSION constants
David Disseldorp [Wed, 7 Aug 2013 15:16:11 +0000 (17:16 +0200)]
lib: add FSCTL_[GET/SET]_COMPRESSION constants

Values taken from MS-FSCC.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotorture: split out ioctl test file creation helper
David Disseldorp [Wed, 7 Aug 2013 15:16:10 +0000 (17:16 +0200)]
torture: split out ioctl test file creation helper

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoVFS plugin was sending the actual size of the volume instead of the total number...
Susant Kumar Palai [Tue, 6 Aug 2013 21:45:06 +0000 (14:45 -0700)]
VFS plugin was sending the actual size of the volume instead of the total number of block units because of which windows was getting the wrong volume capacity.

Signed-off-by: Susant Kumar Palai <spalai@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Christopher R. Hertel <crh@samba.org>
10 years agodoc: Fix prefix parameter name in vfs_full_audit man page
Christof Schmitt [Wed, 7 Aug 2013 17:59:08 +0000 (10:59 -0700)]
doc: Fix prefix parameter name in vfs_full_audit man page

Commit 2314f47 fixed two other instances, but forgot to change the last
one.

Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Aug  9 16:53:28 CEST 2013 on sn-devel-104

10 years agodocs: Add basic man page for vfs_syncops.
Karolin Seeger [Fri, 9 Aug 2013 08:57:51 +0000 (10:57 +0200)]
docs: Add basic man page for vfs_syncops.

Fix bug #7364 - man vfs_syncops missing.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Aug  9 13:19:12 CEST 2013 on sn-devel-104

10 years agodrs-cracknames: Add some debugs in the torture to know better which test has failed
Matthieu Patou [Tue, 30 Jul 2013 23:09:00 +0000 (16:09 -0700)]
drs-cracknames: Add some debugs in the torture to know better which test has failed

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-By: Andrew Bartlett <abarlett@samba.org>
Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Wed Aug  7 08:10:58 CEST 2013 on sn-devel-104

10 years agoRemove the knownfail flag on cracknames as it didn't fail anymore
Matthieu Patou [Mon, 1 Jul 2013 03:45:28 +0000 (20:45 -0700)]
Remove the knownfail flag on cracknames as it didn't fail anymore

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abarlett@samba.org>
10 years agodrs-cracksname: fix problems that prevented to pass our torture tests
Matthieu Patou [Mon, 1 Jul 2013 03:44:22 +0000 (20:44 -0700)]
drs-cracksname: fix problems that prevented to pass our torture tests

Some of the problems where also reported by Microsoft testing tools

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abarlett@samba.org>
10 years agodrs-crackname: Fix error code so that we have the same as windows
Matthieu Patou [Sun, 30 Jun 2013 09:04:20 +0000 (02:04 -0700)]
drs-crackname: Fix error code so that we have the same as windows

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abarlett@samba.org>
10 years agodrs-cracknames: When cracking NT4 names we should just look at netbios for the match
Matthieu Patou [Sun, 30 Jun 2013 09:03:02 +0000 (02:03 -0700)]
drs-cracknames: When cracking NT4 names we should just look at netbios for the match

Looking at dnsRoot will yield a result for domain.tld\username when it
shouldn't work.

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abarlett@samba.org>
10 years agodrs-crackname: Fix cracknames for the format UNKNOWN when the data is actually a...
Matthieu Patou [Sat, 29 Jun 2013 23:02:32 +0000 (16:02 -0700)]
drs-crackname: Fix cracknames for the format UNKNOWN when the data is actually a GUID

The cannonical crackname expect a "/" or it returns
DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR, when doing UNKNOWN format it's not
an error to not have a "/" in the name to crack it's just a sign the
name is not a cannonical one.

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abarlett@samba.org>
10 years agodrs-cracknames: Reorganise the cracknames list so that similar format names are group...
Matthieu Patou [Fri, 28 Jun 2013 08:11:46 +0000 (01:11 -0700)]
drs-cracknames: Reorganise the cracknames list so that similar format names are group together

It makes easier when reviewing failed test case in DRSR testsuite

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abarlett@samba.org>
10 years agoAdd Notes related to DRSUAPI
Matthieu Patou [Fri, 28 Jun 2013 06:58:41 +0000 (23:58 -0700)]
Add Notes related to DRSUAPI

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abarlett@samba.org>
10 years agos4-netlogon: honnor DS_RETURN_DNS_NAME flag
Matthieu Patou [Tue, 27 Sep 2011 18:06:03 +0000 (14:06 -0400)]
s4-netlogon: honnor DS_RETURN_DNS_NAME flag

Reviewed-By: Andrew Bartlett <abarlett@samba.org>
10 years agos4-netlogon: do not add \\ it has already be done in the fill_netlogon_samlogon_response
Matthieu Patou [Mon, 26 Sep 2011 22:54:04 +0000 (18:54 -0400)]
s4-netlogon: do not add \\ it has already be done in the fill_netlogon_samlogon_response

Reviewed-By: Andrew Bartlett <abarlett@samba.org>
10 years agotorture: Quiet a warning about set but not used variable
Matthieu Patou [Tue, 30 Jul 2013 23:07:56 +0000 (16:07 -0700)]
torture: Quiet a warning about set but not used variable

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-By: Andrew Bartlett <abarlett@samba.org>
10 years agotorture-drsuapi: Make the name of the dc variable
Matthieu Patou [Wed, 31 Jul 2013 04:45:59 +0000 (21:45 -0700)]
torture-drsuapi: Make the name of the dc variable

In case some tests fails or if the removal takes sometime to replicate
to all the DCs

Reviewed-By: Andrew Bartlett <abarlett@samba.org>
10 years agos3-netlogon: Connecting with the system token should be sufficient.
Andreas Schneider [Tue, 6 Aug 2013 09:10:04 +0000 (11:10 +0200)]
s3-netlogon: Connecting with the system token should be sufficient.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Aug  6 18:22:06 CEST 2013 on sn-devel-104

10 years agos3-rpc_server: Grant the system token full access.
Andreas Schneider [Wed, 31 Jul 2013 14:49:36 +0000 (16:49 +0200)]
s3-rpc_server: Grant the system token full access.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
10 years agolibcli: Add security_token_system_privilege().
Andreas Schneider [Tue, 6 Aug 2013 11:26:53 +0000 (13:26 +0200)]
libcli: Add security_token_system_privilege().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
10 years agoFSCTL_GET_SHADOW_COPY_DATA: Don't return 4 extra bytes at end
Christof Schmitt [Mon, 5 Aug 2013 18:21:59 +0000 (11:21 -0700)]
FSCTL_GET_SHADOW_COPY_DATA: Don't return 4 extra bytes at end

labels_data_count already accounts for the unicode null character at the
end of the array. There is no need in adding space for it again.

Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug  6 04:03:17 CEST 2013 on sn-devel-104

10 years agoFSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zero
Christof Schmitt [Mon, 5 Aug 2013 18:16:22 +0000 (11:16 -0700)]
FSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zero

Otherwise num_volumes and the end marker can return uninitialized data
to the client.

Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
10 years agos3:smbd: allow info class SMB_QUERY_FS_ATTRIBUTE_INFO to return partial data
Ralph Wuerthner [Wed, 10 Jul 2013 14:43:39 +0000 (16:43 +0200)]
s3:smbd: allow info class SMB_QUERY_FS_ATTRIBUTE_INFO to return partial data

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
10 years agos3:smbd: allow info class SMB_QUERY_FS_VOLUME_INFO to return partial data
Ralph Wuerthner [Wed, 10 Jul 2013 13:52:06 +0000 (15:52 +0200)]
s3:smbd: allow info class SMB_QUERY_FS_VOLUME_INFO to return partial data

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
10 years agos3:smbd: allow status code in smbd_do_qfsinfo() to be set by information class handler
Ralph Wuerthner [Fri, 5 Jul 2013 09:32:27 +0000 (11:32 +0200)]
s3:smbd: allow status code in smbd_do_qfsinfo() to be set by information class handler

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
10 years agos3:smbd: allow GetInfo responses with STATUS_BUFFER_OVERFLOW to return partial, but...
Ralph Wuerthner [Fri, 5 Jul 2013 09:03:16 +0000 (11:03 +0200)]
s3:smbd: allow GetInfo responses with STATUS_BUFFER_OVERFLOW to return partial, but valid data

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
10 years agos3:smbd: return NT_STATUS_INFO_LENGTH_MISMATCH for GetInfo in case output_buffer_leng...
Ralph Wuerthner [Wed, 10 Jul 2013 06:59:58 +0000 (08:59 +0200)]
s3:smbd: return NT_STATUS_INFO_LENGTH_MISMATCH for GetInfo in case output_buffer_length is too small

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
10 years agopyldb: decrement ref counters on py_results and quiet warnings
Matthieu Patou [Thu, 27 Dec 2012 05:36:50 +0000 (21:36 -0800)]
pyldb: decrement ref counters on py_results and quiet warnings

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Tue Aug  6 00:32:46 CEST 2013 on sn-devel-104

10 years agoFix bug #10010 - Missing integer wrap protection in EA list reading can cause server...
Jeremy Allison [Thu, 11 Jul 2013 16:36:01 +0000 (09:36 -0700)]
Fix bug #10010 - Missing integer wrap protection in EA list reading can cause server to loop with DOS.

Fix client-side parsing also. Found by David Disseldorp <ddiss@suse.de>

Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Mon Aug  5 14:39:04 CEST 2013 on sn-devel-104

10 years agoFix bug #10010 - Missing integer wrap protection in EA list reading can cause server...
Jeremy Allison [Thu, 11 Jul 2013 00:10:17 +0000 (17:10 -0700)]
Fix bug #10010 - Missing integer wrap protection in EA list reading can cause server to loop with DOS.

Ensure we never wrap whilst adding client provided input.

Signed-off-by: Jeremy Allison <jra@samba.org>
10 years agos3-libads: Print a message if no realm has been specified.
Andreas Schneider [Mon, 5 Aug 2013 07:25:11 +0000 (09:25 +0200)]
s3-libads: Print a message if no realm has been specified.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Aug  5 12:24:44 CEST 2013 on sn-devel-104

10 years agos3:rpc_client: rename same variables in cli_rpc_pipe_open_schannel_with_key()
Stefan Metzmacher [Thu, 25 Apr 2013 17:43:58 +0000 (19:43 +0200)]
s3:rpc_client: rename same variables in cli_rpc_pipe_open_schannel_with_key()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3:rpc_client: use the correct context for netlogon_creds_copy() in rpccli_schannel_b...
Stefan Metzmacher [Thu, 25 Apr 2013 16:29:31 +0000 (18:29 +0200)]
s3:rpc_client: use the correct context for netlogon_creds_copy() in rpccli_schannel_bind_data()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3:rpc_client: make rpccli_schannel_bind_data() static
Stefan Metzmacher [Thu, 25 Apr 2013 16:27:57 +0000 (18:27 +0200)]
s3:rpc_client: make rpccli_schannel_bind_data() static

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3:netlogon: make use of netlogon_creds_decrypt_samlogon_logon()
Stefan Metzmacher [Wed, 24 Apr 2013 14:00:44 +0000 (16:00 +0200)]
s3:netlogon: make use of netlogon_creds_decrypt_samlogon_logon()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos4:netlogon: make use of netlogon_creds_decrypt_samlogon_logon()
Stefan Metzmacher [Wed, 24 Apr 2013 14:00:18 +0000 (16:00 +0200)]
s4:netlogon: make use of netlogon_creds_decrypt_samlogon_logon()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibcli/auth: add netlogon_creds_shallow_copy_logon()
Stefan Metzmacher [Wed, 24 Apr 2013 10:53:27 +0000 (12:53 +0200)]
libcli/auth: add netlogon_creds_shallow_copy_logon()

This can be used before netlogon_creds_encrypt_samlogon_logon()
in order to keep the provided buffers unchanged.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibcli/auth: add netlogon_creds_[de|en]crypt_samlogon_logon()
Stefan Metzmacher [Thu, 25 Apr 2013 15:01:00 +0000 (17:01 +0200)]
libcli/auth: add netlogon_creds_[de|en]crypt_samlogon_logon()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibcli/auth: fix shadowed declaration in netlogon_creds_crypt_samlogon_validation()
Stefan Metzmacher [Fri, 14 Jun 2013 07:47:50 +0000 (09:47 +0200)]
libcli/auth: fix shadowed declaration in netlogon_creds_crypt_samlogon_validation()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibcli/auth: make netlogon_creds_crypt_samlogon_validation more robust
Stefan Metzmacher [Wed, 24 Apr 2013 10:36:04 +0000 (12:36 +0200)]
libcli/auth: make netlogon_creds_crypt_samlogon_validation more robust

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3:rpcclient: use talloc_stackframe() in do_cmd()
Stefan Metzmacher [Fri, 22 Mar 2013 14:07:10 +0000 (15:07 +0100)]
s3:rpcclient: use talloc_stackframe() in do_cmd()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos4:librpc: fix netlogon connections against servers without AES support
Stefan Metzmacher [Tue, 16 Jul 2013 08:07:30 +0000 (10:07 +0200)]
s4:librpc: fix netlogon connections against servers without AES support

LogonGetCapabilities() only works on the credential chain if
the server supports AES, so we need to work on a temporary copy
until we know the server replied a valid return authenticator.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-net: avoid confusing output in net_rpc_oldjoin() if NET_FLAGS_EXPECT_FALLBACK...
Stefan Metzmacher [Mon, 15 Jul 2013 11:28:34 +0000 (13:28 +0200)]
s3-net: avoid confusing output in net_rpc_oldjoin() if NET_FLAGS_EXPECT_FALLBACK is passed

"net rpc join" tries net_rpc_oldjoin() first and falls back to
net_rpc_join_newstyle(). We should not print the join failed
if just net_rpc_oldjoin() failed.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-net: use libnetjoin for "net rpc join" newstyle.
Günther Deschner [Tue, 3 Feb 2009 19:21:05 +0000 (20:21 +0100)]
s3-net: use libnetjoin for "net rpc join" newstyle.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-net: use libnetjoin for "net rpc testjoin".
Günther Deschner [Tue, 3 Feb 2009 19:10:05 +0000 (20:10 +0100)]
s3-net: use libnetjoin for "net rpc testjoin".

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3:libnet: let the caller truncate the pw in libnet_join_joindomain_rpc_unsecure()
Stefan Metzmacher [Thu, 13 Jun 2013 17:12:27 +0000 (19:12 +0200)]
s3:libnet: let the caller truncate the pw in libnet_join_joindomain_rpc_unsecure()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-libnetjoin: move "net rpc oldjoin" to use libnetjoin.
Günther Deschner [Thu, 6 Nov 2008 12:37:45 +0000 (13:37 +0100)]
s3-libnetjoin: move "net rpc oldjoin" to use libnetjoin.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-libnetjoin: add machine_name length check.
Günther Deschner [Thu, 6 Nov 2008 10:40:03 +0000 (11:40 +0100)]
s3-libnetjoin: add machine_name length check.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3: libnet_join: use admin_domain in libnetjoin.
Günther Deschner [Wed, 24 Sep 2008 09:05:37 +0000 (11:05 +0200)]
s3: libnet_join: use admin_domain in libnetjoin.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3: libnet_join: add admin_domain.
Günther Deschner [Wed, 24 Sep 2008 09:04:42 +0000 (11:04 +0200)]
s3: libnet_join: add admin_domain.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibcli/auth: also set secure channel type in netlogon_creds_client_init().
Günther Deschner [Wed, 19 Dec 2012 12:53:23 +0000 (13:53 +0100)]
libcli/auth: also set secure channel type in netlogon_creds_client_init().

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-rpc_cli: pass down ndr_interface_table to rpc_transport_np_init_send().
Günther Deschner [Fri, 24 May 2013 11:56:53 +0000 (13:56 +0200)]
s3-rpc_cli: pass down ndr_interface_table to rpc_transport_np_init_send().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-rpc_cli: pass down ndr_interface_table to rpc_transport_np_init().
Günther Deschner [Fri, 24 May 2013 11:52:05 +0000 (13:52 +0200)]
s3-rpc_cli: pass down ndr_interface_table to rpc_transport_np_init().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_tcp_port().
Günther Deschner [Fri, 24 May 2013 11:47:16 +0000 (13:47 +0200)]
s3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_tcp_port().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-rpc_cli: pass down ndr_interface_table to rpc_pipe_get_tcp_port().
Günther Deschner [Fri, 24 May 2013 11:46:07 +0000 (13:46 +0200)]
s3-rpc_cli: pass down ndr_interface_table to rpc_pipe_get_tcp_port().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_tcp().
Günther Deschner [Fri, 24 May 2013 11:44:00 +0000 (13:44 +0200)]
s3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_tcp().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_np().
Günther Deschner [Fri, 24 May 2013 11:40:45 +0000 (13:40 +0200)]
s3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_np().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open().
Günther Deschner [Fri, 24 May 2013 11:38:01 +0000 (13:38 +0200)]
s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth_transport().
Günther Deschner [Fri, 24 May 2013 11:33:03 +0000 (13:33 +0200)]
s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth_transport().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth().
Günther Deschner [Fri, 24 May 2013 11:29:28 +0000 (13:29 +0200)]
s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_schannel_with_key().
Günther Deschner [Fri, 24 May 2013 11:17:24 +0000 (13:17 +0200)]
s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_schannel_with_key().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_ntlmssp_auth_schannel().
Günther Deschner [Fri, 24 May 2013 11:08:33 +0000 (13:08 +0200)]
s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_ntlmssp_auth_schannel().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_schannel().
Günther Deschner [Fri, 24 May 2013 11:03:23 +0000 (13:03 +0200)]
s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_schannel().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_interface().
Günther Deschner [Fri, 17 May 2013 14:44:05 +0000 (16:44 +0200)]
s3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_interface().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_ncalrpc().
Günther Deschner [Fri, 17 May 2013 14:16:59 +0000 (16:16 +0200)]
s3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_ncalrpc().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-libnetapi: pass down ndr_interface_table to pipe_cm() and friends.
Günther Deschner [Fri, 17 May 2013 14:13:26 +0000 (16:13 +0200)]
s3-libnetapi: pass down ndr_interface_table to pipe_cm() and friends.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-libnetapi: pass down ndr_interface_table to libnetapi_open_pipe().
Günther Deschner [Fri, 17 May 2013 14:10:13 +0000 (16:10 +0200)]
s3-libnetapi: pass down ndr_interface_table to libnetapi_open_pipe().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-libnetapi: pass down ndr_interface_table to libnetapi_get_binding_handle().
Günther Deschner [Fri, 17 May 2013 14:08:16 +0000 (16:08 +0200)]
s3-libnetapi: pass down ndr_interface_table to libnetapi_get_binding_handle().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-rpc_cli: remove prototype of nonexisting cli_rpc_pipe_open_krb5().
Günther Deschner [Fri, 17 May 2013 14:24:42 +0000 (16:24 +0200)]
s3-rpc_cli: remove prototype of nonexisting cli_rpc_pipe_open_krb5().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-net: pass down ndr_interface_table to connect_dst_pipe().
Günther Deschner [Fri, 17 May 2013 14:02:59 +0000 (16:02 +0200)]
s3-net: pass down ndr_interface_table to connect_dst_pipe().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-libads: Fail create_local_private_krb5_conf_for_domain() if parameters missing.
Günther Deschner [Fri, 17 May 2013 13:14:35 +0000 (15:14 +0200)]
s3-libads: Fail create_local_private_krb5_conf_for_domain() if parameters missing.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoauth/credentials: use CRED_CALLBACK_RESULT after a callback
Stefan Metzmacher [Wed, 31 Jul 2013 12:32:36 +0000 (14:32 +0200)]
auth/credentials: use CRED_CALLBACK_RESULT after a callback

We only do this if it's still CRED_CALLBACK after the callback,
this allowes the callback to overwrite it.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Aug  5 09:36:05 CEST 2013 on sn-devel-104

10 years agoauth/credentials: simplify password_tries state
Stefan Metzmacher [Wed, 31 Jul 2013 12:25:54 +0000 (14:25 +0200)]
auth/credentials: simplify password_tries state

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoauth/credentials: get the old password from secrets.tdb
Stefan Metzmacher [Wed, 31 Jul 2013 11:39:17 +0000 (13:39 +0200)]
auth/credentials: get the old password from secrets.tdb

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoauth/credentials: keep cli_credentials private
Stefan Metzmacher [Wed, 31 Jul 2013 10:41:40 +0000 (12:41 +0200)]
auth/credentials: keep cli_credentials private

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:ntlm_auth: make use of cli_credentials_[set_]callback_data*
Stefan Metzmacher [Wed, 31 Jul 2013 11:24:21 +0000 (13:24 +0200)]
s4:ntlm_auth: make use of cli_credentials_[set_]callback_data*

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:torture/rpc: make use of cli_credentials_set_netlogon_creds()
Stefan Metzmacher [Wed, 31 Jul 2013 11:23:41 +0000 (13:23 +0200)]
s4:torture/rpc: make use of cli_credentials_set_netlogon_creds()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:torture/gentest: make use of cli_credentials_get_username()
Stefan Metzmacher [Wed, 31 Jul 2013 11:23:08 +0000 (13:23 +0200)]
s4:torture/gentest: make use of cli_credentials_get_username()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:torture/shell: simplify cli_credentials_set_password() call
Stefan Metzmacher [Wed, 31 Jul 2013 11:22:10 +0000 (13:22 +0200)]
s4:torture/shell: simplify cli_credentials_set_password() call

All we want is to avoid a possible callback...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:ntlm_auth: remove pointless credentials->priv_data = NULL;
Stefan Metzmacher [Wed, 31 Jul 2013 11:20:13 +0000 (13:20 +0200)]
s3:ntlm_auth: remove pointless credentials->priv_data = NULL;

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoauth/credentials: add cli_credentials_shallow_copy()
Stefan Metzmacher [Wed, 31 Jul 2013 11:21:14 +0000 (13:21 +0200)]
auth/credentials: add cli_credentials_shallow_copy()

This is useful for testing.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoauth/credentials: add cli_credentials_[set_]callback_data*
Stefan Metzmacher [Wed, 31 Jul 2013 10:52:17 +0000 (12:52 +0200)]
auth/credentials: add cli_credentials_[set_]callback_data*

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoauth/credentials: remove pointless talloc_reference() from cli_credentials_get_princi...
Stefan Metzmacher [Wed, 31 Jul 2013 10:33:25 +0000 (12:33 +0200)]
auth/credentials: remove pointless talloc_reference() from cli_credentials_get_principal_and_obtained()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoauth/credentials: remove pointless talloc_reference() from cli_credentials_get_unpars...
Stefan Metzmacher [Wed, 31 Jul 2013 10:33:25 +0000 (12:33 +0200)]
auth/credentials: remove pointless talloc_reference() from cli_credentials_get_unparsed_name()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agotevent: Add echo server sample code
Volker Lendecke [Tue, 23 Jul 2013 08:08:38 +0000 (10:08 +0200)]
tevent: Add echo server sample code

This is under a deliberately permissive license. I would like people to start
using libtevent and tevent_req (LGPL) without any worries about where to start
from.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Aug  5 04:07:58 CEST 2013 on sn-devel-104

10 years agoEnsure we can never integer wrap when working on client-supplied max_data_bytes.
Jeremy Allison [Sat, 3 Aug 2013 00:05:58 +0000 (17:05 -0700)]
Ensure we can never integer wrap when working on client-supplied max_data_bytes.

This would only be possible with SMB2, and is already checked in the upper
SMB2 layers, but it really doesn't hurt to have these extra checks at time
of use also.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Sun Aug  4 16:54:04 CEST 2013 on sn-devel-104

10 years agoThere are tests all over the SMB1 code to check that srv_send_smb fails, but it never...
Richard Sharpe [Mon, 22 Jul 2013 23:04:43 +0000 (16:04 -0700)]
There are tests all over the SMB1 code to check that srv_send_smb fails, but it never returns false.

Even if the write to the socket/fd fails, we never return false and
will keep reading stuff off of the input buffer until it is exhausted
and then we will exit.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Sat Aug  3 17:41:22 CEST 2013 on sn-devel-104

10 years agodfs_server: Use dsdb_search_one to catch 0 results as well as NO_SUCH_OBJECT errors
Andrew Bartlett [Mon, 29 Jul 2013 22:40:39 +0000 (10:40 +1200)]
dfs_server: Use dsdb_search_one to catch 0 results as well as NO_SUCH_OBJECT errors

This ensures we do not de-reference an invalid rs->msgs pointer if the
pointed-to object was not objectclass=computer

Andrew Bartlett

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

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 Aug  2 13:11:20 CEST 2013 on sn-devel-104

10 years agos3:lib/system fix build on AIX 7
Christian Ambach [Thu, 20 Jun 2013 16:27:13 +0000 (18:27 +0200)]
s3:lib/system fix build on AIX 7

AIX uses struct stat64 with struct timespec64, so direct assignment does
not work any more.

Pair-Programmed-With: Volker Lendecke <vl@samba.org>
Signed-off-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Aug  2 09:47:43 CEST 2013 on sn-devel-104

10 years agoFix bug 9678 - Windows 8 Roaming profiles fail
Gregor Beck [Thu, 1 Aug 2013 12:16:24 +0000 (14:16 +0200)]
Fix bug 9678 - Windows 8 Roaming profiles fail

Windows 8 tries to set 'ATTRIBUTE_SECURITY_INFORMATION' on some
dirs. Ignoring it makes roaming profiles work again.
Just like w2k3 gracefully ignore all the other bits.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug  1 20:58:25 CEST 2013 on sn-devel-104

10 years agosecurity.idl: add new security_secinfo bits
Gregor Beck [Wed, 31 Jul 2013 13:28:51 +0000 (15:28 +0200)]
security.idl: add new security_secinfo bits

[MS-DTYP].pdf 2.4.7

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotevent: change version to 0.9.19 samba-upstream/tags/tevent-0.9.19
Stefan Metzmacher [Thu, 1 Aug 2013 11:13:04 +0000 (13:13 +0200)]
tevent: change version to 0.9.19

* Fix tevent testsuite issue on Solaris.
* Add tevent tuturial and documentation updates
* Fix Coverity ID 989236 Operands don't affect result
* Bug: https://bugzilla.samba.org/show_bug.cgi?id=10012

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Aug  1 17:05:02 CEST 2013 on sn-devel-104

10 years agotevent: Remove the signal pipe if no signal events are around
Volker Lendecke [Wed, 31 Jul 2013 09:31:57 +0000 (11:31 +0200)]
tevent: Remove the signal pipe if no signal events are around

It makes adding/removing the first/last sigevents a bit more expensive, but it
will fix tevent_loop_wait not finishing when one signal event was added and
removed.

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoEnsure gpfs kernel leases are wrapped in a become_root()/unbecome_root() pair.
Ralph Wuerthner [Wed, 31 Jul 2013 23:33:48 +0000 (16:33 -0700)]
Ensure gpfs kernel leases are wrapped in a become_root()/unbecome_root() pair.

Ensures correct lease owner for signal delivery.

Signed-off-by: Ralph Wuerthner <ralphw@de.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug  1 03:57:11 CEST 2013 on sn-devel-104