nivanova/samba-autobuild/.git
10 years agosamba-tool domain provision: Make ldap_backend_startup.sh +x and take optional arguments
Andrew Bartlett [Mon, 16 Sep 2013 16:35:39 +0000 (09:35 -0700)]
samba-tool domain provision: Make ldap_backend_startup.sh +x and take optional arguments

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
10 years agosamba-tool domain join: Set server role correctly to "active directory domain controller"
Andrew Bartlett [Mon, 9 Sep 2013 00:15:36 +0000 (12:15 +1200)]
samba-tool domain join: Set server role correctly to "active directory domain controller"

We changed the magic string when we reworked the list of server roles.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Sep 16 23:33:41 CEST 2013 on sn-devel-104

10 years agos4-rpc_server/drsuapi: Print ldb error showing why we failed to perform the access...
Andrew Bartlett [Sun, 8 Sep 2013 21:57:27 +0000 (09:57 +1200)]
s4-rpc_server/drsuapi: Print ldb error showing why we failed to perform the access check

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agosamba-tool domian join: Only print adminpass warning on subdomain creation
Andrew Bartlett [Sun, 8 Sep 2013 21:56:58 +0000 (09:56 +1200)]
samba-tool domian join: Only print adminpass warning on subdomain creation

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agosamba-tool domain join: Add --quite and --verbose
Andrew Bartlett [Sun, 8 Sep 2013 21:53:37 +0000 (09:53 +1200)]
samba-tool domain join: Add --quite and --verbose

This means we now use logger consistently between doimin join, domain dcpromo
and domain provision.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agodsdb: Use dsdb_next_callback() rather than a no-op per-module callback
Andrew Bartlett [Fri, 6 Sep 2013 03:46:36 +0000 (15:46 +1200)]
dsdb: Use dsdb_next_callback() rather than a no-op per-module callback

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agojoin.py: Restore support for joining as a subdomain
Andrew Bartlett [Fri, 6 Sep 2013 03:46:05 +0000 (15:46 +1200)]
join.py: Restore support for joining as a subdomain

This set of patches fixes up the errors that were introduced into the partial support
during the past couple of years.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agodsdb: Add DSDB_SEARCH_ONE_ONLY support to dsdb_module_search*()
Andrew Bartlett [Fri, 6 Sep 2013 03:39:50 +0000 (15:39 +1200)]
dsdb: Add DSDB_SEARCH_ONE_ONLY support to dsdb_module_search*()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agojoin.py: Handle more error cases with useful exceptions
Andrew Bartlett [Fri, 6 Sep 2013 03:38:36 +0000 (15:38 +1200)]
join.py: Handle more error cases with useful exceptions

This will help track down strange failures in the future.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agosamba-tool domain join subdomain: Set "reveal_internals:0" control so we can see...
Andrew Bartlett [Mon, 16 Sep 2013 17:23:07 +0000 (10:23 -0700)]
samba-tool domain join subdomain: Set "reveal_internals:0" control so we can see the ncName

The issue here is that we create the ncName remotely with DsAddEntry,
and then replicate it back.  However, at this point the naming context
pointed at by the ncName does not exist!  The issue is that the
extended_dn_out module then hides the link, because it points to a
missing object.  The reveal_internals control forces this link to be
returned, and so we can then find the GUID, to create the domain with
the right GUID.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoldb: Show the type of failing operation in default error message
Andrew Bartlett [Fri, 6 Sep 2013 03:37:30 +0000 (15:37 +1200)]
ldb: Show the type of failing operation in default error message

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agojoin.py: Show which database we failed to find the DN on (clarify local v remote)
Andrew Bartlett [Wed, 4 Sep 2013 01:03:37 +0000 (13:03 +1200)]
join.py: Show which database we failed to find the DN on (clarify local v remote)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agojoin.py: Handle exceptions when looking for GUID in a DN
Andrew Bartlett [Tue, 3 Sep 2013 05:41:42 +0000 (17:41 +1200)]
join.py: Handle exceptions when looking for GUID in a DN

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agotdb: Fix some typos in comments.
Björn Jacke [Thu, 12 Sep 2013 09:07:17 +0000 (11:07 +0200)]
tdb: Fix some typos in comments.

Thanks to Stewart A. Levin for reporting.

fixes bug #10136 (Documentation typos).

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Karolin Seeger <kseeger@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Thu Sep 12 13:54:41 CEST 2013 on sn-devel-104

10 years agodocs: Fix typos.
Karolin Seeger [Thu, 12 Sep 2013 07:20:03 +0000 (09:20 +0200)]
docs: Fix typos.

This is a follow-up patch for bug #10134 - Samba 4.0 is stricter in checking
acls for "open for execution".

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Sep 12 11:59:56 CEST 2013 on sn-devel-104

10 years agosmbd: Properly protect against invalid lock data
Volker Lendecke [Wed, 11 Sep 2013 12:04:58 +0000 (12:04 +0000)]
smbd: Properly protect against invalid lock data

If someone messes with brlock.tdb and inserts an invalid record length,
this will lead to memcpy overwriting a few bytes behind malloc'ed data.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Sep 12 03:26:45 CEST 2013 on sn-devel-104

10 years agoFix is_legal_name() to not emit character conversion error messages.
Jeremy Allison [Tue, 10 Sep 2013 17:46:18 +0000 (10:46 -0700)]
Fix is_legal_name() to not emit character conversion error messages.

Using next_codepoint() does the same check, but without the conversion
message.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agoselftest: change to src dir for panic backtrace
David Disseldorp [Wed, 11 Sep 2013 15:56:02 +0000 (17:56 +0200)]
selftest: change to src dir for panic backtrace

When running selftest against a Samba3 target, the working directory is
set to st/s3dc/share. The existing "panic action" script attempts
obtain a backtrace for a paniced smbd process using GDB, which does not
locate debug info relative to the working directory.

This commit changes the S3 selftest panic action to first enter
the base source directory before attempting to obtain the backtrace,
ensuring that GDB can locate the debug info.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Sep 12 00:19:39 CEST 2013 on sn-devel-104

10 years agodsdb: When using an LDAP backend, force use of the password from secrets.ldb
Andrew Bartlett [Mon, 9 Sep 2013 23:38:10 +0000 (11:38 +1200)]
dsdb: When using an LDAP backend, force use of the password from secrets.ldb

This makes testing from the command line much easier, as ldbsearch -H
sam.ldb will now just work as well as it did with a tdb-based
provision.

This code was removed from it's previous location outside the ldb
module stack in aabda85a2fc9f6763abd56d61ff819012f2225ad.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Nadezhda Ivanova <nivanova@symas.com>
Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date(master): Wed Sep 11 21:15:50 CEST 2013 on sn-devel-104

10 years agosmbd: Convert br_lck->lock_data to talloc
Volker Lendecke [Tue, 10 Sep 2013 19:04:47 +0000 (21:04 +0200)]
smbd: Convert br_lck->lock_data to talloc

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Sep 11 10:15:38 CEST 2013 on sn-devel-104

10 years agosmbd: Move "struct byte_range_lock" definition to brlock.c
Volker Lendecke [Tue, 10 Sep 2013 17:42:06 +0000 (19:42 +0200)]
smbd: Move "struct byte_range_lock" definition to brlock.c

10 years agosmbd: Add brl_fsp access function
Volker Lendecke [Tue, 10 Sep 2013 17:41:32 +0000 (19:41 +0200)]
smbd: Add brl_fsp access function

10 years agosmbd: Add brl_num_locks access function
Volker Lendecke [Tue, 10 Sep 2013 17:40:43 +0000 (19:40 +0200)]
smbd: Add brl_num_locks access function

10 years agosmbd: Use ZERO_STRUCT instead of memset
Volker Lendecke [Tue, 10 Sep 2013 12:04:42 +0000 (12:04 +0000)]
smbd: Use ZERO_STRUCT instead of memset

10 years agosmbd: Fix a typo
Volker Lendecke [Tue, 10 Sep 2013 12:01:58 +0000 (12:01 +0000)]
smbd: Fix a typo

10 years agosmbd: Make brl_lock_failed static
Volker Lendecke [Tue, 10 Sep 2013 11:41:39 +0000 (11:41 +0000)]
smbd: Make brl_lock_failed static

10 years agosmbd: Make brl_same_context static
Volker Lendecke [Tue, 10 Sep 2013 11:39:52 +0000 (11:39 +0000)]
smbd: Make brl_same_context static

10 years agosmbd: Fix blank line endings
Volker Lendecke [Tue, 10 Sep 2013 11:35:01 +0000 (11:35 +0000)]
smbd: Fix blank line endings

10 years agoRaise the level of a debug.
Korobkin [Tue, 10 Sep 2013 23:20:27 +0000 (16:20 -0700)]
Raise the level of a debug.

Bug #10118 - Samba is chatty about being unable to open a printer

Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep 11 03:10:08 CEST 2013 on sn-devel-104

10 years agodocs: document "acl allow execute always"
Michael Adam [Mon, 2 Sep 2013 14:54:15 +0000 (16:54 +0200)]
docs: document "acl allow execute always"

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Sep 11 01:21:00 CEST 2013 on sn-devel-104

10 years agos3:smbd: ease file server upgrades from 3.6 and earlier with "acl allow execute aways"
Michael Adam [Mon, 2 Sep 2013 15:37:50 +0000 (17:37 +0200)]
s3:smbd: ease file server upgrades from 3.6 and earlier with "acl allow execute aways"

3.6 and earlier allowed open for execution when execute permissions are
not present on a file. This has been fixed in Samba 4.0.

This patch changes smbd to skip the execute bit from the ACL check
in the open code if "acl allow execute always = yes", hence
re-establishing the old behaviour in this case.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agoloadparm: add new parameter "acl allow execute always"
Michael Adam [Mon, 2 Sep 2013 15:36:59 +0000 (17:36 +0200)]
loadparm: add new parameter "acl allow execute always"

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3:smb2_find: Return that timestamps do not exist as directories
Christof Schmitt [Thu, 29 Aug 2013 17:36:00 +0000 (19:36 +0200)]
s3:smb2_find: Return that timestamps do not exist as directories

When a Windows client receives a large directory listing while
querying snapshots, it sends a find request asking for the
timestamp as a directory. A Windows server returns NO_SUCH_FILE,
so make sure Samba returns the same. Otherwise the client will
get confused and display timestamps in the 'previous versions' dialog.

Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Sep 10 22:38:51 CEST 2013 on sn-devel-104

10 years agolib: serverid.h needs "struct db_record" declaration
Volker Lendecke [Tue, 10 Sep 2013 18:11:38 +0000 (20:11 +0200)]
lib: serverid.h needs "struct db_record" declaration

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3: rpc_server/srvsvc: use find_sessions() in NetSessDel
Shekhar Amlekar [Mon, 3 Jun 2013 07:32:19 +0000 (13:02 +0530)]
s3: rpc_server/srvsvc: use find_sessions() in NetSessDel

instead of using list_sessions(), use find_sessions() that
builds the list of only the sessions of interest.

Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smbd/session: Added a routine find_sessions()
Shekhar Amlekar [Tue, 10 Sep 2013 06:28:07 +0000 (11:58 +0530)]
s3:smbd/session: Added a routine find_sessions()

this routine builds a list of sessions from a
particular remote machine or user.

Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smbd/session: add filters to gather_sessioninfo()
Shekhar Amlekar [Tue, 10 Sep 2013 05:09:03 +0000 (10:39 +0530)]
s3:smbd/session: add filters to gather_sessioninfo()

added capability to filter sessions based on remote
machine name and user name.

Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agodoc: Update documentation of pam_winbind krb5 support.
Andreas Schneider [Tue, 10 Sep 2013 07:43:32 +0000 (09:43 +0200)]
doc: Update documentation of pam_winbind krb5 support.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Sep 10 15:35:20 CEST 2013 on sn-devel-104

10 years agos3-winbind: Add support for the kernel krb5 keyring buffer.
Andreas Schneider [Tue, 10 Sep 2013 07:30:04 +0000 (09:30 +0200)]
s3-winbind: Add support for the kernel krb5 keyring buffer.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3-winbind: Don't set a default directory for DIR.
Andreas Schneider [Tue, 10 Sep 2013 07:28:50 +0000 (09:28 +0200)]
s3-winbind: Don't set a default directory for DIR.

There is not default so you should always have to specify a directory in
the config file.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agoldb: Do not build libldb-cmdline when using system ldb.
Jeroen Dekkers [Sun, 8 Sep 2013 22:42:39 +0000 (00:42 +0200)]
ldb: Do not build libldb-cmdline when using system ldb.

Cleanup leftover include and linking of libldb-cmdline in
oLschema2ldif. Do not build libldb-cmdline anymore when using the
system ldb, oLschema2ldif was the only reason for building
libldb-cmdline.

Signed-off-by: Jeroen Dekkers <jeroen@dekkers.ch>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Sep 10 12:52:26 CEST 2013 on sn-devel-104

10 years agogencache: Avoid a duplicate call to string_term_tdb_data
Volker Lendecke [Sun, 8 Sep 2013 11:29:33 +0000 (13:29 +0200)]
gencache: Avoid a duplicate call to string_term_tdb_data

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Sep  9 17:02:28 CEST 2013 on sn-devel-104

10 years agotevent: Use talloc_pooled_object for tevent_req_create
Volker Lendecke [Fri, 6 Sep 2013 22:37:56 +0000 (15:37 -0700)]
tevent: Use talloc_pooled_object for tevent_req_create

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun Sep  8 13:39:25 CEST 2013 on sn-devel-104

10 years agosmbd: Use talloc_pooled_object in cp_smb_filename
Volker Lendecke [Fri, 6 Sep 2013 22:34:44 +0000 (15:34 -0700)]
smbd: Use talloc_pooled_object in cp_smb_filename

Requires new talloc

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotalloc: Test the pooled object talloc-2.1.0
Volker Lendecke [Fri, 6 Sep 2013 22:30:38 +0000 (15:30 -0700)]
talloc: Test the pooled object

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agotalloc: Add talloc_pooled_object
Volker Lendecke [Fri, 6 Sep 2013 22:15:32 +0000 (15:15 -0700)]
talloc: Add talloc_pooled_object

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotalloc: Allow nested pools.
Volker Lendecke [Fri, 6 Sep 2013 21:52:28 +0000 (14:52 -0700)]
talloc: Allow nested pools.

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
10 years agotalloc: Add a separate pool size
Volker Lendecke [Fri, 6 Sep 2013 21:20:20 +0000 (14:20 -0700)]
talloc: Add a separate pool size

This is necessary to allow talloc pools to be objects on their own. It
is an incompatible change in the sense that talloc_get_size(pool) now
returns 0 instead of the pool size. When the talloc_pooled_object()
call is added, this will start to make sense again.

Maybe we should add a talloc_pool_size call? Or is that overkill?

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agotalloc: Put pool-specific data before the chunk
Volker Lendecke [Fri, 6 Sep 2013 21:08:43 +0000 (14:08 -0700)]
talloc: Put pool-specific data before the chunk

This is a preparation to make talloc pool real objects themselves.

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
10 years agotalloc: Introduce __talloc_with_prefix
Volker Lendecke [Fri, 6 Sep 2013 19:18:26 +0000 (12:18 -0700)]
talloc: Introduce __talloc_with_prefix

This will allow to exchange the extra talloc pool header with the
talloc_chunk structure

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
10 years agotalloc: Decouple the dual use of chunk->pool
Volker Lendecke [Fri, 6 Sep 2013 17:54:43 +0000 (10:54 -0700)]
talloc: Decouple the dual use of chunk->pool

If we want nested pools, we will have pools that are pool members. So
we will have to have a separate "next object" pointer  for pools. As
we have struct talloc_pool_chunk now, this additional pointer does not
affect normal talloc objects.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3: include/smb : changing smb server version
Shekhar Amlekar [Tue, 9 Jul 2013 08:56:49 +0000 (14:26 +0530)]
s3: include/smb : changing smb server version

changing smb server version from 4.9 to 6.1 to
mimic win2k8r2.

Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep  6 19:41:51 CEST 2013 on sn-devel-104

10 years agosmbd: Slightly simplify enum_file_close_fn
Volker Lendecke [Mon, 2 Sep 2013 09:09:16 +0000 (09:09 +0000)]
smbd: Slightly simplify enum_file_close_fn

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Sep  6 15:29:55 CEST 2013 on sn-devel-104

10 years agosmbd: Slightly simplify do_break_to_none
Volker Lendecke [Mon, 2 Sep 2013 09:08:04 +0000 (09:08 +0000)]
smbd: Slightly simplify do_break_to_none

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agosmbd: Slightly simplify send_break_message
Volker Lendecke [Mon, 2 Sep 2013 09:06:13 +0000 (09:06 +0000)]
smbd: Slightly simplify send_break_message

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agosmbd: Remove a silly "? true : false"
Volker Lendecke [Mon, 2 Sep 2013 09:40:46 +0000 (09:40 +0000)]
smbd: Remove a silly "? true : false"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agosmbd: Apply some const to message_to_share_mode_entry
Volker Lendecke [Tue, 3 Sep 2013 11:55:27 +0000 (11:55 +0000)]
smbd: Apply some const to message_to_share_mode_entry

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agolib: Apply some const to pull_file_id_24
Volker Lendecke [Tue, 3 Sep 2013 11:51:48 +0000 (11:51 +0000)]
lib: Apply some const to pull_file_id_24

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agosmbd: Fix a const warning
Volker Lendecke [Thu, 29 Aug 2013 14:53:01 +0000 (14:53 +0000)]
smbd: Fix a const warning

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agosmbd: Remove two confusing TALLOC_FREE calls
Volker Lendecke [Tue, 3 Sep 2013 09:23:39 +0000 (09:23 +0000)]
smbd: Remove two confusing TALLOC_FREE calls

We don't have lck allocated yet at these points. Remove the TALLOC_FREE
calls that triggered me looking for the get_share_mode_lock calls.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agosmbd: Remove unused should_notify_deferred_opens
Volker Lendecke [Tue, 3 Sep 2013 14:44:45 +0000 (14:44 +0000)]
smbd: Remove unused should_notify_deferred_opens

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agosmbd: Apply some const to find_share_mode_entry
Volker Lendecke [Tue, 3 Sep 2013 14:40:58 +0000 (14:40 +0000)]
smbd: Apply some const to find_share_mode_entry

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agosmbd: Apply some const to share_modes_identical
Volker Lendecke [Tue, 3 Sep 2013 14:40:35 +0000 (14:40 +0000)]
smbd: Apply some const to share_modes_identical

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agosmbd: Simplify find_share_mode_entry
Volker Lendecke [Tue, 3 Sep 2013 14:38:47 +0000 (14:38 +0000)]
smbd: Simplify find_share_mode_entry

There's no point checking the validity of the "entry" argument more
than once

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agosmbd: Remove FORCE_OPLOCK_BREAK_TO_NONE
Volker Lendecke [Wed, 4 Sep 2013 15:26:30 +0000 (17:26 +0200)]
smbd: Remove FORCE_OPLOCK_BREAK_TO_NONE

This flag existed to break an exclusive or batch oplock in just one
instead of two steps down to "no oplock" when we did an allocation or file
size change.  Running raw.oplock against W2k12 differs in this respect
from W2k3: W2k12 takes two steps (via level2) to break to none. This
removes the special flag that we only had for compatibility with systems
older than W2k12...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep  6 00:47:07 CEST 2013 on sn-devel-104

10 years agotorture: Adapt raw.oplock to w2k12
Volker Lendecke [Thu, 5 Sep 2013 13:03:56 +0000 (13:03 +0000)]
torture: Adapt raw.oplock to w2k12

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotorture: Add a new w2k12 target
Volker Lendecke [Thu, 5 Sep 2013 12:03:07 +0000 (12:03 +0000)]
torture: Add a new w2k12 target

W2k12 seems to do the 2-step break to none, try running raw.oplock.batch12
against it.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agosmbd: Fix breaking level2 on allocate
Volker Lendecke [Thu, 5 Sep 2013 10:33:21 +0000 (10:33 +0000)]
smbd: Fix breaking level2 on allocate

This needs doing even if we don't have strct allocate set. The client
should not know that we lied. Fixes smb2.oplock.batch12.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolib: Use "mem_ctx" arg in gencache_get
Volker Lendecke [Wed, 4 Sep 2013 06:57:59 +0000 (08:57 +0200)]
lib: Use "mem_ctx" arg in gencache_get

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Sep  5 20:09:21 CEST 2013 on sn-devel-104

10 years agoAdd a talloc context to sitename_fetch().
Jeremy Allison [Wed, 4 Sep 2013 20:58:18 +0000 (13:58 -0700)]
Add a talloc context to sitename_fetch().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agoAdd a talloc context to saf_fetch().
Jeremy Allison [Wed, 4 Sep 2013 20:39:31 +0000 (13:39 -0700)]
Add a talloc context to saf_fetch().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agolib: Add a "mem_ctx" arg to gencache_get (unused so far)
Volker Lendecke [Wed, 4 Sep 2013 06:56:23 +0000 (08:56 +0200)]
lib: Add a "mem_ctx" arg to gencache_get (unused so far)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agogencache: Fix SAFE_FREE vs data_blob_free
Volker Lendecke [Wed, 4 Sep 2013 06:46:34 +0000 (08:46 +0200)]
gencache: Fix SAFE_FREE vs data_blob_free

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotorture3: Test getting a blob as a string
Volker Lendecke [Wed, 4 Sep 2013 06:44:50 +0000 (08:44 +0200)]
torture3: Test getting a blob as a string

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolib: Add "mem_ctx" to gencache_get_data_blob
Volker Lendecke [Wed, 4 Sep 2013 06:22:43 +0000 (08:22 +0200)]
lib: Add "mem_ctx" to gencache_get_data_blob

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotorture3: Fix a const warning
Volker Lendecke [Wed, 4 Sep 2013 06:22:08 +0000 (08:22 +0200)]
torture3: Fix a const warning

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agosmbd: Add a paranoia check to oplock_timeout_handler
Volker Lendecke [Wed, 4 Sep 2013 12:20:00 +0000 (14:20 +0200)]
smbd: Add a paranoia check to oplock_timeout_handler

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep  4 22:36:24 CEST 2013 on sn-devel-104

10 years agosmbd: Fix an ancient oplock bug
Volker Lendecke [Wed, 4 Sep 2013 11:57:00 +0000 (13:57 +0200)]
smbd: Fix an ancient oplock bug

If we get an oplock break response, we forgot to remove the oplock break
timeout.

Found by stopping raw.oplock.exclusive5 after the 2nd open and watching a debug
level 10 log. This amends 08a9de89 from 2007.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotorture: Ensure that GSSAPI and SPNEGO packets are accepted by dlz_bind9
Andrew Bartlett [Fri, 28 Dec 2012 10:00:28 +0000 (21:00 +1100)]
torture: Ensure that GSSAPI and SPNEGO packets are accepted by dlz_bind9

This exercises some more of the dlz_bind9 code outside BIND, by
sending in a ticket to be access checked, wrapped either in SPNEGO or
just in GSSAPI.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Sep  4 11:25:10 CEST 2013 on sn-devel-104

10 years agoselftest: Add a basic test of samba_upgradedns
Andrew Bartlett [Thu, 27 Dec 2012 23:06:39 +0000 (10:06 +1100)]
selftest: Add a basic test of samba_upgradedns

This does not check that the command runs correctly, but does at least check
that the command runs to completion without errors.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoselftest: Start internal DNS server on domain provisioned for BIND9_DLZ
Andrew Bartlett [Thu, 27 Dec 2012 22:25:11 +0000 (09:25 +1100)]
selftest: Start internal DNS server on domain provisioned for BIND9_DLZ

This shows that the internal server can use the dns-SERVER account.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
10 years agoselftest: Test creation of the dns-SERVER account during selftest
Andrew Bartlett [Tue, 25 Dec 2012 23:03:47 +0000 (10:03 +1100)]
selftest: Test creation of the dns-SERVER account during selftest

We do this by having the samba-tool domain dcpromo for promoted_vampire_dc also create a
dns-SERVER account.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
10 years agoscripting/samba_upgradedns: Tighten up exception and attribute list handling
Andrew Bartlett [Sun, 23 Dec 2012 22:12:04 +0000 (09:12 +1100)]
scripting/samba_upgradedns: Tighten up exception and attribute list handling

This avoids asking for attributes that will not be used, and looks only for the
expected exceptions, rather than all exceptions.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
10 years agoscripting/join.py: Handle creating the dns-NAME account during a DC join
Andrew Bartlett [Sun, 23 Dec 2012 21:56:50 +0000 (08:56 +1100)]
scripting/join.py: Handle creating the dns-NAME account during a DC join

This will ensure that the DLZ plugin works out of the box when joining a second Samba DC to the
domain.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
10 years agoOptimization. Don't do the retry logic if sitename_fetch() returned NULL, we already...
Jeremy Allison [Tue, 3 Sep 2013 21:07:43 +0000 (14:07 -0700)]
Optimization. Don't do the retry logic if sitename_fetch() returned NULL, we already did a NULL query.

Bug 5917 - Samba does not work on site with Read Only Domain Controller

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Sep  4 01:19:05 CEST 2013 on sn-devel-104

10 years agoMove the retry logic when site_name is passed in a NULL or "" to the wrapper function.
Jeremy Allison [Tue, 3 Sep 2013 19:20:52 +0000 (12:20 -0700)]
Move the retry logic when site_name is passed in a NULL or "" to the wrapper function.

Bug 5917 - Samba does not work on site with Read Only Domain Controller

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
10 years agoMove the manipulation of site_name into the caller function dsgetdcname().
Jeremy Allison [Tue, 3 Sep 2013 19:08:46 +0000 (12:08 -0700)]
Move the manipulation of site_name into the caller function dsgetdcname().

Leave dsgetdcname_internal() only using const char *site_name.

Bug 5917 - Samba does not work on site with Read Only Domain Controller

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
10 years agoRefactor dsgetdcname to be called via a wrapper function.
Jeremy Allison [Tue, 3 Sep 2013 19:04:37 +0000 (12:04 -0700)]
Refactor dsgetdcname to be called via a wrapper function.

Bug 5917 - Samba does not work on site with Read Only Domain Controller

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
10 years agodsgetdcname_cache_fetch() doesn't use the site_name parameter so don't pass it.
Jeremy Allison [Tue, 3 Sep 2013 19:13:45 +0000 (12:13 -0700)]
dsgetdcname_cache_fetch() doesn't use the site_name parameter so don't pass it.

Bug 5917 - Samba does not work on site with Read Only Domain Controller

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
10 years agotorture3: Trigger a nasty cleanup bug in smbd
Volker Lendecke [Sun, 1 Sep 2013 16:54:59 +0000 (18:54 +0200)]
torture3: Trigger a nasty cleanup bug in smbd

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Sep  3 19:13:14 CEST 2013 on sn-devel-104

10 years agosmbd: Fix flawed share_mode_stale_pid API
Volker Lendecke [Fri, 30 Aug 2013 12:49:43 +0000 (12:49 +0000)]
smbd: Fix flawed share_mode_stale_pid API

The comment for this routine said:

> Modifies d->num_share_modes, watch out in routines iterating over
> that array.

Well, it turns out that *every* caller of this API got it wrong. So I
think it's better to change the routine.

This leaves the array untouched while iterating but filters out the
deleted ones while saving them back to disk.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agosmbd: Rename parameter "i" to "idx"
Volker Lendecke [Fri, 30 Aug 2013 12:27:36 +0000 (12:27 +0000)]
smbd: Rename parameter "i" to "idx"

We'll need "i" in a later checkin ... :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agosmbd: Don't store in-memory only flags in locking.tdb
Volker Lendecke [Sun, 1 Sep 2013 09:07:19 +0000 (11:07 +0200)]
smbd: Don't store in-memory only flags in locking.tdb

Hey, pidl knows the [skip] attribute ... :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agosmbd: Simplify find_oplock_types
Volker Lendecke [Thu, 22 Aug 2013 08:49:07 +0000 (08:49 +0000)]
smbd: Simplify find_oplock_types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agodocs: fix a typo on the description of "acl check permissions"
Michael Adam [Mon, 2 Sep 2013 14:53:48 +0000 (16:53 +0200)]
docs: fix a typo on the description of "acl check permissions"

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Sep  2 23:03:01 CEST 2013 on sn-devel-104

10 years agopython/provision: remove unused linklocal=False argument from interface_ips_v6()
Stefan Metzmacher [Fri, 30 Aug 2013 13:18:44 +0000 (15:18 +0200)]
python/provision: remove unused linklocal=False argument from interface_ips_v6()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Bjoern Jacke <bj@sernet.de>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Aug 30 17:33:58 CEST 2013 on sn-devel-104

10 years agos4:samba_upgradedns: don't pass linklocal=False to interface_ips_v6()
Stefan Metzmacher [Fri, 30 Aug 2013 13:17:59 +0000 (15:17 +0200)]
s4:samba_upgradedns: don't pass linklocal=False to interface_ips_v6()

This is the default...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Bjoern Jacke <bj@sernet.de>
10 years agopython/pyglue: filter out loopback and linklocal addresses unless all_interfaces...
Stefan Metzmacher [Fri, 30 Aug 2013 12:59:01 +0000 (14:59 +0200)]
python/pyglue: filter out loopback and linklocal addresses unless all_interfaces is given

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Bjoern Jacke <bj@sernet.de>
10 years agovfs_glusterfs: Fix excessive debug output from vfs_gluster_open().
Christopher R. Hertel [Thu, 29 Aug 2013 21:58:16 +0000 (16:58 -0500)]
vfs_glusterfs: Fix excessive debug output from vfs_gluster_open().

The vfs_gluster_open() function generates a debug message (at level 0)
for every failed attempt to open a pathname.  This includes cases in
which attempts are made to open a directory as a file (those attempts
are retried calling vfs_gluster_opendir()).  The result is that the log
file fills with messages about failed attempts to open directories, just
because they are directories.

This latest version, of the patch completely removes logging from the
vfs_gluster_open() function.  The error code returned is handled in
upper layers, and the open function in the default VFS module does not
log any errors.

Signed-off-by: Christopher R. Hertel <crh@redhat.com>
Reviewed-by: susant palai <spalai@redhat.com>
Reviewed-by: raghavendra talur <rtalur@redhat.com>
Reviewed-by: Jose A. Rivera <jarrpa@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Aug 30 02:43:48 CEST 2013 on sn-devel-104

10 years agos3:winbind: fail ads_cached_connection_connect() if realm == NULL
Michael Adam [Thu, 29 Aug 2013 14:38:08 +0000 (16:38 +0200)]
s3:winbind: fail ads_cached_connection_connect() if realm == NULL

This prevents segfaults when e.g. a previous SMB_STRDUP failed..

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Aug 29 18:54:28 CEST 2013 on sn-devel-104