1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-29 15:42:04 +03:00
Commit Graph

6087 Commits

Author SHA1 Message Date
14ff2e8de9 Fix bug #7700 - Improvement of return code of smbclient
Based on an initial patch from H Hasegawa <hasegawa.hiroyuki@fujixerox.co.jp>.
Convert cli_list and associated functions to take calls that return NTSTATUS.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 29 19:40:16 UTC 2010 on sn-devel-104
2010-10-29 19:40:16 +00:00
7b3fccd5b4 s3: Add async cli_setpathinfo 2010-10-24 20:46:28 +00:00
cbee24b2da s3:include: move debug.c prototypes to debug.h
metze
2010-10-24 18:40:13 +00:00
dbc934ee4b s3:include: move MAX_DEBUG_LEVEL from local.h to debug.h
metze
2010-10-24 18:40:13 +00:00
5a17d26e47 s3: Replace cli_qfileinfo_test with a call to cli_qfileinfo 2010-10-24 11:39:30 +02:00
c095809c04 s3: Convert cli_qfileinfo_basic to cli_qfileinfo 2010-10-24 11:39:30 +02:00
d864b1bace s3: Convert cli_qfilename to cli_qfileinfo 2010-10-24 11:39:30 +02:00
9423257806 s3: Add async cli_qfileinfo 2010-10-24 11:39:30 +02:00
03333fc68c s3: Rename cli_fileinfo() to cli_fileinfo_basic() 2010-10-24 11:39:29 +02:00
272feb7bd1 Revert "Wrap security_token_has_privilege() with a check for lp_enable_privileges(). Needed"
Not needed - privileges code prevents "enable privileges = no" from adding privileges
anyway.

This reverts commit a8b95686a7.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 22 23:41:36 UTC 2010 on sn-devel-104
2010-10-22 23:41:36 +00:00
a8b95686a7 Wrap security_token_has_privilege() with a check for lp_enable_privileges(). Needed
to maintain compatibility with smb.conf manpage.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 22 18:15:48 UTC 2010 on sn-devel-104
2010-10-22 18:15:48 +00:00
7a194c6e5e s3: Make "unpack_pjob" static
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Oct 20 16:51:04 UTC 2010 on sn-devel-104
2010-10-20 16:51:04 +00:00
347ca8f757 s3: Add any_nt_status_not_ok
This helps avoid quite a bit of repetitive code when looking at dcerpc_xx_recv
results.
2010-10-20 18:09:20 +02:00
e1cfca1e2e Make getpwnam_alloc() static to lib/username.c, and ensure all username lookups go
through Get_Pwnam_alloc(), which is the correct wrapper function. We were using
it *some* of the time anyway, so this just makes us properly consistent.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct 20 16:02:12 UTC 2010 on sn-devel-104
2010-10-20 16:02:12 +00:00
cf45581cdf Add make_default_filesystem_acl() function to be used in following change to acl_xattr and acl_tdb module. 2010-10-15 17:38:22 -07:00
f22e6cf3b7 s3-rpc_server: Make auth_serversupplied_info const. 2010-10-15 11:34:03 +00:00
a879a4610d libcli/auth Merge source4/libcli/security and util_sid.c into the common code
This should ensure we only have one copy of these core functions
in the tree.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-10-14 02:35:05 +00:00
8b22eefd25 libcli/security Define traditional constants in terms of IDL macros
The source3/ code uses these constants in a lot of places, and it will
take time and care to rename them, if that is desired.  Linking the
macros here will at least allow common code to use the IDL based macros,
and preserve a documentary link between the constants (other than just their value)

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-10-14 02:35:05 +00:00
949541cc6f libcli/security Move source3/lib/util_seaccess.c into the common code
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-10-14 02:35:05 +00:00
170b345e0c s3-auth Use security_token_debug() from common code
This prints the security token including the privileges as strings
instead of just a bitmap.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-10-14 02:35:04 +00:00
deb7c02436 s3 Replace is_sid_in_token() with security_token_has_sid() from common code
The two routines are identical, so there is no need to keep both.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-10-14 02:35:04 +00:00
9e1e581120 More neccessary const.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Oct  9 01:47:25 UTC 2010 on sn-devel-104
2010-10-09 01:47:25 +00:00
48dccbf2b5 s3: Move #define VALGRIND to config.h
This fixes the valgrind overrun in the tdb jenkins hash
2010-10-03 12:03:36 +02:00
97b76364e7 s3: Attempt to fix a ton of warnings on the build farm 2010-10-03 10:51:08 +02:00
455fccf86b s3:events: Call all ready fd event handlers on each iteration of the main loop
Previously, only one fd handler was being called per main message loop
in all smbd child processes.

In the case where multiple fds are available for reading the fd
corresponding to the event closest to the beginning of the event list
would be run.  Obviously this is arbitrary and could cause unfairness.

Usually, the first event fd is the network socket, meaning heavy load
of client requests can starve out other fd events such as oplock
or notify upcalls from the kernel.

In this patch, I have changed the behavior of run_events() to unset
any fd that it has already called a handler function, as well
as decrement the number of fds that were returned from select().
This allows the caller of run_events() to iterate it, until all
available fds have been handled.

I then changed the main loop in smbd child processes to iterate
run_events().  This way, all available fds are handled on each wake
of select, while still checking for timed or signalled events between
each handler function call.  I also added an explicit check for
EINTR from select(), which previously was masked by the fact that
run_events() would handle any signal event before the return code
was checked.

This required a signature change to run_events() but all other callers
should have no change in their behavior.  I also fixed a bug in
run_events() where it could be called with a selrtn value of -1,
doing unecessary looping through the fd_event list when no fds were
available.

Also, remove the temporary echo handler hack, as all fds should be
treated fairly now.
2010-10-01 13:31:33 -07:00
0ff7e0c998 samba: share readline wrappers among all buildsystems.
Guenther
2010-10-01 22:30:22 +02:00
405b7d843f s3-readline: move cmd_history to smbclient, the only user.
Guenther
2010-10-01 22:30:22 +02:00
b38d0542e1 samba: share select wrappers.
Guenther
2010-10-01 22:30:22 +02:00
48fca54a29 s3-spoolss: dont overwrite location change notify.
Guenther
2010-10-01 08:33:46 +02:00
3797d48b76 s3-spoolss: Fix servername/printername handling which turns out to be very important to get right.
Guenther
2010-09-30 02:59:35 +02:00
314d738f90 s3-printing: remove unused old structs.
Guenther
2010-09-28 09:40:57 +02:00
d26d79b640 s3: Remove talloc_autofree_context() from files.c 2010-09-28 07:36:18 +02:00
eadc4b5b78 s3: Lift smbd_server_conn from file_find_fd 2010-09-28 07:36:18 +02:00
75c6e0e5c7 s3: Lift smbd_server_conn from file_find_di_first 2010-09-28 07:36:17 +02:00
b448e42de4 s3: Lift smbd_server_conn from file_find_dif 2010-09-28 07:36:16 +02:00
fb8686962a s3: Remove smbd_server_conn from files_forall 2010-09-28 07:36:16 +02:00
9fc9ff9bfa s3: Remove smbd_server_conn from file_close_user 2010-09-28 07:36:16 +02:00
25ca1cd1a8 s3: Remove smbd_server_conn from file_close_pid 2010-09-28 07:36:16 +02:00
3235f44ac4 s3: Make file_fnum static 2010-09-27 18:14:47 +02:00
f1c1959f13 s3: Remove some unused code 2010-09-27 18:14:47 +02:00
3b2efdc7d7 s3: Remove talloc_autofree_context() from notify_internal_parent_init() 2010-09-26 17:36:40 +02:00
03841f9e44 Fix bug #7698 - Assert causes smbd to panic on invalid NetBIOS session request.
Found by the CodeNomicon test suites at the SNIA plugfest.

http://www.codenomicon.com/

If an invalid NetBIOS session request is received the code in name_len() in
libsmb/nmblib.c can hit an assert.

Re-write name_len() and name_extract() to use "buf/len" pairs and
always limit reads.

Jeremy.
2010-09-26 03:01:03 -07:00
34c0b166b6 s3: Remove talloc_autofree_context() from serverid_parent_init() 2010-09-26 03:29:28 +02:00
8c55a9b459 s3: Remove talloc_autofree_context() from messaging_tdb_parent_init() 2010-09-26 03:29:28 +02:00
6ee0d866c2 s3: Lift talloc_autofree_context() from make_auth_context_fixed() 2010-09-26 01:12:37 +02:00
242e329610 s3: Lift talloc_autofree_context() from make_auth_context_subsystem() 2010-09-26 01:12:37 +02:00
b11fff1f48 s3-dcerpc: remove auth_data_free_func
Everything is using a talloc pointer now, no need to have an
accessor function to free data anymore.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:24 -07:00
3453bc7b11 s3-dcerpc: make auth context opaque
This way we always double check in advance that the context
is of the right type with talloc_get_type_abort instead of
potentially accessing random memory by addressing the wrong
structure in the union.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:24 -07:00
d10e192b83 s3-dcerpc: finally remove the legaqcy spnego_type variable from pipe_auth_data
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:23 -07:00
4cdee9b0ed s3-dcerpc: add spnego server helpers
squashed: add michlistMIC signature checks

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:23 -07:00