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

7375 Commits

Author SHA1 Message Date
Ralph Boehme
b3d17aa5ba Fix AFP_BackupTime byte order and use ISO C99 integer types
AFP_BackupTime value must be 0x80000000 and all existing defines use
native byte order, not byte swapped.

Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-08-18 17:42:50 +02:00
Volker Lendecke
c2f66e71aa messaging3: Include messages_dgm.h only in messages.c
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 12 02:21:32 CEST 2014 on sn-devel-104
2014-08-12 02:21:32 +02:00
Volker Lendecke
a1529c3302 messaging3: Add messages_dgm.h
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-11 23:57:13 +02:00
Volker Lendecke
bab01d1a89 messaging3: Pass dir_owner to messaging_dgm_init() 2014-08-11 23:57:13 +02:00
Volker Lendecke
f408a42896 messaging3: Pass cache_dir to messaging_dgm_init()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-11 23:57:12 +02:00
Volker Lendecke
3aa3c6ed01 messaging3: Directly refer to messaging_dgm in messages.c
This removes the messaging_backend abstraction layer from messages_dgm.c. That
layer was introduced for ctdb and is still used there. But as the messaging_dgm
interface is very slim anyway, I don't think directly calling it is too bad.

Why this commit? It is another step towards making messages_dgm
independent of messages.[ch], thus it might become usable in other
contexts like ctdb and source4

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-11 23:57:12 +02:00
Volker Lendecke
32d45cf2f3 messaging3: Add messaging_cleanup
Rename smbcontrol's dgm-cleanup to msg-cleanup. We haven't published
this UI yet :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-11 23:57:12 +02:00
Volker Lendecke
dcd3e2f2dc messaging_dgm: Remove unused "messaging_context"
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-11 23:57:12 +02:00
Volker Lendecke
7cb94e6860 messaging3: Explicitly pass server_id to messaging_dgm_init
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-11 23:57:12 +02:00
Volker Lendecke
706ba593d6 messaging3: Explicitly pass tevent_context to messaging_dgm_init
One dependency less on messaging_context()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-11 23:57:12 +02:00
Volker Lendecke
371e99959c messaging_dgm: Receive through a cb function
This avoids calling messaging_dispatch_rec directly from messaging_dgm.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-11 23:57:12 +02:00
Volker Lendecke
446de4f680 vfs3: Pass "lease" through SMB_VFS_CREATE_FILE
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-11 21:11:16 +02:00
Volker Lendecke
c71b0c413c ctdbd_conn: Remove ctdb_packet
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-08-06 15:40:10 +02:00
Stefan Metzmacher
6669a84ad0 s3:smbd: remember smbXsrv_connection for each smb_request
This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-08-06 09:51:12 +02:00
Volker Lendecke
d997d93af1 lib: Remove unused serverid_register_msg_flags()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 18:49:46 +02:00
Garming Sam
47f10ac65c param: remove lp_get_parameter
Ensure lpcfg_parm_struct, its counterpart is equivalent

Change-Id: I127ce5d3cf7fe02ebf161aa011ec3b41bc32a656
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:11 +02:00
Garming Sam
a1d2e52110 param: remove unused service_ok function
Change-Id: I0736a3b9b73aa80f529327ec70e856dd7fc008c6
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:11 +02:00
Michael Adam
cd95937369 s3: remove stat_ex.vfs_private completely
It is not used any more.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jul 24 14:23:11 CEST 2014 on sn-devel-104
2014-07-24 14:23:11 +02:00
Stefan Metzmacher
45807028d4 lib/util: move memcache.[ch] to the toplevel 'samba-util' library
This is generic enough that it could be used in all code.

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

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jul 18 15:43:33 CEST 2014 on sn-devel-104
2014-07-18 15:43:33 +02:00
Stefan Metzmacher
b560fac7f7 s3:lib/memcache: only include the required header files
We don't need the full "includes.h".

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-07-18 13:16:04 +02:00
Volker Lendecke
6f8fd3d5ab smbd: Remove unused blocking_lock_record* from VFS_BRL_CANCEL_WINDOWS
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-07-04 06:31:16 +02:00
Volker Lendecke
b08fe2d98d smbd: Remove unused blocking_lock_record* from VFS_BRL_LOCK_WINDOWS
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-07-04 06:31:16 +02:00
Andrew Bartlett
a0105b84b8 secrets: Ensure we store the secureChannelType when written to secrets.ldb
This will allow winbindd to know when we are an RODC
without needing to dig into sam.ldb.

Change-Id: Ibdfa37fe6269305ccc5db42479f4a8db5eea53f3
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-07-04 02:52:35 +02:00
Volker Lendecke
364bdadde3 messaging3: Make messaging_dgm_init return 0/errno
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 Jun 18 21:17:57 CEST 2014 on sn-devel-104
2014-06-18 21:17:57 +02:00
Volker Lendecke
9fd8d5154f messaging3: Make messaging_dgm_wipe return 0/errno
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-06-18 18:51:13 +02:00
Volker Lendecke
2f3435085e messaging3: Make messaging_dgm_cleanup return 0/errno
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-06-18 18:51:13 +02:00
Volker Lendecke
e6b33ce611 messaging3: Make the _send function return 0/errno
This is to eventually make messaging_dgm usable in ctdb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-06-18 18:51:13 +02:00
Andrew Bartlett
b359b0c160 passdb: Allow a passdb module to do idmap for everything
This patch seems odd, but the pdb_samba_dsdb module has exactly this
semantics.  That is, the pdb_samba_dsdb is responsible for all IDMAP
values, due to backing on to the idmap.ldb allocator.  This option is
added so we can continue to support the mappings written into that
database even when switching winbindd implementations - the source4/
winbind code would only ask the idmap_ldb code, no matter what the
SID.

Almost all of the behaviour for this is already in winbindd, but we
need this extra flag function so as to avoid (currently intentional)
errors at startup due to not having a per-domain allocation
configured in the smb.conf.

Andrew Bartlett

Change-Id: I6b0d7a1463fe28dfd36715af0285911ecc07585c
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2014-06-16 00:26:26 +02:00
Michael Adam
9f6c4c4da2 vfs: update a bit-rotten comment
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-06-13 17:29:10 +02:00
Andrew Bartlett
597d2a7a29 auth: Provide a way to use the auth stack for winbindd authentication
This adds in flags that allow winbindd to request authentication
without directly calling into the auth_sam module.

That in turn will allow winbindd to call auth_samba4 and so permit
winbindd operation in the AD DC.

Andrew Bartlett

Change-Id: I27d11075eb8e1a54f034ee2fdcb05360b4203567
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-11 10:18:26 +02:00
Christian Ambach
558850c495 s3:lib/afs move afs_settoken.c to common lib dir
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-06-04 20:09:38 +02:00
Christian Ambach
89961ca297 s3:lib/afs move afs.c to common lib dir
some of the code in afs.c is needed by wbinfo that lives in the toplevel
nsswitch directory, so move the afs.c file to a new top-level lib/afs
directory. Use the name afs_funcs to avoid collisions with the afs.h
header from OpenAFS

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-06-04 20:09:38 +02:00
Andrew Bartlett
191d754091 s3-param: Add lp_dnsdomain() for use by winbindd
Change-Id: I987aa533ebe11c93b9e836fafc7b19c81bf600a5
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-04 03:22:26 +02:00
Volker Lendecke
c487937b01 messaging3: Make messaging_context private
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-31 01:59:18 +02:00
Volker Lendecke
8ddbf18115 messaging3: Add and use messaging_tevent_context()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-31 01:59:17 +02:00
Volker Lendecke
56a7ddd777 messaging3: Introduce messaging_local_backend()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-31 01:59:17 +02:00
Volker Lendecke
331296df94 messaging3: The backend send_fn doesn't need a messaging_context
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-31 01:59:17 +02:00
Michael Adam
e4453bdc37 s3:messaging: change messaging_backend to use iovec instead of data blob in send_fn
This also changes the layering

messaging_send_iov -> messaging_send_buf -> messaging_send

to

messaging_send_buf -> messaging_send -> messaging_send_iov

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-30 00:03:20 +02:00
Mathias Dietz
8935242489 Add protocol version to smbstatus output
Signed-off-by: Mathias Dietz <mdietz@de.ibm.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu May 22 18:37:27 CEST 2014 on sn-devel-104
2014-05-22 18:37:27 +02:00
Andrew Bartlett
6c37cd6544 auth: Allow auth_samba4 to be forced to run a specific auth module
This will allow new tests to be written to validate winbindd authentication results

Andrew Bartlett

Change-Id: I008eba1de349b17ee4eb9f11be08338557dffecc
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-05-16 10:23:26 +02:00
Volker Lendecke
a6e49f9cda messaging3: Add messaging_dgm_register_tevent_context
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-08 09:10:12 +02:00
Volker Lendecke
7a266c575a messaging3: Add messaging_filtered_read
This delegates the decision whether to read a message to a callback

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-08 09:10:12 +02:00
Garming Sam
98dbc38efa move str_list_make_v3 out of s3 code
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
509cc45c95 param: add extra default parameter to get_parametrics_by_service
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
3845138731 param: remove unused lp_set_option
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
4a86b693fd param: remove lp_string_is_valid_boolean
This call is never made in the code and should in fact crash if it was ever called with a valid boolean

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/106
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:14 +02:00
Volker Lendecke
d0590eec7e messaging3: Fix messaging_read_send/recv
messaging_read_send/recv was okay for just one handler in the queue. For
multiple handlers it was pretty broken.

A handler that deletes itself as part of the callback (pretty typical use
case...) drops the message for a subsequent handler that responds to the same
message type. In messaging_dispatch_rec we walk the array, however
messaging_read_cleanup has already changed the array. tevent_req_defer_callback
does not help here: It only defers the callback, it does not defer the cleanup
function.

This also happens when a callback deletes a different handler

A handler that re-installs itself in the callback might get a message twice.

This patch changes the code such that only messaging_dispatch_rec adds records
to msg_ctx->waiters, new waiters are put into a staging area first
(msg_ctx->new_waiters). Also messaging_read_cleanup does not move anything
around in msg_ctx->waiters, it only nulls out itself. messaging_dispatch_rec is
changed to cope with this.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-30 14:52:08 +02:00
Michael Adam
0df8988c08 autorid: add high_id to range config and fill it where we also fill range->low_id.
This corresponds to low_id for convenience and allows
for computations without going back to the global config.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-25 15:35:09 +02:00
Volker Lendecke
843f094628 s3: messaging: Add infrastructure to clean up orphaned sockets every 15 minutes as a background task.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-23 22:33:09 +02:00
Volker Lendecke
6874e4a0f2 messaging_dgm: Add messaging_dgm_wipe
This walks all sockets and wipes the left-overs

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-23 22:33:09 +02:00
Volker Lendecke
cdc99c145d messaging3: Add messaging_send_iov
This uses a copy, will be replaced by a direct iovec call through to
sendmsg on the unix domain socket

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-23 22:33:08 +02:00
Volker Lendecke
e2683605b0 lib: Add iov_buf
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-23 22:33:08 +02:00
Volker Lendecke
7009b4921c lib: Introduce iov_buflen
.. with overflow protection

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-23 22:33:08 +02:00
Volker Lendecke
b022038cdc lib: Remove messages_local
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-23 22:33:08 +02:00
Volker Lendecke
29603d1cd9 lib: Add messaging_dgm
Messaging based on unix domain datagram sockets

This makes every process participating in messaging bind on a unix domain
datagram socket, similar to the source4 based messaging. The details are a bit
different though:

Retry after EWOULDBLOCK is done with a blocking thread, not by polling. This
was the only way I could in experiments avoid a thundering herd or high load
under Linux in extreme overload situations like many thousands of processes
sending to one blocked process. If there are better ideas to do this in a
simple way, I'm more than happy to remove the pthreadpool dependency again.

There is only one socket per process, not per task. I don't think that per-task
sockets are really necessary, we can do filtering in user space. The message
contains the destination server_id, which contains the destination task_id. I
think we can rebase the source4 based imessaging on top of this, allowing
multiple imessaging contexts on top of one messaging_context. I had planned to
do this conversion before this goes in, but Jeremy convinced me that this has
value in itself :-)

Per socket we also create a fcntl-based lockfile to allow race-free cleanup of
orphaned sockets. This lockfile contains the unique_id, which in the future
will make the server_id.tdb obsolete.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-23 22:33:08 +02:00
Volker Lendecke
3e24e07467 lib: Move full_path_tos to util_str.c
This can be useful elsewhere

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-23 22:33:08 +02:00
Andreas Schneider
15feb84273 s3-lib: Add root_mode() which can deal with uid_wrapper.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:06 +02:00
Andrew Bartlett
cec833063e auth: Remove plaintext OSF1 password support
The WAF build does not have the code to detect getprpwnam on which
this is based, and so this is dead code.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-04-15 10:13:12 +02:00
Jeremy Allison
837671f476 s3: messages: Implement cleanup of dead records.
When a smbd process dies, pending messages.tdb records for this process
might not get cleaned up. Implement a cleanup for dead records that is
triggered after a smbd dies uncleanly; the records for that PID are
deleted.

Based on a patchset from Christof Schmitt <cs@samba.org>.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
2014-04-03 06:22:13 +02:00
Michael Adam
9e519d97c3 autorid: split idmap_autorid_db_open and idmap_autorid_init_hwms out of idmap_autorid_db_init
These will be used separately in the full initialization function.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-03 00:26:28 +02:00
Stefan Metzmacher
74b359c616 s3:build: remove global CLUSTER_SUPPORT define
All ctdb specific code is isolated in samba-cluster-support.so now.

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

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Mar 24 19:08:44 CET 2014 on sn-devel-104
2014-03-24 19:08:44 +01:00
Stefan Metzmacher
24054b5f8b s3:param: move lp_ctdbd_socket() to ctdbd_conn.c
This allows us to use CTDB_PATH only in ctdbd_conn.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-03-24 17:09:10 +01:00
Stefan Metzmacher
e5b5775b81 s3:ctdbd_conn: add ctdb_serverids_exist_supported()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-03-24 17:09:10 +01:00
Volker Lendecke
8c01dbc058 gencache: Add gencache values to memcache
gencache_parse calling tdb shows up in profiles when we do a lot of open/close
traffic with large ACLs. For every file we convert unix ids to sids, and in the
domain member case this goes through gencache.

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

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar 11 19:56:47 CET 2014 on sn-devel-104
2014-03-11 19:56:46 +01:00
Ralph Boehme
e7856ed58d Add usable stream name defines
Add stream name defines that are usable with Samba's way of storing
stream names internally.

Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
2014-03-11 10:12:57 +00:00
Ralph Boehme
8424d35919 Fix a typo
Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
2014-03-11 10:11:33 +00:00
Stefan Metzmacher
032621d5bf s3:smbd: s/BUFFER_SIZE/LARGE_WRITEX_BUFFER_SIZE
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar  5 22:53:34 CET 2014 on sn-devel-104
2014-03-05 22:53:34 +01:00
Stefan Metzmacher
7f3faa1f18 s3:include: let CLI_BUFFER_SIZE be an alias of SMB_BUFFER_SIZE_MAX
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-05 10:06:24 -08:00
Stefan Metzmacher
9677fae6aa s3:lib/ctdbd_conn: let release_ip_handler return bool
If it returns true the passed ip address matched and we
let a nested ctdb operation fail with NT_STATUS_ADDRESS_CLOSED.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-02-21 12:48:31 +01:00
Garming Sam
8246e53bb6 param: remove lp_dnsdomain from s3
With the use of the shared globals structure, lp_dnsdomain is no longer used in the code and removing it would remove a notable special case

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: I59526c40c58e132a134d67fa7944dfeacd05f4c6
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-02-20 10:11:24 +13:00
Aurélien Aptel
5fbe36cbaf clitar.h: delete file
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-19 18:22:28 +01:00
Volker Lendecke
69594dfb8c auth: Make new_server_id_task() static to auth_samba4
This is not used in other parts of source3, so this patch improves
modularity and isolation of features.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12 21:47:51 +01:00
Garming Sam
6e954a5605 param: move SMB2 defaults to lib/param and use in loadparm_init
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12 13:17:14 +13:00
Andrew Bartlett
0c7ed5a8ab param: No longer have a special case for lp_configfile
This parameter is renamed because it does not normally return the current smb.conf file, but
instead returns the next one, as found in a config file = directive, to be loaded.

This avoids a conflict with the lpcfg_configfile from lib/param, which does refer to the
current smb.conf path.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12 13:17:13 +13:00
Garming Sam
526cf3c119 param: use generate_param.py to generate param_proto.h
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12 13:17:13 +13:00
Andrew Bartlett
4ea7318e56 lib/param: Remove special handling for 'state dir' and 'cache dir'
The build system gives these two parameters different defaults
(compared with lock dir) in both the --enable-fhs and default mode, so
the logic to use lock dir no longer applies unless the build has been
very specially constructed.

Therefore, remove the special case handling and make these normal
parameters again.

Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12 13:17:13 +13:00
Andrew Bartlett
86850860f8 lib/param: Normalise "read raw" and "write raw" parameters
They have been changed to function like normal parameters,
removing a special case in the loadparm system.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12 13:17:13 +13:00
Garming Sam
6e98b0f9b9 s3: increase default fudge factor for max open files from 20 to 40
Tests show that Samba's smbd uses 38 open files at startup.

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

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2014-02-03 13:27:15 +13:00
Andrew Bartlett
ebb04f4037 param: Remove unused lp_is_default (once used by SWAT)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-30 01:21:49 +01:00
Andrew Bartlett
02d60cd028 param: Remove unused lp_next_parameter (once used by SWAT)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-30 01:21:26 +01:00
Andrew Bartlett
8fbe9269c9 lib/param: Move GUEST_ACCOUNT define to a common header
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2014-01-28 17:26:44 +13:00
Volker Lendecke
c427b29be9 messaging3: Remove unused messaging_tdb_event
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): Tue Jan 21 10:07:21 CET 2014 on sn-devel-104
2014-01-21 10:07:21 +01:00
Volker Lendecke
5f3ccfc16b messaging3: Add messaging_read_send/recv
This is made to replace the msg_channel abstraction.

msg_channel was created to not miss any messages. For this, some
complex queueing was installed. This complexity has caused quite a
few problems in the past (see bug 10284 for example).

messaging_read_send/recv is able to achieve the same goal with a
lot less complexity. The messaging_read_send atomically installs
the reader into the messaging_context, we will not miss any messages
while this installed. messaging_send_recv will deinstall that
listener, but in the callback function you can directly call
messaging_read_send again without going through the tevent_loop_once.
As long as this is always made sure, no messages will be lost.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-01-21 08:10:41 +01:00
Jeremy Allison
4e0c41a321 s3:dir - Add a new memcache type (non-talloc) - SMB1_SEARCH_OFFSET_MAP.
We will use this in mapping 64-bit directory offset
cookies to a 32-bit counter.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-15 09:45:10 +01:00
Stefan Metzmacher
a8ecebe3e8 s3:libsmb: remove unused trust_pw_find_change_and_store_it()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 12:47:13 +01:00
Stefan Metzmacher
16c6e4992f s3:libsmb: add trust_pw_change()
This protects the password change using a domain specific g_lock,
so multiple parts 'net rpc', 'rpcclient', 'winbindd', 'wbinfo --change-secret'
even on multiple cluster nodes doesn't race anymore.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 12:47:12 +01:00
Stefan Metzmacher
ef28ed685f libcli/smb: move some *TRANSACT_* flags to smb_constants.h
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:38 +01:00
Stefan Metzmacher
306cba4b8c libcli/smb: move some FILE_* flags to smb_constants.h
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:38 +01:00
Stefan Metzmacher
a7f1f5d6b8 Happy New Year 2014!
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-01-02 14:04:26 +01:00
Abhidnya Joshi
47175f5760 s3: Add DAC_OVERRIDE capability support
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
2013-12-16 10:11:03 -07:00
David Keegel
9acacb27ec shadow_copy2: Fix some typos
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Dec 12 17:58:24 CET 2013 on sn-devel-104
2013-12-12 17:58:24 +01:00
David Disseldorp
d8d5d4c742 vfs: add [GET/SET]_COMPRESSION hooks
The VFS interfaces are sychronous, as the operations only modify
meta-data.
These hooks are dependent on support for transparent compression by the
underlying filesystem - vfs_default returns INVALID_DEVICE_REQUEST.
Support for other filesystems providing transparent comression, such as
Btrfs and ZFS, can be added in future.

The get_compression function takes fsp and smb_fname arguments. The
smb_fname argument is needed due to the current dosmode() code-path.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-22 08:56:45 -08:00
Jeremy Allison
4e6934ec6c Rename the profile enums with a SAMBA_ prefix to avoid conflict with system files.
WRITE_FLUSH is defined in fs.h in Linux.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-11-22 08:56:38 -08:00
Andreas Schneider
6366ebb79b s3-lib: Add grpname to talloc_sub_specified().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=2191

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-21 15:00:44 -08:00
David Disseldorp
c7762042ba debug: remove unused sys_adminlog
printing.c was the last user of this syslog wrapper.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Nov 20 10:19:32 CET 2013 on sn-devel-104
2013-11-20 10:19:32 +01:00
David Disseldorp
956a4552f2 printing: return WERROR from print_access_check
print_access_check() currently returns a bool based on whether access is
granted or denied. Errno is set on failure, but none of the callers use
it.
This change converts print_access_check() to return a WERROR.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2013-11-20 08:16:25 +01:00
David Disseldorp
24d025f85d spoolss: return the spoolss job ID in notifications
Print job notifications currently carry the system print job identifier
from the queue structure. Instead, the spoolss job identifier should be
resolved and returned.

Print clients can use notification job-ids in subsequent spoolss SetJob
requests. Returning an incorrect identifier can result in the failure of
such requests, e.g. spoolss_SetJob(SPOOLSS_JOB_CONTROL_DELETE).

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2013-11-18 16:03:59 +01:00
Jeremy Allison
fc611dd6e8 s3-lib: smbclient shows no error if deleting a directory with del failed
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10260

Move dir_check_ftype() to util.c

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-14 19:29:00 +01:00
Gregor Beck
0a3cc7e25c s3:libsmb: SMBC_getatr use pathinfo3 for second try
The pathinfo2 call might fail against NetApp because it is sending broken
packages.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-30 15:23:51 -07:00
Andreas Schneider
13d840ad2f s3-smbd_shim: Add become_authenticated_pipe_user().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-29 15:52:58 +01:00
Volker Lendecke
fbee5795ab smbd/winbindd: Do an early check if ctdbd is functional
This will avoid panic calls when smbd and winbind is started in cluster
mode before ctdb is functional. It still logs something sane at debug
level 0, but it does not panic and core anymore.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17 23:20:45 +02:00
Stefan Metzmacher
307abd61df s3:libsmb: remove unused cli_state->case_sensitive
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17 16:24:52 +02:00
Stefan Metzmacher
e20c66d780 s3:libsmb: remove unused cli_state->dfsroot
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17 16:23:33 +02:00
Stefan Metzmacher
e6eb6b9e94 libcli/smb: move Filesystem Attributes defines to smb_constants.h
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17 16:08:29 +02:00
Stefan Metzmacher
2be39c1866 s3:libsmb: inline trust_pw_change_and_store_it() into trust_pw_find_change_and_store_it()
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:59 +13:00
Stefan Metzmacher
062df736fa s3:libsmb: remove unused change_trust_account_password()
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:58 +13:00
Stefan Metzmacher
d221d84e8d s3:include: fix messaging_send_buf() protype in messages.h
The function already used 'uint8_t' instead of 'uint8'.

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

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:57 +13:00
Stefan Metzmacher
9b22628e24 s3:include: add forward declaration for struct messaging_context; in g_lock.h
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:56 +13:00
Andrew Bartlett
361b51c13d proto: Remove manually written lp_ prototypes
This also ensures we remove prototypes from parameters we remove or
rename, and easily see how many special cases we have left.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-16 09:33:28 +02:00
Andrew Bartlett
651cf89390 s3/param: Autogenerate parameters prototypes again after proto.h was frozen
This autogenerates the parameters so that we can keep everything in sync easier,
particularly when adding new parameters.  This will also make it easier to move
to a fully autogenerated system in the future, as it reduces special cases.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-16 09:31:01 +02:00
Volker Lendecke
fcafaf6022 smbd: Remove FAKE_LEVEL_II_OPLOCK
FAKE_LEVEL_II_OPLOCK was an indicator to break level2 oplock holders
on write.  This information is now being held in brlock.tdb, which makes
the FAKE_LEVEL_II_OPLOCK type unnecessary.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-15 01:52:29 +02:00
Andrew Bartlett
e512491552 s3-winbindd: Remove undocumented winbindd:socket dir parameter
This uses the documeted "winbindd socket directory" parameter instead.

This came about due to the merge of the two smb.conf tables in s3 and
s4 for the Samba 4.0 release.  The s4 code used a real parameter,
which caused this to be documented, whereas no automatic procedure
existed to notice the parametric option and the need to document that.
The fact that this was not used consistently in both codebases is one
of the many areas of technical debt we still need to pay off here.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-10-15 10:58:45 +13:00
Christof Schmitt
1c866461f0 vfs: Fix parentheses in SMB_VFS_NEXT_DURABLE_COOKIE
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-12 11:05:52 +02:00
Michael Adam
6da7375cd8 shadow_copy2: add comment explaining the SMB level GMT format pattern
Signed-off-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05 09:21:00 +13:00
Michael Adam
a6f6ad8d22 idmap_autorid: add idmap_autorid_delete_domain_ranges()
This uses the new idmap_autorid_iterate_domain_ranges() function.
Based on earlier patch by Atul Kulkarni <atul.kulkarni@in.ibm.com>.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:50:14 +02:00
Michael Adam
97dfa06151 idmap_autorid: add idmap_autorid_iterate_domain_ranges[_read]()
Functions to perform an action on all domain range mappings for
a given domain, specified by the domain sid.

Inspired by a previous patch by Atul Kulkarni <atul.kulkarni@in.ibm.com>.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:50:12 +02:00
Michael Adam
1dd9218de9 idmap_autorid: add idmap_autorid_delete_range_by_num()
query and delete a mapping specified by the range number.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:50:11 +02:00
Michael Adam
6cdae0dd30 idmap_autorid: add idmap_autorid_delete_range_by_sid()
Delete a range mapping as specified by domain SID and range index.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:50:10 +02:00
Michael Adam
375168a16e idmap_autorid: add idmap_autorid_saveconfigstr()
Store a configuration as provided by a config string
after parsing and validating the string.

Based on similar patch by Atul Kulkarni <atul.kulkarni@in.ibm.com>.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:06:32 +02:00
Michael Adam
4d0d348994 idmap_autorid: add a comment explaining idmap_autorid_saveconfig()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:06:27 +02:00
Michael Adam
ae88bcd1f0 idmap_autorid: add a comment explaining idmap_autorid_loadconfig()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:06:27 +02:00
Michael Adam
4deba6090b idmap_autorid: add a comment explaining idmap_autorid_db_init()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:06:26 +02:00
Michael Adam
4c937f2dd2 idmap_autorid: add a comment explaining idmap_autorid_init_hwm()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:06:26 +02:00
Michael Adam
7cde714cfd idmap_autorid: add a comment explaining idmap_autorid_get_domainrange()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:06:25 +02:00
Michael Adam
4350bfba46 idmap_autorid: add new function idmap_autorid_setrange()
This allows to directly set a range for a domsid#index pair.
It fails if a stored range is found which is different from
the requested one.

Pair-Programmed-With: Atul Kulkarni <atul.kulkarni@in.ibm.com>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:06:23 +02:00
Michael Adam
69dbc1577b idmap_autorid: add idmap_autorid_getrange()
Wrapper to idmap_autorid_getrange_int().

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:06:22 +02:00
Atul Kulkarni
f8767cd9d8 idmap_autorid: remove fstring keystr from autorid_range_config
This is just used to change the behaviour of the function.
Making it more suitable to be used at other places.

Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:06:19 +02:00
Atul Kulkarni
7cacc48563 idmap_autorid: remove autorid_global_config member from autorid_range_config
global config is not part of range config.
By removing this, autorid_range_config becomes more suitable
for using it elsewhere.

Pair-Programmed-With: Michael Adam <obnox@samba.org>

Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:06:18 +02:00
Michael Adam
802b9d7ec6 idmap_autorid: change idmap_autorid_loadconfig() to return NTSTATUS
for better error propagation.

Pair-Programmed-With: Atul Kulkarni <atul.kulkarni@in.ibm.com>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-01 12:04:44 +00:00
Michael Adam
f6c34b1e23 idmap_autorid: refactor idmap_autorid_parse_configstr() out of idmap_autorid_loadconfig()
This will be used for other purposes as well.

Pair-Programmed-with: Atul Kulkarni <atul.kulkarni@in.ibm.com>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-01 12:03:29 +00:00
Michael Adam
173cdfe0a4 idmap_autorid_tdb: add idmap_autorid_getconfigstr()
Pair-Programmed-With: Atul Kulkarni <atul.kulkarni@in.ibm.com>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-01 11:59:29 +00:00
Atul Kulkarni
f80f43c772 idmap_autorid: extract common code to separate file
This is in preparation of adding "net idmap autorid" functionality.

Pair-Programmed-With: Michael Adam <obnox@samba.org>

Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-01 11:27:26 +00:00
Michael Adam
0fc53a1324 s3:include: remove duplicate prototypes from afs functions from proto.h
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-23 20:49:39 +02:00
Michael Adam
771b7779b0 afs: format afs_syscall() properly
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-23 20:26:47 +02:00
Volker Lendecke
20cc710920 smbd: Move "struct byte_range_lock" definition to brlock.c 2013-09-11 08:27:11 +02:00
Volker Lendecke
e533bf3ef1 smbd: Fix blank line endings 2013-09-11 08:27:10 +02:00
Michael Adam
de3bc10ef6 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>
2013-09-10 23:30:19 +02:00
Christof Schmitt
c8c0632c87 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
2013-09-10 22:38:50 +02:00
Volker Lendecke
6bd5fef77d lib: serverid.h needs "struct db_record" declaration
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-10 11:33:39 -07:00
Shekhar Amlekar
81f8b9c29f 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
2013-09-06 19:41:51 +02:00
Volker Lendecke
196da5925b 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
2013-09-06 00:47:07 +02:00
Jeremy Allison
6b915bfd0f Add a talloc context to saf_fetch().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-09-05 09:17:13 -07:00
Volker Lendecke
8a7246ac2c 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>
2013-09-05 09:16:23 -07:00
Volker Lendecke
1173fed916 lib: Add "mem_ctx" to gencache_get_data_blob
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-05 09:16:22 -07:00
Richard Sharpe
74829fecd7 Fix bug #10097 - MacOSX 10.9 will not follow path-based DFS referrals handed out by Samba.
Windows overloads the EA Length field in the DIRECTORY INFO leves of FIND FIRST/FIND NEXT.

This field indicates either the REPARSE_TAG if the file/folder has a reparse proint or
the EA Length if it has EAs, and is the fundamental reason you cannot have both on a
file or folder.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Aug 19 22:21:34 CEST 2013 on sn-devel-104
2013-08-19 22:21:34 +02:00
Jeremy Allison
28591dfd5d s3:libsmb: Add in the core of the libsmb client SMB2 functions.
These create a synchronous cli_smb2_XXX() style interface
designed to plug directly into the libsmb/cliXXXX.c code.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:06 +02:00
Stefan Metzmacher
9188ee4ab1 s3:lib: remove unused interpret_protocol()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:05 +02:00
Jeremy Allison
f2fb829cee s3:param: Correctly set up cli_maxprotocol, cli_minprotocol in our parameter block.
Set to PROTOCOL_NT1, PROTOCOL_CORE by default.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:05 +02:00
Volker Lendecke
68e6e7e8e8 lib: Remove unused "get_peer_name"
Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-12 17:25:52 +12:00