1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

45404 Commits

Author SHA1 Message Date
Garming Sam
a7c4446bef param: remove is_default method in s3
Change-Id: Ia9c7422c5f7b56eb81ad644b369bfa36849e963e
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
Garming Sam
bc46178831 param: use lpcfg_service_ok in s3 loadparm
Change-Id: Ic157d3f5ec7ac9a72db86239e76cd743149cb8e0
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
611a402cee s3:param: remove lp_string_set from the s3_fns.
This is not used any more.

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:10 +02:00
Garming Sam
3377c0f8a4 s3:param: add lp_ctx as a parameter to init_globals
Change-Id: I8804923241d782eb82675c5a56d53b5ba720fdf0
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:10 +02:00
Garming Sam
0864d4945e s3:param: use lpcfg_do_*_paramter instead of lp_do_parameter in do_parameter
Change-Id: I08ab5d9db9323a2ef4fa2243ff0b0b7efe73a23b
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:10 +02:00
Garming Sam
4fa98737f4 s3:param: simplify lp_do_parameter to use lpcfg functions
Change-Id: I907794fbbc15ecc4e88e0f6b0d510788e0fca745
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:10 +02:00
Christof Schmitt
9ee7b022e5 smbd: Change logging level for denied share access
A user without access in the share acl can easily trigger those
warnings. Change the logging level, so that they do not appear with the
default logging level.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jul 31 01:17:30 CEST 2014 on sn-devel-104
2014-07-31 01:17:30 +02:00
Michael Adam
27b0d9740e s3:param: move a variable into scope in lp_file_list_changed
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): Wed Jul 30 15:59:11 CEST 2014 on sn-devel-104
2014-07-30 15:59:11 +02:00
Jeremy Allison
6abeff5f46 s3: net time - fix usage and core dump.
Bug 10728 - 'net time system' segfaults

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Jul 30 13:32:47 CEST 2014 on sn-devel-104
2014-07-30 13:32:47 +02:00
Jeremy Allison
f9588675ea s3: winbindd: On new client connect, prune idle or hung connections older than "winbind request timeout"
Bug 3204 winbindd: Exceeding 200 client connections, no idle connection found

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 29 23:31:14 CEST 2014 on sn-devel-104
2014-07-29 23:31:14 +02:00
Jeremy Allison
2535803627 s3: winbindd: Add new parameter "winbind request timeout" set to 60 seconds with man page.
"This parameter specifies the number of seconds the winbindd
daemon will wait before disconnecting either a client connection
with no outstanding requests (idle) or a client connection with a
request that has remained outstanding (hung) for longer than this
number of seconds."

Bug 3204 winbindd: Exceeding 200 client connections, no idle connection found

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2014-07-29 21:08:12 +02:00
Volker Lendecke
d7b4f863e4 messaging3: messaging_array is no longer used
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-07-28 22:04:13 +02:00
Volker Lendecke
f4e7a49cd7 unix_msg: simplify unix_msg_send
We have a variable array inside one-fragment fast path anyway. Moving
that to the toplevel of the function saves us a malloc/free pair.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-07-28 22:04:13 +02:00
Volker Lendecke
f1f43886f0 unix_msg: Use struct initializers
Saves a few lines and bytes of .text

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-07-28 22:04:13 +02:00
Volker Lendecke
8621870559 unix_msg: Use empty arrays in structs
Just a simple style update

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-07-28 22:04:13 +02:00
Volker Lendecke
f5efddb9ae lib: directory_create_or_exist() does not use "uid" parameter
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-07-28 22:04:13 +02:00
Björn Jacke
f4810097cb winbind/i18n: update Japanese pam winbind translation
Thanks to user "victory" and SATOH Fumiyasu for further fixes for Japanese
KATAKANA words!

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

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: SATOH Fumiyasu <fumiyas@osstech.jp>

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Sat Jul 26 20:43:28 CEST 2014 on sn-devel-104
2014-07-26 20:43:28 +02:00
Michael Adam
b51809c13e s3:idmap: fix talloc hierarchy in idmap_passdb_domain()
(don't init to NULL context - we got one handed in...)

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): Fri Jul 25 14:18:20 CEST 2014 on sn-devel-104
2014-07-25 14:18:20 +02:00
Michael Adam
b78d44fe89 s3:idmap: only check the range values if a range setting has been found.
Otherwise, the check is superfluous since high and low values are
initialized to 0.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-07-25 11:52:10 +02:00
Michael Adam
f354917208 s3:idmap: move loading of idmap options together before range checking in idmap_init_domain()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-07-25 11:52:10 +02:00
Michael Adam
3ac00c9dc3 s3:idmap: in idmap_init_domain() load methods before loading further config
Check whether the requested backend exists at all, before going
further into the config parsing.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-07-25 11:52:10 +02:00
Michael Adam
3c6ec8908a s3:idmap: don't log missing range config if range checking not requested
idmap_init_domain() is called with check_range == false from
idmap_passdb_domain(). In this case, we usually don't have an
idmap range at all, and we don't want to level 1 debug
messages complaining about the fact are irritating at least.

This patch removes the debug in the case of check_range == false.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-07-25 11:52:10 +02:00
Volker Lendecke
dfc98d76b9 messaging3: Remove an unnecessary variable
We can inspect rec.buf with a debugger, no separate variable needed

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

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jul 25 00:03:48 CEST 2014 on sn-devel-104
2014-07-25 00:03:48 +02:00
Volker Lendecke
be2b891740 messaging3: Simplify ping_message()
The talloc_strnup was only used to \0-terminate the data for printing. The
same can be achieved by %.* in the printf format.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-24 21:41:10 +02:00
Volker Lendecke
7f623cbe79 messaging3: Remove two procid_str_static calls
... and thus implicit talloc_tos() calls

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-24 21:41:10 +02:00
Stefan Metzmacher
3f6926d94e s3:smbd: remove unused client_get_tcp_info()
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): Thu Jul 24 21:32:17 CEST 2014 on sn-devel-104
2014-07-24 21:32:17 +02:00
Stefan Metzmacher
7ca5e83cad s3:smbd: avoid using client_get_tcp_info()
We already have the required information as stack variable
in the current function. There's no need to call get[peer|sock]name()
twice.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-07-24 19:07:06 +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
Michael Adam
eb0577dca0 s3:vfs:gpfs: remove a block and reduce indentation in gpfs_is_offline()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
2014-07-24 11:56:10 +02:00
Michael Adam
d87d13f4c2 s3:vfs:gpfs: remove all writing uses of stat_ex.vfs_private from vfs_gpfs.
Now that the vfs_private cache is never read in vfs_gpfs, there is
no need any more to write it.

With this change, vfs_gpfs does not use vfs_private any more.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
2014-07-24 11:56:09 +02:00
Michael Adam
16a040f8ef s3:vfs:gpfs: Remove all reading uses of stat_ex.vfs_private from vfs_gfs.
This was used as a cache for offline-info in the stat buffer.
But as the implementation of gpfs_is_offline() showed, this cache
does not always carry valid information when the stat itself is valid
(since at least one call goes to fstatat() directly, circumventing
 the vfs).

So the correct thing is to always call SMB_VFS_IS_OFFLINE()
when checking whether a file is offline. For the pread and pwrite
calls, we need to call IS_OFFLINE before the actual read
and check afterwards if the file was offline before (as a basis
whether to send notifications).

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
2014-07-24 11:56:09 +02:00
Michael Adam
44e9ab21dd Revert "s3:vfs:gpfs: log when winAttr-garbage is detected (by heuristics) in is_offline"
This reverts commit 8f44883db94314c007c197927a9dd0809076754d.

The next commits will be removing all access to stat_ex.vfs_private from
vfs_gpfs. This revert of the last addition is a preparation.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
2014-07-24 11:56:09 +02:00
Volker Lendecke
2f86c7d3f8 smbd: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jul 22 17:57:56 CEST 2014 on sn-devel-104
2014-07-22 17:57:56 +02:00
Volker Lendecke
67fb294e64 smbd: ?True:False is pretty pointless :-)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:40 +02:00
Volker Lendecke
c6ec923dce smbd: Add missing {}
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:40 +02:00
Volker Lendecke
7dee885cc6 smbd: Remove superfluous ()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:39 +02:00
Volker Lendecke
d27f3ef318 smbd: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:39 +02:00
Volker Lendecke
188017ea32 smbd: Simplify brl_locktest
Pass "struct lock_struct" as a parameter. This had to be destructured
before the call and re-constructed inside brl_locktest.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:39 +02:00
Volker Lendecke
50b74ccb6a smbd: Restructure brl_conflict_other
It took me really long to grasp what's going on in this routine. I hope
its logic is easier to understand now

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:39 +02:00
Volker Lendecke
a48c0a42ce smbd: Fix indentation, {} and line length in brl_conflict_other
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:39 +02:00
Volker Lendecke
2d8576ea7c smbd: Rename lck2->rw_probe in brl_conflict_other
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:39 +02:00
Volker Lendecke
e75e4b2ed8 smbd: Rename lck1->lock in brl_conflict_other
lck1 and lck2 are treated differently. They should carry more descriptive
names.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:39 +02:00
Volker Lendecke
432130c572 smbd: Use a struct initializer brl_lock
Avoids a #ifdef DEVELOPER and saves a few bytes .text

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:39 +02:00
Volker Lendecke
164e0cb23c smbd: Simplify strict_lock_default with early returns
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:39 +02:00
Volker Lendecke
ff9a0a8993 smbd: Use %ju/uintmax_t in source3/locking
Avoid going through (double) and %.0f

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:39 +02:00
Volker Lendecke
823215bf98 smbd: "err" is no longer set in get_lock_offset
This was only referenced in the !HAVE_LONGLONG section

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:39 +02:00
Volker Lendecke
bd787beee9 smbd: Add comments
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:39 +02:00
Volker Lendecke
b3d1d56b5e smbd/nmbd: Remove HAVE_LONGLONG
We always have 64-bit variables available by now

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:39 +02:00
Volker Lendecke
f77caa3325 smbd: Simplify unpack_nt_owners
The separate variables are not really required

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:39 +02:00