amitay/samba.git
12 years agos3-ntlmssp void function cannot return value
Andrew Bartlett [Wed, 3 Aug 2011 22:38:21 +0000 (08:38 +1000)]
s3-ntlmssp void function cannot return value

Removing the return is reasonable here because while no callers
currently specify more than one flag at a time, the
ntlmssp_want_feature code allows it.

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Aug  4 02:19:46 CEST 2011 on sn-devel-104

12 years agos3: Fix some nonempty blank lines
Volker Lendecke [Wed, 3 Aug 2011 18:12:20 +0000 (20:12 +0200)]
s3: Fix some nonempty blank lines

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Aug  3 22:00:19 CEST 2011 on sn-devel-104

12 years agos3-printing: fix some build warnings in queue_process.c
Günther Deschner [Wed, 3 Aug 2011 10:59:17 +0000 (12:59 +0200)]
s3-printing: fix some build warnings in queue_process.c

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Aug  3 17:48:33 CEST 2011 on sn-devel-104

12 years agontlmssp: Add ntlmssp_blob_matches_magic()
Andrew Bartlett [Tue, 2 Aug 2011 23:33:29 +0000 (09:33 +1000)]
ntlmssp: Add ntlmssp_blob_matches_magic()

This avoids having the same check in 3 different parts of the code

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Aug  3 12:45:04 CEST 2011 on sn-devel-104

12 years agos3-ntlmssp Remove rudundent comment
Andrew Bartlett [Tue, 2 Aug 2011 23:26:55 +0000 (09:26 +1000)]
s3-ntlmssp Remove rudundent comment

This is explained where SESSION_KEY maps to SIGN at the NTLMSSP layer

Andrew Bartlett

12 years agos3-ntlmssp Remove a level of nesting in if/else statement
Andrew Bartlett [Tue, 2 Aug 2011 13:17:02 +0000 (23:17 +1000)]
s3-ntlmssp Remove a level of nesting in if/else statement

12 years agoselftest: test plugin_s4_dc against all ncacn_np tests
Andrew Bartlett [Tue, 2 Aug 2011 03:17:24 +0000 (13:17 +1000)]
selftest: test plugin_s4_dc against all ncacn_np tests

Changes to the s3 epmapper behaviour seem to have fixed the rest of these
tests.

Andrew Bartlett

12 years agos3-ntlmssp clarify session key behaviour after create_local_token() changes
Andrew Bartlett [Tue, 2 Aug 2011 01:29:43 +0000 (11:29 +1000)]
s3-ntlmssp clarify session key behaviour after create_local_token() changes

12 years agos3-ntlmssp Remove auth_ntlmssp_state_destructor, use the talloc tree instead
Andrew Bartlett [Tue, 2 Aug 2011 01:28:51 +0000 (11:28 +1000)]
s3-ntlmssp Remove auth_ntlmssp_state_destructor, use the talloc tree instead

12 years agoldb-samba: Explain the current behaviour of ldif_canonicalise_objectCategory
Andrew Bartlett [Mon, 1 Aug 2011 23:35:23 +0000 (09:35 +1000)]
ldb-samba: Explain the current behaviour of ldif_canonicalise_objectCategory

12 years agos3-auth directly return the result of make_server_info_guest()
Andrew Bartlett [Mon, 1 Aug 2011 23:06:22 +0000 (09:06 +1000)]
s3-auth directly return the result of make_server_info_guest()

12 years agos3-auth rename auth_ntlmssp_steal_session_info()
Andrew Bartlett [Mon, 1 Aug 2011 22:53:10 +0000 (08:53 +1000)]
s3-auth rename auth_ntlmssp_steal_session_info()

There is no longer any theft of memory as the underlying routines now
produce a new auth_session_info for this caller, allocating it
on the supplied memory context.

Andrew Bartlett

12 years agoselftest: print %U in smbclient -L output to allow testing
Andrew Bartlett [Fri, 29 Jul 2011 02:12:36 +0000 (12:12 +1000)]
selftest: print %U in smbclient -L output to allow testing

12 years agos3-smbd Be consistent with %U subs on guest logins
Andrew Bartlett [Wed, 27 Jul 2011 06:06:31 +0000 (16:06 +1000)]
s3-smbd Be consistent with %U subs on guest logins

The NTLMSSP code always specified "" as the username, and this makes
guest logins via the old-style session setup do the same.

Andrew Bartlett

12 years agoselftest: Add kerberos tests to plugin_s4_dc tests
Andrew Bartlett [Tue, 26 Jul 2011 06:17:30 +0000 (16:17 +1000)]
selftest: Add kerberos tests to plugin_s4_dc tests

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-auth use auth_generic_start to get full GENSEC in Samba3 session setup
Andrew Bartlett [Tue, 26 Jul 2011 05:11:47 +0000 (15:11 +1000)]
s3-auth use auth_generic_start to get full GENSEC in Samba3 session setup

This tests if the auth_generic_start() hook is available on the auth
context during the negprot, and if so it uses auth_generic_start() to
hook to GENSEC to handle the full SPNEGO blob.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-auth Add function to start any GENSEC mech by OID
Andrew Bartlett [Tue, 26 Jul 2011 04:40:33 +0000 (14:40 +1000)]
s3-auth Add function to start any GENSEC mech by OID

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-smbd clarify behaviour by not passing an OID that will not be used
Andrew Bartlett [Tue, 26 Jul 2011 04:12:23 +0000 (14:12 +1000)]
s3-smbd clarify behaviour by not passing an OID that will not be used

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-smbd Ensure we do not read past the end of a possible NTLMSSP blob
Andrew Bartlett [Tue, 26 Jul 2011 04:11:56 +0000 (14:11 +1000)]
s3-smbd Ensure we do not read past the end of a possible NTLMSSP blob

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-auth clarify the role of these session keys
Andrew Bartlett [Tue, 26 Jul 2011 03:46:25 +0000 (13:46 +1000)]
s3-auth clarify the role of these session keys

This comment can be clarified now the auth subsystem does not use the same
structure as the rest of the code.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-auth remove sanitized_username from auth_serversupplied_info
Andrew Bartlett [Tue, 26 Jul 2011 03:43:33 +0000 (13:43 +1000)]
s3-auth remove sanitized_username from auth_serversupplied_info

This structure element was only written to, not read.

It is filled into the companion structure, auth_session_info()
by create_local_token().

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-auth set session_info->sanitized_username in create_local_token()
Andrew Bartlett [Tue, 26 Jul 2011 03:37:36 +0000 (13:37 +1000)]
s3-auth set session_info->sanitized_username in create_local_token()

Rather than passing this value around the callers, and eventually
setting it in register_existing_vuid(), we simply pass it to
create_local_token().  This also removes the need for
auth_ntlmssp_get_username().

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-ntlmssp Split auth_ntlmssp_start into two functions
Andrew Bartlett [Tue, 26 Jul 2011 00:19:54 +0000 (10:19 +1000)]
s3-ntlmssp Split auth_ntlmssp_start into two functions

This helps map on to the GENSEC semantics better, and ensures that the
full set of desired features are set before the mechanism starts.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-ntlmssp Split calls to gensec plugin into prepare and start
Andrew Bartlett [Tue, 26 Jul 2011 00:01:39 +0000 (10:01 +1000)]
s3-ntlmssp Split calls to gensec plugin into prepare and start

GENSEC has the concept of starting the GENSEC subsystem before starting the
actual mechansim.  Between these two stages is when most context methods
are called, to specify credentials and features.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agogensec: Don't keep a second copy of the auth4_context in gensec_ntlmssp_state
Andrew Bartlett [Mon, 25 Jul 2011 07:20:45 +0000 (17:20 +1000)]
gensec: Don't keep a second copy of the auth4_context in gensec_ntlmssp_state

The auth4_context is already in the gensec_security structure, which is
available by de-reference here anyway.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-ntlmssp Remove auth_ntlmssp_and_flags()
Andrew Bartlett [Wed, 27 Jul 2011 03:52:27 +0000 (13:52 +1000)]
s3-ntlmssp Remove auth_ntlmssp_and_flags()

There is no need to mask out these flags as they simply are not set
yet.

The correct abstraction is to ask for NTLMSSP features.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-ntlmssp Remove rpccli_get_pwd_hash and auth_ntlmssp_get_nt_hash
Andrew Bartlett [Mon, 25 Jul 2011 01:21:31 +0000 (11:21 +1000)]
s3-ntlmssp Remove rpccli_get_pwd_hash and auth_ntlmssp_get_nt_hash

The session key we want here (the only one that is availble to the
encryption layer) is the one obtained by cli_get_session_key(), as
NTLMSSP creates a per-session session key via key exchange and NTLMv2
negotiation.

The key was never directly the NT hash anyway (this is simply a
mistake, the extra MD4() was lost during my previous cleanup
f28f113d8e76824b080359c90efd9c92de533740 in 2008), but was MD4(NT
hash) in early implementations of NTLMSSP.

However, regardless this call is not available on domain trusts
between AD domains and Windows 2003 R2, making this less useful.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agoselftest: Test encrypted RPC pipes against plugin_s4_dc
Andrew Bartlett [Fri, 22 Jul 2011 02:32:15 +0000 (12:32 +1000)]
selftest: Test encrypted RPC pipes against plugin_s4_dc

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agoselftest: use the s4 winbindd in plugin_s4_dc test
Andrew Bartlett [Thu, 21 Jul 2011 22:03:56 +0000 (08:03 +1000)]
selftest: use the s4 winbindd in plugin_s4_dc test

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-auth Add hook to start a GENSEC mech to auth_samba4
Andrew Bartlett [Thu, 21 Jul 2011 04:48:59 +0000 (14:48 +1000)]
s3-auth Add hook to start a GENSEC mech to auth_samba4

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-ntlmssp Remove auth_ntlmssp_or_flags
Andrew Bartlett [Fri, 22 Jul 2011 02:15:06 +0000 (12:15 +1000)]
s3-ntlmssp Remove auth_ntlmssp_or_flags

We now just use auth_ntlmssp_want_feature to get extra flags
on the NTLMSSP context

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-ntlmssp Remove calls to auth_ntlmssp_and_flags from the server
Andrew Bartlett [Fri, 22 Jul 2011 02:10:30 +0000 (12:10 +1000)]
s3-ntlmssp Remove calls to auth_ntlmssp_and_flags from the server

This is changed so that the callers ask for the additional flags
that they need, starting with no additional flags.

This helps to create a proper abstraction layer in
ntlmssp_wrap/auth_ntlmssp.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-ntlmssp Add mem_ctx argument to auth_ntlmssp_update
Andrew Bartlett [Tue, 26 Jul 2011 07:20:35 +0000 (17:20 +1000)]
s3-ntlmssp Add mem_ctx argument to auth_ntlmssp_update

This clarifies the lifetime of the returned token.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-ntlmssp NTLMSSP sealing implies signing, so set both flags
Andrew Bartlett [Wed, 27 Jul 2011 03:35:01 +0000 (13:35 +1000)]
s3-ntlmssp NTLMSSP sealing implies signing, so set both flags

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-ntlmssp Add hooks to optionally call into GENSEC in auth_ntlmssp
Andrew Bartlett [Wed, 27 Jul 2011 03:34:34 +0000 (13:34 +1000)]
s3-ntlmssp Add hooks to optionally call into GENSEC in auth_ntlmssp

This allows the current behaviour of the NTLMSSP code to be unchanged
while adding a way to hook in an alternate implementation via an auth
module.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-ntlmssp Add mem_ctx argument to auth_ntlmssp_get_session_key()
Andrew Bartlett [Tue, 2 Aug 2011 00:24:28 +0000 (10:24 +1000)]
s3-ntlmssp Add mem_ctx argument to auth_ntlmssp_get_session_key()

12 years agos3-auth Allow auth modules to provide an initialised GENSEC context
Andrew Bartlett [Thu, 21 Jul 2011 04:27:00 +0000 (14:27 +1000)]
s3-auth Allow auth modules to provide an initialised GENSEC context

This will allow auth plugins such as auth_samba4 to provide an initialised
GENSEC context to auth subsystem callers.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-ntlmssp Use auth_ntlmssp_*() functions in more places
Andrew Bartlett [Thu, 21 Jul 2011 09:13:59 +0000 (19:13 +1000)]
s3-ntlmssp Use auth_ntlmssp_*() functions in more places

This allows auth_ntlmssp_get_ntlmssp_state() to be removed.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-ntlmssp Remove unused auth_ntlmssp_get_domain()
Andrew Bartlett [Fri, 22 Jul 2011 01:41:46 +0000 (11:41 +1000)]
s3-ntlmssp Remove unused auth_ntlmssp_get_domain()

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-ntlmssp Remove unused auth_ntlmssp_get_client
Andrew Bartlett [Thu, 21 Jul 2011 09:30:28 +0000 (19:30 +1000)]
s3-ntlmssp Remove unused auth_ntlmssp_get_client

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-rpc_server use session_info to print user details
Andrew Bartlett [Thu, 21 Jul 2011 09:29:10 +0000 (19:29 +1000)]
s3-rpc_server use session_info to print user details

This is the authoritative source for what the user was actually
authenticated as.

The previous message printed only what they claimed, and the DC might
map this.

The workstation is no longer printed in the logs, as it allows
auth_ntlmssp_get_client() to be removed.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-auth Use else if in do_map_to_guest_server_info
Andrew Bartlett [Wed, 27 Jul 2011 03:20:59 +0000 (13:20 +1000)]
s3-auth Use else if in do_map_to_guest_server_info

This means we can't ever call make_server_info_guest() twice.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3-auth Move map to guest to directly after the check_password calls
Andrew Bartlett [Fri, 22 Jul 2011 01:33:52 +0000 (11:33 +1000)]
s3-auth Move map to guest to directly after the check_password calls

This means we no longer need two different map to guest functions
and have consistent logic with fewer layering violations.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agogensec: clarify memory ownership for gensec_session_info() and gensec_session_key()
Andrew Bartlett [Mon, 1 Aug 2011 05:39:01 +0000 (15:39 +1000)]
gensec: clarify memory ownership for gensec_session_info() and gensec_session_key()

This is slightly less efficient, because we no longer keep a cache on
the gensec structures, but much clearer in terms of memory ownership.
Both gensec_session_info() and gensec_session_key() now take a mem_ctx
and put the result only on that context.

Some duplication of memory in the callers (who were rightly uncertain
about who was the rightful owner of the returned memory) has been
removed to compensate for the internal copy.

Andrew Bartlett

12 years agogensec: Remove mem_ctx from calls that do not return memory
Andrew Bartlett [Thu, 21 Jul 2011 09:10:15 +0000 (19:10 +1000)]
gensec: Remove mem_ctx from calls that do not return memory

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agogensec: split GENSEC into mechanism-dependent and runtime functions
Andrew Bartlett [Thu, 21 Jul 2011 03:20:26 +0000 (13:20 +1000)]
gensec: split GENSEC into mechanism-dependent and runtime functions

The startup and runtime functions that have no dependencies are moved
into the top level.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3:libsmb/clifile: make use of cli_set_timeout()
Stefan Metzmacher [Tue, 2 Aug 2011 20:58:57 +0000 (22:58 +0200)]
s3:libsmb/clifile: make use of cli_set_timeout()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Aug  3 10:16:18 CEST 2011 on sn-devel-104

12 years agos3:cli_np_tstream: make use of cli_set_timeout()
Stefan Metzmacher [Tue, 2 Aug 2011 20:56:52 +0000 (22:56 +0200)]
s3:cli_np_tstream: make use of cli_set_timeout()

metze

12 years agos3:torture: make use of cli_set_timeout()
Stefan Metzmacher [Tue, 2 Aug 2011 20:55:32 +0000 (22:55 +0200)]
s3:torture: make use of cli_set_timeout()

metze

12 years agos3:winbindd_cm: make use of cli_set_timeout()
Stefan Metzmacher [Tue, 2 Aug 2011 20:55:00 +0000 (22:55 +0200)]
s3:winbindd_cm: make use of cli_set_timeout()

metze

12 years agos3:libsmb/clidfs: make use of cli_state_encryption_on()
Stefan Metzmacher [Tue, 2 Aug 2011 20:54:28 +0000 (22:54 +0200)]
s3:libsmb/clidfs: make use of cli_state_encryption_on()

metze

12 years agos4-libcli: Fix the fd leak. Close open file descriptor before return.
Amitay Isaacs [Wed, 3 Aug 2011 00:50:31 +0000 (10:50 +1000)]
s4-libcli: Fix the fd leak. Close open file descriptor before return.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Aug  3 07:49:12 CEST 2011 on sn-devel-104

12 years agosamba-tool: Rename samba-tool command gpo2 --> gpo
Amitay Isaacs [Tue, 2 Aug 2011 23:37:04 +0000 (09:37 +1000)]
samba-tool: Rename samba-tool command gpo2 --> gpo

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
12 years agosamba-tool: Remove C version of samba-tool
Amitay Isaacs [Tue, 2 Aug 2011 23:21:21 +0000 (09:21 +1000)]
samba-tool: Remove C version of samba-tool

Python version of samba-tool has now implemented all the commands
from C version and more.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
12 years agosamba-tool: Add implementation of gpo create command
Amitay Isaacs [Tue, 2 Aug 2011 06:13:43 +0000 (16:13 +1000)]
samba-tool: Add implementation of gpo create command

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
12 years agosamba-tool: Add functions to create directories and copy files over SMB share
Amitay Isaacs [Tue, 2 Aug 2011 06:13:01 +0000 (16:13 +1000)]
samba-tool: Add functions to create directories and copy files over SMB share

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
12 years agos4-libcli: get_acl and set_acl require raw_open to set security descriptor
Amitay Isaacs [Tue, 2 Aug 2011 06:10:21 +0000 (16:10 +1000)]
s4-libcli: get_acl and set_acl require raw_open to set security descriptor

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
12 years agos4-libcli: Check if short_name is not null, before converting to python string
Amitay Isaacs [Tue, 2 Aug 2011 06:07:43 +0000 (16:07 +1000)]
s4-libcli: Check if short_name is not null, before converting to python string

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
12 years agos4-libcli: Replace smb_composite_connect() with smb_full_connection()
Amitay Isaacs [Tue, 2 Aug 2011 06:04:52 +0000 (16:04 +1000)]
s4-libcli: Replace smb_composite_connect() with smb_full_connection()

Python smb connection now uses smb_full_connection method.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
12 years agos4-policy: Use the correct local directory for stat.
Amitay Isaacs [Tue, 2 Aug 2011 05:13:36 +0000 (15:13 +1000)]
s4-policy: Use the correct local directory for stat.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
12 years agosamba-tool: Rename copy_directory_recurse to copy_directory_remote_to_local
Amitay Isaacs [Mon, 1 Aug 2011 05:47:10 +0000 (15:47 +1000)]
samba-tool: Rename copy_directory_recurse to copy_directory_remote_to_local

gpo fetch is remote->local and gpo create is local->remote
local is local filesystem and remote is smb share.
Need two functions to copy local->remote and remote->local.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
12 years agosamba-tool: Addd functions to print GPO flags and GPlink options
Amitay Isaacs [Mon, 1 Aug 2011 05:41:19 +0000 (15:41 +1000)]
samba-tool: Addd functions to print GPO flags and GPlink options

Use methods from python wrapper to convert gpo flags and gplink
options to string.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
12 years agos4-policy: Add python wrapper for ads_to_dir_access_mask() function
Amitay Isaacs [Mon, 1 Aug 2011 05:35:32 +0000 (15:35 +1000)]
s4-policy: Add python wrapper for ads_to_dir_access_mask() function

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
12 years agos4-policy: Expose gp_ads_to_dir_access_mask() function
Amitay Isaacs [Mon, 1 Aug 2011 04:51:25 +0000 (14:51 +1000)]
s4-policy: Expose gp_ads_to_dir_access_mask() function

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
12 years agos4-libcli: Added python SMB methods for mkdir(), rmdir(), chkpath()
Amitay Isaacs [Fri, 29 Jul 2011 06:17:49 +0000 (16:17 +1000)]
s4-libcli: Added python SMB methods for mkdir(), rmdir(), chkpath()

Updated docstrings for all methods.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
12 years agopyldb: return a copy of key constant DNs via python interface
Andrew Tridgell [Mon, 1 Aug 2011 02:39:48 +0000 (12:39 +1000)]
pyldb: return a copy of key constant DNs via python interface

this prevents an easy coding error where the caller modifies one of
the key DNs for the database, by using an add_child function or
similar

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
12 years agoWe don't need check_name() here. All possible paths to dptr_create()
Jeremy Allison [Tue, 2 Aug 2011 23:25:22 +0000 (16:25 -0700)]
We don't need check_name() here. All possible paths to dptr_create()
have already called check_name.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Aug  3 03:00:55 CEST 2011 on sn-devel-104

12 years agos3: Fix smb2 handling error returns from aio
Volker Lendecke [Tue, 2 Aug 2011 19:16:26 +0000 (21:16 +0200)]
s3: Fix smb2 handling error returns from aio

Found when reading with aio_fork beyond the end of file.

Metze, Jeremy, please check!

Without this we get

[2011/08/02 21:02:54.082661,  0] lib/util.c:778(smb_panic_s3)
  PANIC (pid 2302): smbd/smb2_read.c:593: Type mismatch: name[NULL] expected[struct smbd_smb2_read_state]
[2011/08/02 21:02:54.094316,  0] lib/util.c:882(log_stack_trace)
  BACKTRACE: 23 stack frames:
   #0 bin/smbd(log_stack_trace+0x2d) [0xb72873d8]
   #1 bin/smbd(smb_panic_s3+0x7c) [0xb7287529]
   #2 bin/smbd(smb_panic+0x2f) [0xb7277e1f]
   #3 /root/git/s3-work/source3/bin/libtalloc.so.2 [0xb6c6bc48]
   #4 /root/git/s3-work/source3/bin/libtalloc.so.2 [0xb6c6ec79]
   #5 /root/git/s3-work/source3/bin/libtalloc.so.2(_talloc_get_type_abort+0x34) [0xb6c6ecb3]
   #6 bin/smbd [0xb6fbc405]
   #7 bin/smbd(_tevent_req_notify_callback+0x4a) [0xb729a85a]
   #8 bin/smbd [0xb729a888]
   #9 bin/smbd(_tevent_req_done+0x19) [0xb729aa73]
   #10 bin/smbd [0xb6fae517]
   #11 bin/smbd [0xb6fad258]
   #12 bin/smbd(smbd_aio_complete_aio_ex+0xf5) [0xb6fad6e8]
   #13 /root/git/inst/modules/vfs/aio_fork.so [0xb66d4992]
   #14 bin/smbd(run_events_poll+0x400) [0xb7297df2]
   #15 bin/smbd(smbd_process+0xd75) [0xb6f9d3a7]
   #16 bin/smbd [0xb756f07b]
   #17 bin/smbd(run_events_poll+0x400) [0xb7297df2]
   #18 bin/smbd [0xb7298254]
   #19 bin/smbd(_tevent_loop_once+0x9e) [0xb72986ac]
   #20 bin/smbd(main+0x185c) [0xb7570e59]
   #21 /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb6b08455]
   #22 bin/smbd [0xb6f14e01]

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Aug  2 22:33:15 CEST 2011 on sn-devel-104

12 years agos3: Remove unused ERROR_FORCE_NT macro
Volker Lendecke [Tue, 2 Aug 2011 15:18:15 +0000 (17:18 +0200)]
s3: Remove unused ERROR_FORCE_NT macro

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Aug  2 20:32:08 CEST 2011 on sn-devel-104

12 years agos3: Remove unused ERROR_DOS macro
Volker Lendecke [Tue, 2 Aug 2011 15:17:29 +0000 (17:17 +0200)]
s3: Remove unused ERROR_DOS macro

12 years agos3: Move deferred_open_queue to smbd_server_connection
Volker Lendecke [Tue, 2 Aug 2011 15:13:23 +0000 (17:13 +0200)]
s3: Move deferred_open_queue to smbd_server_connection

12 years agos3: Pass sconn explicitly to get_deferred_open_message_smb
Volker Lendecke [Tue, 2 Aug 2011 15:07:25 +0000 (17:07 +0200)]
s3: Pass sconn explicitly to get_deferred_open_message_smb

12 years agos3: Pass sconn explicitly to open_was_deferred
Volker Lendecke [Tue, 2 Aug 2011 15:05:33 +0000 (17:05 +0200)]
s3: Pass sconn explicitly to open_was_deferred

12 years agos3: Pass sconn explicitly to schedule_deferred_open_message_smb
Volker Lendecke [Tue, 2 Aug 2011 14:58:46 +0000 (16:58 +0200)]
s3: Pass sconn explicitly to schedule_deferred_open_message_smb

12 years agos3: Explicitly pass sconn to remove_deferred_open_message_smb
Volker Lendecke [Tue, 2 Aug 2011 14:53:33 +0000 (16:53 +0200)]
s3: Explicitly pass sconn to remove_deferred_open_message_smb

12 years agos3: Fix some nonempty blank lines
Volker Lendecke [Tue, 2 Aug 2011 14:44:53 +0000 (16:44 +0200)]
s3: Fix some nonempty blank lines

12 years agos3:server Consolidate printing related initialization
Simo Sorce [Tue, 2 Aug 2011 14:06:31 +0000 (10:06 -0400)]
s3:server Consolidate printing related initialization

Signed-off-by: Günther Deschner <gd@samba.org>
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Aug  2 17:37:44 CEST 2011 on sn-devel-104

12 years agos3:smbd - Move printing queue stuff
Simo Sorce [Mon, 1 Aug 2011 20:50:51 +0000 (16:50 -0400)]
s3:smbd - Move printing queue stuff

This way we can properly deal with pcap updates in the background queue process
if it is enabled (on by default) and not perform these actions in the main
smbd process.

Signed-off-by: Günther Deschner <gd@samba.org>
12 years agos4:kdc: fix compiler warning
Stefan Metzmacher [Tue, 2 Aug 2011 01:57:50 +0000 (03:57 +0200)]
s4:kdc: fix compiler warning

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Aug  2 06:06:15 CEST 2011 on sn-devel-104

12 years agos3:libsmb/libsmb_server: make use of cli_set_timeout()
Stefan Metzmacher [Tue, 2 Aug 2011 02:16:01 +0000 (04:16 +0200)]
s3:libsmb/libsmb_server: make use of cli_set_timeout()

metze

12 years agos3:libsmb/cli*: make use of cli_state_protocol()
Stefan Metzmacher [Mon, 1 Aug 2011 15:01:42 +0000 (17:01 +0200)]
s3:libsmb/cli*: make use of cli_state_protocol()

metze

12 years agos3:client: make use of cli_state_protocol()
Stefan Metzmacher [Mon, 1 Aug 2011 15:01:42 +0000 (17:01 +0200)]
s3:client: make use of cli_state_protocol()

metze

12 years agos3:auth_server: make use of cli_state_protocol()
Stefan Metzmacher [Mon, 1 Aug 2011 15:00:24 +0000 (17:00 +0200)]
s3:auth_server: make use of cli_state_protocol()

metze

12 years agos3:spoolss: make use of cli_state_protocol()
Stefan Metzmacher [Mon, 1 Aug 2011 14:59:54 +0000 (16:59 +0200)]
s3:spoolss: make use of cli_state_protocol()

metze

12 years agos3:masktest: make use of cli_state_protocol()
Stefan Metzmacher [Mon, 1 Aug 2011 14:59:34 +0000 (16:59 +0200)]
s3:masktest: make use of cli_state_protocol()

metze

12 years agos3:net_rpc: make use of cli_state_protocol()
Stefan Metzmacher [Mon, 1 Aug 2011 14:59:10 +0000 (16:59 +0200)]
s3:net_rpc: make use of cli_state_protocol()

metze

12 years agos3:winbindd_cm: make use of cli_state_protocol()
Stefan Metzmacher [Mon, 1 Aug 2011 14:58:49 +0000 (16:58 +0200)]
s3:winbindd_cm: make use of cli_state_protocol()

metze

12 years agos3:libsmb: add cli_state_protocol()
Stefan Metzmacher [Sat, 30 Jul 2011 10:04:37 +0000 (12:04 +0200)]
s3:libsmb: add cli_state_protocol()

metze

12 years agos3:include: change cli->protocol to enum protocol_types
Stefan Metzmacher [Tue, 2 Aug 2011 01:51:38 +0000 (03:51 +0200)]
s3:include: change cli->protocol to enum protocol_types

metze

12 years agos3:libsmb/cli*: make use of cli_state_capabilities()
Stefan Metzmacher [Mon, 1 Aug 2011 14:42:23 +0000 (16:42 +0200)]
s3:libsmb/cli*: make use of cli_state_capabilities()

metze

12 years agos3:libsmb/libsmb_*: make use of cli_state_capabilities()
Stefan Metzmacher [Mon, 1 Aug 2011 14:41:19 +0000 (16:41 +0200)]
s3:libsmb/libsmb_*: make use of cli_state_capabilities()

metze

12 years agos3:torture: make use of cli_state_capabilities()
Stefan Metzmacher [Mon, 1 Aug 2011 14:40:45 +0000 (16:40 +0200)]
s3:torture: make use of cli_state_capabilities()

metze

12 years agos3:winbindd_cm: make use of cli_state_capabilities()
Stefan Metzmacher [Mon, 1 Aug 2011 14:39:55 +0000 (16:39 +0200)]
s3:winbindd_cm: make use of cli_state_capabilities()

metze

12 years agos3:include: make use of cli_state_capabilities() in SERVER_HAS_UNIX_CIFS()
Stefan Metzmacher [Mon, 1 Aug 2011 14:39:20 +0000 (16:39 +0200)]
s3:include: make use of cli_state_capabilities() in SERVER_HAS_UNIX_CIFS()

metze

12 years agos3:libsmb: add cli_state_capabilities()
Stefan Metzmacher [Sat, 30 Jul 2011 10:04:16 +0000 (12:04 +0200)]
s3:libsmb: add cli_state_capabilities()

metze

12 years agos3:smb2cli_base: smb2cli_req_send() needs to call tevent_req_post() on error
Stefan Metzmacher [Mon, 18 Jul 2011 12:38:33 +0000 (14:38 +0200)]
s3:smb2cli_base: smb2cli_req_send() needs to call tevent_req_post() on error

metze

12 years agosamba-tool: Don't install -c version, which is now deprecated.
Jelmer Vernooij [Tue, 2 Aug 2011 01:32:54 +0000 (03:32 +0200)]
samba-tool: Don't install -c version, which is now deprecated.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Aug  2 04:53:39 CEST 2011 on sn-devel-104

12 years agoFix bug #8341 - libsmbclient segfault when feed the root of a mounted share via an uri
Alban Browaeys [Mon, 1 Aug 2011 23:40:22 +0000 (16:40 -0700)]
Fix bug #8341 - libsmbclient segfault when feed the root of a mounted share via an uri

Fix null deref.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Aug  2 02:58:26 CEST 2011 on sn-devel-104

12 years agodbcheck: Cancel transaction if operation fails.
Jelmer Vernooij [Mon, 1 Aug 2011 18:04:02 +0000 (20:04 +0200)]
dbcheck: Cancel transaction if operation fails.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Aug  2 01:41:07 CEST 2011 on sn-devel-104

12 years agoFix bug 7462 - Non-standard SA_RESETHAND is used in ...lib/tevent/tevent_signal.c
Jeremy Allison [Mon, 1 Aug 2011 18:49:10 +0000 (11:49 -0700)]
Fix bug 7462 - Non-standard SA_RESETHAND is used in ...lib/tevent/tevent_signal.c

Make SA_RESETHAND conditional on its existance.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Aug  1 22:03:45 CEST 2011 on sn-devel-104