obnox/samba/samba-obnox.git
12 years agos4:dbchecker - handle the "none" case correctly
Matthias Dieter Wallnöfer [Thu, 24 May 2012 18:43:17 +0000 (20:43 +0200)]
s4:dbchecker - handle the "none" case correctly

This means that *no* fixing will be done, also the first possible one
will be omitted as well.

Reviewed-by: abartlet
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Tue May 29 21:36:25 CEST 2012 on sn-devel-104

12 years agos3:smb2_ioctl: verify credit charge
Stefan Metzmacher [Tue, 29 May 2012 12:08:43 +0000 (14:08 +0200)]
s3:smb2_ioctl: verify credit charge

Based on a patch from Christian Ambach <ambi@samba.org>.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue May 29 18:55:29 CEST 2012 on sn-devel-104

12 years agos3:smb2_ioctl: add more validation checks
Stefan Metzmacher [Tue, 29 May 2012 11:25:31 +0000 (13:25 +0200)]
s3:smb2_ioctl: add more validation checks

metze

12 years agos3:smb2_ioctl: add some more validation checks
Stefan Metzmacher [Tue, 29 May 2012 10:06:22 +0000 (12:06 +0200)]
s3:smb2_ioctl: add some more validation checks

Based on a patch from Christian Ambach <ambi@samba.org>.

metze

12 years agos4-torture: verify #8373 and add ndr nbt tests for LOGON_PRIMARY_QUERY nbt_netlogon_r...
Günther Deschner [Fri, 25 May 2012 12:50:11 +0000 (14:50 +0200)]
s4-torture: verify #8373 and add ndr nbt tests for LOGON_PRIMARY_QUERY nbt_netlogon_requests.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue May 29 15:49:10 CEST 2012 on sn-devel-104

12 years agos4:torture report connection error via torture_fail
Christian Ambach [Thu, 10 May 2012 12:51:13 +0000 (14:51 +0200)]
s4:torture report connection error via torture_fail

to make smbtorture report the error instead of complaining about missing torture_ call

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue May 29 13:57:42 CEST 2012 on sn-devel-104

12 years agos3:smbd/smb2_find add a debug message
Christian Ambach [Fri, 11 May 2012 17:03:50 +0000 (19:03 +0200)]
s3:smbd/smb2_find add a debug message

like the ones in the other calls that check for max sizes

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:smbd/smb2_getinfo add a debug message
Christian Ambach [Fri, 11 May 2012 17:03:32 +0000 (19:03 +0200)]
s3:smbd/smb2_getinfo add a debug message

like the ones in the other calls that check for max sizes

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:smbd/smb2_setinfo add a debug message
Christian Ambach [Fri, 11 May 2012 17:02:21 +0000 (19:02 +0200)]
s3:smbd/smb2_setinfo add a debug message

similar to the ones present in other paths

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:smbd/smb2_read improve debug message
Christian Ambach [Fri, 11 May 2012 17:01:43 +0000 (19:01 +0200)]
s3:smbd/smb2_read improve debug message

make the message similar to the ones in other paths

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agolibcli/smb: add some more FSCTL_* defines
Stefan Metzmacher [Tue, 29 May 2012 08:08:51 +0000 (10:08 +0200)]
libcli/smb: add some more FSCTL_* defines

metze

12 years agos3:smb2cli_ioctl: fix requests without output_buffer.length > 0 against windows
Stefan Metzmacher [Tue, 29 May 2012 05:27:14 +0000 (07:27 +0200)]
s3:smb2cli_ioctl: fix requests without output_buffer.length > 0 against windows

This fixes DCERPC over SMB2 against windows servers.

metze

12 years agos3: fix compile of krb5 locator on Solaris
Björn Jacke [Tue, 29 May 2012 06:01:40 +0000 (08:01 +0200)]
s3: fix compile of krb5 locator on Solaris

the krb5 locator plugin on Solaris needs LIBREPLACE_LIBS (bug #8732)

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Tue May 29 09:58:42 CEST 2012 on sn-devel-104

12 years agofreebsd9: support both WAF MIT krb5 build and autoconf build against MIT krb5
Alexander Bokovoy [Mon, 28 May 2012 16:03:00 +0000 (19:03 +0300)]
freebsd9: support both WAF MIT krb5 build and autoconf build against MIT krb5

System-provided Heimdal Kerberos in FreeBSD 9 lacks proper support for parsing MS PAC.
This leaves us with MIT krb5 package from ports or embedded Heimdal in source4.
MIT krb5 from ports is 1.9.2, it supports all needed features for AD support in smbd,
as well as WAF MIT krb5 build. In order to use it, one needs to install 'krb5' package.

Autoconf build:
  --with-krb5=/usr/local

WAF build:
  --with-system-mitkrb5 /usr/local

or otherwise krb5-config from system Heimdal will overtake and break the detection, leaving
you with a mixture of Kerberos libraries from different locations.

WAF build accepts multiple paths as sub-arguments of the --with-system-mitkrb5 and searches
through them for krb5-config, i.e. /usr/local /usr/kerberos ...

Autobuild-User: Alexander Bokovoy <ab@samba.org>
Autobuild-Date: Mon May 28 23:40:30 CEST 2012 on sn-devel-104

12 years agos4:ntvfs/ipc: fix protocol specific processing of pipe names
Stefan Metzmacher [Mon, 28 May 2012 17:44:04 +0000 (19:44 +0200)]
s4:ntvfs/ipc: fix protocol specific processing of pipe names

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon May 28 21:48:47 CEST 2012 on sn-devel-104

12 years agos3:selftest: run rpc.samba3.smb[1|2]-pipe-name
Stefan Metzmacher [Mon, 28 May 2012 13:56:14 +0000 (15:56 +0200)]
s3:selftest: run rpc.samba3.smb[1|2]-pipe-name

metze

12 years agos3:rpc_server: don't do any magic in is_known_pipename() anymore
Stefan Metzmacher [Mon, 28 May 2012 14:49:23 +0000 (16:49 +0200)]
s3:rpc_server: don't do any magic in is_known_pipename() anymore

The callers have to check if they allow something else than
the raw pipe file name.

If we allow more than windows allows, we risks Samba specific
client behavior. E.g. winbindd only works against Samba servers.

metze

12 years agos3:smbd: fix reply_open_pipe_and_X() to behave like windows (2008 R2)
Stefan Metzmacher [Mon, 28 May 2012 16:23:50 +0000 (18:23 +0200)]
s3:smbd: fix reply_open_pipe_and_X() to behave like windows (2008 R2)

See rpc.samba3.smb1-pipe-name.

metze

12 years agos3:smbd: only strip \\ off the name if present (for ntcreatex)
Stefan Metzmacher [Mon, 28 May 2012 14:40:36 +0000 (16:40 +0200)]
s3:smbd: only strip \\ off the name if present (for ntcreatex)

metze

12 years agos3:rpc_server: return OBJECT_NAME_NOT_FOUND instead of PIPE_NOT_AVAILABLE
Stefan Metzmacher [Mon, 28 May 2012 14:27:29 +0000 (16:27 +0200)]
s3:rpc_server: return OBJECT_NAME_NOT_FOUND instead of PIPE_NOT_AVAILABLE

metze

12 years agos3:smb2_create: do not remove leading backslash from pipe names
Stefan Metzmacher [Mon, 28 May 2012 13:25:53 +0000 (15:25 +0200)]
s3:smb2_create: do not remove leading backslash from pipe names

metze

12 years agos4:torture/samba3rpc: add smb1-pipe-name
Stefan Metzmacher [Mon, 28 May 2012 14:23:22 +0000 (16:23 +0200)]
s4:torture/samba3rpc: add smb1-pipe-name

metze

12 years agos4:torture/samba3rpc: add smb2-pipe-name
Stefan Metzmacher [Mon, 28 May 2012 13:38:00 +0000 (15:38 +0200)]
s4:torture/samba3rpc: add smb2-pipe-name

metze

12 years agos3:cli_np_tstream: pass a leading backslash for the pipe name for SMB1
Stefan Metzmacher [Mon, 28 May 2012 13:29:17 +0000 (15:29 +0200)]
s3:cli_np_tstream: pass a leading backslash for the pipe name for SMB1

metze

12 years agos3:rpc_client: tstream_cli_np_open_send() doesn't expect a leading backslash
Stefan Metzmacher [Mon, 28 May 2012 16:43:29 +0000 (18:43 +0200)]
s3:rpc_client: tstream_cli_np_open_send() doesn't expect a leading backslash

This fixes winbindd against a windows server using SMB2.

metze

12 years agos3:libsmb: get rid of cli_ucs2
Luk Claes [Sat, 26 May 2012 10:14:51 +0000 (12:14 +0200)]
s3:libsmb: get rid of cli_ucs2

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon May 28 16:58:03 CEST 2012 on sn-devel-104

12 years agos3:libsmb: get rid of clisigning routines
Luk Claes [Sat, 26 May 2012 10:07:38 +0000 (12:07 +0200)]
s3:libsmb: get rid of clisigning routines

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: get rid of cli_has_async_calls
Luk Claes [Sat, 26 May 2012 09:45:09 +0000 (11:45 +0200)]
s3:libsmb: get rid of cli_has_async_calls

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: get rid of cli_negprot
Luk Claes [Sun, 20 May 2012 15:54:29 +0000 (17:54 +0200)]
s3:libsmb: get rid of cli_negprot

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: get rid of cli_state_disconnect
Luk Claes [Sun, 20 May 2012 14:26:25 +0000 (16:26 +0200)]
s3:libsmb: get rid of cli_state_disconnect

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: get rid of cli_state_server_time_zone
Luk Claes [Sat, 19 May 2012 16:50:27 +0000 (18:50 +0200)]
s3:libsmb: get rid of cli_state_server_time_zone

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: get rid of cli_state_security_mode
Luk Claes [Sat, 19 May 2012 16:47:31 +0000 (18:47 +0200)]
s3:libsmb: get rid of cli_state_security_mode

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: get rid of cli_state_server_gss_blob
Luk Claes [Sat, 19 May 2012 16:44:48 +0000 (18:44 +0200)]
s3:libsmb: get rid of cli_state_server_gss_blob

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: get rid of cli_state_server_challenge
Luk Claes [Sat, 19 May 2012 16:42:56 +0000 (18:42 +0200)]
s3:libsmb: get rid of cli_state_server_challenge

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: get rid of cli_state_encryption_on
Luk Claes [Sat, 19 May 2012 16:39:44 +0000 (18:39 +0200)]
s3:libsmb: get rid of cli_state_encryption_on

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: get rid of cli_state_max_requests
Luk Claes [Sat, 19 May 2012 16:35:51 +0000 (18:35 +0200)]
s3:libsmb: get rid of cli_state_max_requests

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: get rid of cli_state_server_session_key
Luk Claes [Sat, 19 May 2012 16:32:51 +0000 (18:32 +0200)]
s3:libsmb: get rid of cli_state_server_session_key

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: get rid of cli_state_capabilities
Luk Claes [Sat, 19 May 2012 16:23:40 +0000 (18:23 +0200)]
s3:libsmb: get rid of cli_state_capabilities

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: get rid of cli_state_protocol
Luk Claes [Sat, 19 May 2012 16:09:30 +0000 (18:09 +0200)]
s3:libsmb: get rid of cli_state_protocol

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: get rid of cli_state_remote_name
Luk Claes [Sat, 19 May 2012 15:31:50 +0000 (17:31 +0200)]
s3:libsmb: get rid of cli_state_remote_name

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: get rid of cli_state_*_sockaddr
Luk Claes [Sat, 19 May 2012 15:15:23 +0000 (17:15 +0200)]
s3:libsmb: get rid of cli_state_*_sockaddr

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: get rid of cli_sockopt
Luk Claes [Sat, 19 May 2012 14:58:28 +0000 (16:58 +0200)]
s3:libsmb: get rid of cli_sockopt

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb: remove unused (un)set_pending functions
Luk Claes [Sat, 19 May 2012 14:21:14 +0000 (16:21 +0200)]
s3:libsmb: remove unused (un)set_pending functions

Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agoAvoid all(), as it's not available in Python 2.4.
Jelmer Vernooij [Sun, 27 May 2012 12:17:52 +0000 (14:17 +0200)]
Avoid all(), as it's not available in Python 2.4.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun May 27 16:13:34 CEST 2012 on sn-devel-104

12 years agobuild: Remove all references to libuuid
Andrew Bartlett [Sun, 27 May 2012 03:20:56 +0000 (13:20 +1000)]
build: Remove all references to libuuid

We simply do not need this library any more.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun May 27 11:08:22 CEST 2012 on sn-devel-104

12 years agobuild: Add option to specify where gettext is (/usr/local by default)
Andriy Syrovenko [Sat, 26 May 2012 20:29:44 +0000 (23:29 +0300)]
build: Add option to specify where gettext is (/usr/local by default)

This should help configure script to find gettext on FreeBSD and
(possibly) some other systems as well.

12 years agoEliminate dependency on an external uuid library.
Andriy Syrovenko [Sat, 26 May 2012 20:41:16 +0000 (23:41 +0300)]
Eliminate dependency on an external uuid library.

12 years agos3-build: Remove build of libaddns.a from the autoconf build
Andrew Bartlett [Tue, 22 May 2012 02:01:44 +0000 (12:01 +1000)]
s3-build: Remove build of libaddns.a from the autoconf build

We always link libaddns statically as part of the net object lists

This means that we no longer provide externally-available
libaddns, as the waf build declared this as a private library.

This never had a public API, .so or a header file.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat May 26 09:45:34 CEST 2012 on sn-devel-104

12 years agos3-utils: Use ads_do_search_retry in net ads search
Andrew Bartlett [Fri, 18 May 2012 12:02:57 +0000 (22:02 +1000)]
s3-utils: Use ads_do_search_retry in net ads search

This makes it possible to search against a slow server, as will
fallback from 1000 to (eventually) 125 users at a time.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat May 26 03:53:34 CEST 2012 on sn-devel-104

12 years agos3-libads: Use a reducing page size to try and cope with a slow LDAP server
Andrew Bartlett [Fri, 18 May 2012 12:01:14 +0000 (22:01 +1000)]
s3-libads: Use a reducing page size to try and cope with a slow LDAP server

If we cannot get 1000 users downloaded in 15seconds, try with 500, 250
and then 125 users at a time.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
12 years agos3-winbindd: Always map the LDAP error code to an NTSTATUS
Andrew Bartlett [Fri, 18 May 2012 07:40:59 +0000 (17:40 +1000)]
s3-winbindd: Always map the LDAP error code to an NTSTATUS

We do this so that we catch LDAP_TIMELIMIT_EXCEEDED as NT_STATUS_IO_TIMEOUT, which
has special handling in winbindd_cache.c

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
12 years agos3-libads: Map LDAP_TIMELIMIT_EXCEEDED as NT_STATUS_IO_TIMEOUT
Andrew Bartlett [Fri, 18 May 2012 07:38:48 +0000 (17:38 +1000)]
s3-libads: Map LDAP_TIMELIMIT_EXCEEDED as NT_STATUS_IO_TIMEOUT

This allows Samba to then handle this error in the same way it would for RPC connections

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
12 years agodns_hosts_file: move to a separate subsystem
Alexander Bokovoy [Fri, 25 May 2012 15:45:17 +0000 (18:45 +0300)]
dns_hosts_file: move to a separate subsystem

After discussion with Kai move dns_hosts_file to a separate subsystem
and merge it into libaddns private library for s3/s4 client use.

Also remove dependency in libcli/nbt, the code from libcli/dns subsystems
is not used there at all.

Autobuild-User: Alexander Bokovoy <ab@samba.org>
Autobuild-Date: Fri May 25 22:22:44 CEST 2012 on sn-devel-104

12 years agos3-configure.in: when ADS support is disabled, unset HAVE_GSSAPI
Alexander Bokovoy [Fri, 25 May 2012 10:25:12 +0000 (13:25 +0300)]
s3-configure.in: when ADS support is disabled, unset HAVE_GSSAPI

12 years agos3:selftest: run smbtorture3 CLEANUP3 in the s3dc:local environment
Stefan Metzmacher [Wed, 16 May 2012 07:11:40 +0000 (09:11 +0200)]
s3:selftest: run smbtorture3 CLEANUP3 in the s3dc:local environment

metze

Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri May 25 20:09:15 CEST 2012 on sn-devel-104

12 years agos3: Test whether get_share_mode_lock cleans up stale processes
Volker Lendecke [Fri, 11 May 2012 12:39:42 +0000 (14:39 +0200)]
s3: Test whether get_share_mode_lock cleans up stale processes

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3: Do not check the PIDs is parse_share_modes
Volker Lendecke [Mon, 7 May 2012 14:34:11 +0000 (16:34 +0200)]
s3: Do not check the PIDs is parse_share_modes

We do that when conflicts arise

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agoEnsure we only return NT_STATUS_DELETE_PENDING if the share modes are valid.
Jeremy Allison [Tue, 22 May 2012 19:28:04 +0000 (12:28 -0700)]
Ensure we only return NT_STATUS_DELETE_PENDING if the share modes are valid.

Ensure we only return *file_existed = true if there were valid share modes.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3: Check for serverid_exists in close_directory
Volker Lendecke [Mon, 7 May 2012 13:23:29 +0000 (15:23 +0200)]
s3: Check for serverid_exists in close_directory

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3: Check for serverid_exists in close_remove_share_mode
Volker Lendecke [Mon, 7 May 2012 13:23:29 +0000 (15:23 +0200)]
s3: Check for serverid_exists in close_remove_share_mode

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3: Be less picky on stale share mode entries
Volker Lendecke [Mon, 14 May 2012 12:57:34 +0000 (14:57 +0200)]
s3: Be less picky on stale share mode entries

If a process died, the share mode entry might be bogus. Ignore those entries.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3: Check for serverid_exists in find_oplock_types
Volker Lendecke [Mon, 7 May 2012 13:23:29 +0000 (15:23 +0200)]
s3: Check for serverid_exists in find_oplock_types

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3: Check for serverid_exists in rename_share_filename
Volker Lendecke [Mon, 7 May 2012 13:23:10 +0000 (15:23 +0200)]
s3: Check for serverid_exists in rename_share_filename

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3: Check for serverid_exists in smb_posix_unlink
Volker Lendecke [Mon, 7 May 2012 13:23:29 +0000 (15:23 +0200)]
s3: Check for serverid_exists in smb_posix_unlink

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3: Check for serverid_exists in open_mode_check
Volker Lendecke [Mon, 7 May 2012 13:23:10 +0000 (15:23 +0200)]
s3: Check for serverid_exists in open_mode_check

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3: Check for serverid_exists in notify_deferred_opens
Volker Lendecke [Mon, 7 May 2012 10:22:50 +0000 (12:22 +0200)]
s3: Check for serverid_exists in notify_deferred_opens

We will remove the check in parse_share_modes soon

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agoFix an invalid state only reachable on server crash/abort.
Jeremy Allison [Tue, 22 May 2012 19:27:06 +0000 (12:27 -0700)]
Fix an invalid state only reachable on server crash/abort.

Remove any delete-on-close tokens and clear the count if there are no
valid share modes.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3: Add "share_mode_stale_pid"
Volker Lendecke [Mon, 7 May 2012 10:57:07 +0000 (12:57 +0200)]
s3: Add "share_mode_stale_pid"

This is a helper routine that prunes a dead share mode entry on demand. This
prepares for removing the serverids_exist call in parse_share_modes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agoFix bug #8373 - Can't join XP Pro workstations to 3.6.1 DC.
Jeremy Allison [Fri, 25 May 2012 16:16:50 +0000 (09:16 -0700)]
Fix bug #8373 - Can't join XP Pro workstations to 3.6.1 DC.

Treat LIBNDR_FLAG_NOALIGN and LIBNDR_FLAG_REMAINING the same as the
other align flags - make them mutually exclusive.

Combined work from Metze, Günther and Jeremy.

12 years agos3:smbd: move global smbd_msg_state to smbXsrv_connection
Stefan Metzmacher [Thu, 24 May 2012 21:41:43 +0000 (23:41 +0200)]
s3:smbd: move global smbd_msg_state to smbXsrv_connection

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri May 25 11:01:27 CEST 2012 on sn-devel-104

12 years agos3:smbd: move global koplocks to smbd_server_connection
Stefan Metzmacher [Thu, 24 May 2012 21:33:32 +0000 (23:33 +0200)]
s3:smbd: move global koplocks to smbd_server_connection

metze

12 years agos3:smbd: pass smbd_server_connection to should_notify_deferred_opens()
Stefan Metzmacher [Thu, 24 May 2012 21:32:04 +0000 (23:32 +0200)]
s3:smbd: pass smbd_server_connection to should_notify_deferred_opens()

metze

12 years agos3:smbd: move global oplocks vars to smbd_server_connection
Stefan Metzmacher [Thu, 24 May 2012 21:15:08 +0000 (23:15 +0200)]
s3:smbd: move global oplocks vars to smbd_server_connection

metze

12 years agos3:smbd: remove unused get_number_of_exclusive_open_oplocks()
Stefan Metzmacher [Thu, 24 May 2012 21:06:26 +0000 (23:06 +0200)]
s3:smbd: remove unused get_number_of_exclusive_open_oplocks()

metze

12 years agomove VERSION to alpha22
Andrew Bartlett [Fri, 25 May 2012 00:20:46 +0000 (10:20 +1000)]
move VERSION to alpha22

We will change this to beta once we both fix the VERSION parsing scripts
and we agree that the next release will indeed be the beta.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri May 25 04:19:30 CEST 2012 on sn-devel-104

12 years agoWHATSNEW: update for alpha21, and mark as release save-diskspace-tags/samba-4.0.0alpha21
Andrew Bartlett [Fri, 25 May 2012 00:17:34 +0000 (10:17 +1000)]
WHATSNEW: update for alpha21, and mark as release

The plan has changed.  This will we hope be the last alpha.

Andrew Bartlett

12 years agowintest: s3fs is now the default in provision
Andrew Bartlett [Thu, 24 May 2012 22:52:47 +0000 (08:52 +1000)]
wintest: s3fs is now the default in provision

12 years agodoc: Explain our build systems for Samba 4.0
Andrew Bartlett [Thu, 24 May 2012 10:31:37 +0000 (20:31 +1000)]
doc: Explain our build systems for Samba 4.0

12 years agos3:smbd/signing: use smbd_server_connection as talloc parent for its smb1 signing...
Stefan Metzmacher [Mon, 12 Dec 2011 12:50:04 +0000 (13:50 +0100)]
s3:smbd/signing: use smbd_server_connection as talloc parent for its smb1 signing state

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri May 25 00:23:53 CEST 2012 on sn-devel-104

12 years agos3-passdb: Fix negative SID->uid/gid/both cache handling
Ira Cooper [Thu, 24 May 2012 01:42:26 +0000 (21:42 -0400)]
s3-passdb: Fix negative SID->uid/gid/both cache handling

-1 uid/gid/both signals a non existent uid/gid/both.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:smbd: remove global 'smbd_server_conn' !!!
Stefan Metzmacher [Thu, 24 May 2012 11:46:11 +0000 (13:46 +0200)]
s3:smbd: remove global 'smbd_server_conn' !!!

For now we still use a global 'global_smbXsrv_connection'
in order to pass the connection state to exit_server*().

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu May 24 20:07:20 CEST 2012 on sn-devel-104

12 years agos3:smbd: only call file_init_global() in the parent smbd
Stefan Metzmacher [Thu, 24 May 2012 10:26:46 +0000 (12:26 +0200)]
s3:smbd: only call file_init_global() in the parent smbd

metze

12 years agos3:smbd/files: split file_init_global() out of file_init()
Stefan Metzmacher [Thu, 24 May 2012 10:20:30 +0000 (12:20 +0200)]
s3:smbd/files: split file_init_global() out of file_init()

metze

12 years agos3:smbd: remove unused var in smbXsrv_connection_init_tables()
Stefan Metzmacher [Thu, 24 May 2012 10:41:20 +0000 (12:41 +0200)]
s3:smbd: remove unused var in smbXsrv_connection_init_tables()

metze

12 years agos4:smb_server/smb: fix talloc_free() bug
Stefan Metzmacher [Thu, 24 May 2012 09:57:02 +0000 (11:57 +0200)]
s4:smb_server/smb: fix talloc_free() bug

ERROR: talloc_free with references at ../source4/smb_server/smb/receive.c:637
        reference at ../source4/ntvfs/posix/pvfs_wait.c:86

metze

12 years agowaf: for MIT krb5 build require kerberos version above 1.9
Alexander Bokovoy [Thu, 24 May 2012 13:28:31 +0000 (16:28 +0300)]
waf: for MIT krb5 build require kerberos version above 1.9

MIT krb5 implementation provides sufficient support for features
used in Samba 4 starting with 1.9. Require version above when using
system MIT krb5 build.

Autobuild-User: Alexander Bokovoy <ab@samba.org>
Autobuild-Date: Thu May 24 18:15:36 CEST 2012 on sn-devel-104

12 years agos3-smbldap: Add API for external callback to perform LDAP bind in smbldap
Alexander Bokovoy [Thu, 24 May 2012 12:38:41 +0000 (15:38 +0300)]
s3-smbldap: Add API for external callback to perform LDAP bind in smbldap

In order to support other bind methods, introduce a generic bind callback.
When smbldap_state.bind_callback is set, it means there is an alternative
way to perform LDAP bind to ldap_simple_bind_s() so call it instead.
The call is wrapped in become_root()/unbecome_root() to allow proper permissions
in smbd to access needed resources in the callback, for example, credential caches.
When run outside smbd, become_root()/unbecome_root() are no-op.

The API expectation is similar to ldap_simple_bind_s().

A caller of smbldap API can pass additional information to the callback by setting
smbldap_state.bind_callback_data pointer.

Both callback and the data pointer elements of smbldap_state structure get
cleaned up if someone sets proper credentials on smbldap_state with
smbldap_set_creds() so if you are interested in using smbldap_state.bind_dn
with the callback, make sure to set callback after credentials are set.

12 years agos4/scripting: in MIT build do not install samba-tool, it is not usable yet
Alexander Bokovoy [Thu, 24 May 2012 12:24:12 +0000 (15:24 +0300)]
s4/scripting: in MIT build do not install samba-tool, it is not usable yet

12 years agos4-selftest: Demonstrate the correct behaviour between specified usernames and kerber...
Andrew Bartlett [Thu, 24 May 2012 03:36:20 +0000 (13:36 +1000)]
s4-selftest: Demonstrate the correct behaviour between specified usernames and kerberos ccache

This shows that a username/password on the command line must always
override any credentials cache in the environment.

Andrew Bartlett

12 years agoauth/credentials: 'workgroup' set via command line will not drop existing ccache
Alexander Bokovoy [Thu, 24 May 2012 12:17:40 +0000 (15:17 +0300)]
auth/credentials: 'workgroup' set via command line will not drop existing ccache

The root cause for existing ccache being invalidated was use of global loadparm with
'workgroup' value set as if from command line. However, we don't really need to take
'workgroup' parameter value's nature into account when invalidating existing ccache.
When -U is used on the command line, one can specify a password to force ccache
invalidation.

The commit also reverts previous fix now that root cause is clear.

12 years agos3:smbd/msdfs: pass allow_broken_path to resolve_dfspath_wcard()
Stefan Metzmacher [Wed, 23 May 2012 11:22:47 +0000 (13:22 +0200)]
s3:smbd/msdfs: pass allow_broken_path to resolve_dfspath_wcard()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu May 24 16:14:01 CEST 2012 on sn-devel-104

12 years agos3:smbd/msdfs: pass 'allow_broken_path' to get_referred_path()
Stefan Metzmacher [Wed, 23 May 2012 11:09:40 +0000 (13:09 +0200)]
s3:smbd/msdfs: pass 'allow_broken_path' to get_referred_path()

Note the DCERPC code should not be smb2 specific!

I wonder why this is at all smb2 specific...

metze

12 years agos3:smbd/msdfs: let create_conn_struct() also fake the 'smbd_server_connection'
Stefan Metzmacher [Wed, 23 May 2012 11:06:55 +0000 (13:06 +0200)]
s3:smbd/msdfs: let create_conn_struct() also fake the 'smbd_server_connection'

metze

12 years agos3:smbd/files: work without sconn->file_bmap and assign fsp->fnum = -1
Stefan Metzmacher [Thu, 24 May 2012 08:43:56 +0000 (10:43 +0200)]
s3:smbd/files: work without sconn->file_bmap and assign fsp->fnum = -1

For faked connection_structs we do not need valid fnum values,
e.g. in the dfs and printing code.

metze

12 years agos3:smbd/files: fix error path and correctly cleanup
Stefan Metzmacher [Thu, 24 May 2012 09:22:11 +0000 (11:22 +0200)]
s3:smbd/files: fix error path and correctly cleanup

metze

12 years agoselftest: Run only the samba3 tests on builds without the AD DC
Andrew Bartlett [Thu, 24 May 2012 06:53:34 +0000 (16:53 +1000)]
selftest: Run only the samba3 tests on builds without the AD DC

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu May 24 11:51:40 CEST 2012 on sn-devel-104

12 years agoWHATSNEW: Move to document changes for beta1
Andrew Bartlett [Thu, 24 May 2012 06:30:00 +0000 (16:30 +1000)]
WHATSNEW: Move to document changes for beta1

This is not the beta1 release, but this is the preperation for such a release.

Andrew Bartlett

12 years agos4-provision: Make s3fs the default way to install a new Samba4 DC
Andrew Bartlett [Thu, 24 May 2012 04:56:27 +0000 (14:56 +1000)]
s4-provision: Make s3fs the default way to install a new Samba4 DC

With s3fs now well settled into master, we now throw the swtich and make
it the default.

There is still much to do, but we need to be using s3fs by default to
find out exactly what that is.

Andrew Bartlett

12 years agos4-selftest: Always delete the user at the end of test_passwords.sh
Andrew Bartlett [Thu, 24 May 2012 03:37:09 +0000 (13:37 +1000)]
s4-selftest: Always delete the user at the end of test_passwords.sh

If this test is run in the "dc" environment (rather than "dc:local") is would not delete the
test user.

Andrew Bartlett

12 years agodlz_bind9: Make the talloc destructor static and return 0.
Amitay Isaacs [Wed, 23 May 2012 01:53:59 +0000 (11:53 +1000)]
dlz_bind9: Make the talloc destructor static and return 0.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Thu May 24 03:32:50 CEST 2012 on sn-devel-104