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

44446 Commits

Author SHA1 Message Date
Stefan Metzmacher
a20c977c7a dbwrap_open: add 'dbwrap_optimize_readonly:* = yes' option
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-07 16:06:06 +01:00
Stefan Metzmacher
a97b588b63 dbwrap_ctdb: implement DBWRAP_FLAG_OPTIMIZE_READONLY_ACCESS
For non-persistent databases we try to use CTDB_CONTROL_SET_DB_READONLY
in order to make use of readonly records.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2014-02-07 16:06:06 +01:00
Michael Adam
6def1c3f6e dbwrap: add a dbwrap_flags argument to db_open_ctdb()
This is in preparation of directly supporting ctdb read only
record copies when opening a ctdb database from samba.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-02-07 16:06:06 +01:00
Michael Adam
cf0cb0add9 dbwrap: add a dbwrap_flags argument to db_open()
This is in preparation to support handing flags to backends,
in particular activating read only record support for ctdb
databases. For a start, this does nothing but adding the
parameter, and all databases use DBWRAP_FLAG_NONE.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-02-07 16:06:06 +01:00
David Disseldorp
3be664969d vfs_btrfs: pass-through copy-chunk(len=0) requests
Never map copy-chunk(len=0) requests to BTRFS_IOC_CLONE_RANGE ioctls. A
BTRFS_IOC_CLONE_RANGE with @src_length=0 results in a clone of all data
from @src_offset->EOF!

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-06 16:15:29 -08:00
David Disseldorp
00906f9604 smbd/smb2_ioctl: fail zero length copy chunk requests
As documented in MS-SMB2 3.3.5.15.6 Handling a Server-Side Data Copy
Request, an invalid parameter response should be sent when:

The Length value in a single chunk is greater than
ServerSideCopyMaxChunkSize or *equal to zero*.

We do not currently abide by the latter part of this clause.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-06 16:15:28 -08:00
Shekhar Amlekar
4cda0bf24b s3: rpc_server/srvsvc: NetShareSetInfo - let CSC policy be settable.
The current code simply denies changing the csc policy through RPC
calls. Change that to allow changing the csc policy and call the 'change
share command' when a SetInfo RPC call changes the setting.

Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
2014-02-06 09:43:05 -07:00
Shekhar Amlekar
cc84aa48f0 s3: rpc_server/srvsvc: NetShareSetInfo - Correctly initialize max_connections for info levels != 2 before calling the change share script.
Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
2014-02-06 09:42:29 -07:00
Volker Lendecke
0ce4631871 winbind3: Simplify fillup_pw_field
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Feb  5 13:47:52 CET 2014 on sn-devel-104
2014-02-05 13:47:52 +01:00
Garming Sam
ad773cc014 pysmbd: improve the return of error codes in the python smbd bindings
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2014-02-05 08:42:25 +01:00
Andreas Schneider
40e6456b58 s3-auth: Add passwd_to_SamInfo3().
Correctly lookup users which come from smb.conf. passwd_to_SamInfo3()
tries to contact winbind if the user is a domain user to get
valid information about it. If winbind isn't running it will try to
create everything from the passwd struct. This is not always reliable
but works in most cases. It improves the current situation which doesn't
talk to winbind at all.

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

Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Feb  5 01:40:38 CET 2014 on sn-devel-104
2014-02-05 01:40:37 +01:00
Andreas Schneider
1b59c9743c s3-auth: Pass talloc context to make_server_info_pw().
Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-02-05 11:41:25 +13:00
Andreas Schneider
1bb11c7744 s3-auth: Add passwd_to_SamInfo3().
First this function tries to contacts winbind if the user is a domain
user to get valid information about it. If winbind isn't running it will
try to create everything from the passwd struct. This is not always
reliable but works in most cases. It improves the current situation
which doesn't talk to winbind at all.

Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-02-05 11:41:25 +13:00
Andreas Schneider
241e98d8ee s3-lib: Add winbind_lookup_usersids().
Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-02-05 11:41:25 +13:00
Volker Lendecke
55cf688949 winbind3: Use fstrcpy
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-02-05 11:29:25 +13:00
Volker Lendecke
c295670368 winbind3: Fix a comment typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-02-05 11:29:25 +13:00
Michael Adam
79517632f8 loadparm: rename variable for "directory mask" from dir_mask to directory_mask
for consistency docs/functions/variables

Signed-off-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Feb  3 07:29:43 CET 2014 on sn-devel-104
2014-02-03 07:29:43 +01:00
Michael Adam
43d59d5cc4 loadparm: rename lp[cfg]_dir_mask to lp[cfg]_directory_mask 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:25 +13:00
Michael Adam
4b403e912d loadparm: rename variable for "printable" from print_ok to printable
for consistency docs/funcstions/variables

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:20 +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
Michael Adam
0cdb0f8998 loadparm: rename variable for "read only" from readonly to read_only
for consistency docs/functions/variables

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:10 +13:00
Michael Adam
16c8762330 loadparm: rename lp[cfg]_readonly to lp[cfg]_read_only 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:01 +13:00
Michael Adam
974ad7ca7e loadparm: rename variable for "hosts deny" from hostsdeny to hosts_deny
for consistency docs/functions/variables

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:26:56 +13:00
Michael Adam
cdb6af95dd loadparm: rename lp[cfg]_hostsdeny to lp[cfg]_hosts_deny 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:26:51 +13:00
Michael Adam
c48c4daf4a loadparm: rename variable for "hosts allow" from hostsallow to hosts_allow
for consistency docs/function/variable

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:26:46 +13:00
Michael Adam
4670c43b32 loadparm: rename lp[cfg]_hostsallow to lp[cfg]_hosts_allow 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:26:40 +13:00
Michael Adam
3e8d02be8e loadparm: rename the variable for "path" from pathname to path
for consistency docs/variable/function.

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:26:34 +13:00
Michael Adam
d85bab275a loadparm: rename lp[cfg]_pathname to lp[cfg]_path 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:26:13 +13:00
Garming Sam
9893cf6c62 s3-param: Remove compilation conditional for setting directory name cache size.
BROKEN_DIRECTORY_HANDLING was originally added in f1041f98ce
however, it was never set.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-31 08:06:54 +01:00
Garming Sam
2152c77e38 param: Rename variable used for lp__server_role server_role
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-31 08:05:51 +01:00
Garming Sam
7ebd3bb3f1 param: Rename variable used for lp__security security
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-31 08:05:50 +01:00
Garming Sam
09b8816b8f param: fixup security default to AUTO to permit server role = domain member
When this is set to AUTO, it behaves as security = user unless server role = domain member has been set.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-31 08:05:50 +01:00
Garming Sam
f296e6e768 param: Rename variable used for lp__printername szPrintername
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-31 08:05:49 +01:00
Garming Sam
413e0b6872 param: Complete the removal of the "open files database hash size" parameter
This parameter was originally set for removal in 2007 in 28210588ed

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-31 08:05:47 +01:00
Volker Lendecke
afdb715d21 build: Build idmap_ad by default
Most other idmap modules are built by default. I don't see a reason why
idmap_ad should be special here.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-01-30 23:33:47 +01:00
Stefan Metzmacher
0b23345676 s3:smbd: skip empty records in smbXsrv_open_cleanup()
This should avoid scary ndr_pull errors, if there's
a cleanup race.

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

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jan 30 18:49:37 CET 2014 on sn-devel-104
2014-01-30 18:49:37 +01:00
Michael Adam
6b2d67a345 smbd:smb2: fix durable reconnect: set fsp->fnum from the smbXsrv_open->local_id
Originally, fsp->fnum was left at the INVALID fnum value.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-01-30 16:57:06 +01:00
Michael Adam
c3f93271ef dbwrap_tool: add option "--non-persistent" and force excatly one of "--[non-]persistent"
We want to force users of dbwrap_tool to explicitly specify
persistent or non-persistent. Otherwise, one could easily
by accident wipe a whole database that is actually persistent
but not currently opened by a samba process, just by openeing
the DB with the default non-persistent mode...

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-01-30 16:57:06 +01:00
Michael Adam
6dd1008c4e dbwrap_tool: remove the short form "-p" of "--persistent"
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-01-30 16:57:06 +01:00
Michael Adam
f42d380ead s3:brlock: fix a comment typo
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): Thu Jan 30 13:25:22 CET 2014 on sn-devel-104
2014-01-30 13:25:22 +01:00
Andrew Bartlett
c2b8d31b13 param: Do not check defaults_saved in is_default
We only call is_default if defaults_saved == true, so this static variable
reference is not required.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jan 30 03:31:29 CET 2014 on sn-devel-104
2014-01-30 03:31:29 +01: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
Garming Sam
c813e91171 param: remove unused bPreferredMaster from s3 loadparm in LOADPARM_EXTRA_GLOBALS
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-30 01:20:55 +01:00
Andrew Bartlett
b13a160666 lib/param: Make and use lpcfg_equal_parameter in common
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-30 01:18:24 +01:00
Andrew Bartlett
7eecd7c776 lib/param: Make and use common lpcfg_map_parameter
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-30 01:16:54 +01:00
Andrew Bartlett
d2782aceb3 s3-param: Use lpcfg_dump_a_parameter in dump_a_parameter
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-30 01:13:51 +01:00
Andrew Bartlett
0d506d26fc s3-param: Make dump_a_parameter use lp_paramater() rather than an open-coded loop
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-30 00:46:14 +01:00
Andrew Bartlett
36c88ca9c1 lib/param: Make lpcfg_print_parameter() common
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-30 00:42:08 +01:00
Garming Sam
5c2aac0f8e param: pad permissions to 3 digits and update docs to be consistent
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-30 00:40:22 +01:00