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

5840 Commits

Author SHA1 Message Date
Jeremy Allison
e00c2b3cdf Add code to implement SeSecurityPrivilege in net rpc rights, and in the
open and get/set NT security descriptor code.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Oct 21 00:15:57 UTC 2010 on sn-devel-104
2010-10-21 00:15:57 +00:00
Jeremy Allison
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
Volker Lendecke
efb22bf782 s3: Add some DEBUG
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Oct 20 11:58:20 UTC 2010 on sn-devel-104
2010-10-20 11:58:20 +00:00
Volker Lendecke
da00021a7c s3: Cope with EINTR in smbd_[un]lock_socket 2010-10-20 13:14:57 +02:00
Jeremy Allison
e7d0f478ee Add deadtime detection for SMB2. Correctly update lastused timestamp across all active tcons. Should fix dfree cache not updating bug. 2010-10-19 15:13:17 -07:00
Jeremy Allison
d7f4bea394 Add SMB2 paths to smbd/conn.c. Except for conn_idle_all(), to be cleaned up next. 2010-10-19 15:13:17 -07:00
Jeremy Allison
1bd6faa8fa Copyright/whitespace/comment cleanup in preparation for adding SMB2 paths. 2010-10-19 15:13:17 -07:00
Jeremy Allison
edefaf5bed Move tcons.num_open from smb1 to sconn->num_tcons_open as this is needed for SMB2 also. 2010-10-19 15:13:17 -07:00
Jeremy Allison
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
Jeremy Allison
1904c44ec8 Fix handling of "NULL" DACL. Map to u/g/w - rwx.
Jeremy.
2010-10-15 17:38:22 -07:00
Jeremy Allison
e031f8ae6a Fix "force unknown ACL user" to strip out foreign SIDs from POSIX ACLs if they can't be mapped. 2010-10-15 17:38:22 -07:00
Jeremy Allison
8cad5e23b6 Fix bug #7734 - When creating files with "inherit ACLs" set to true, we neglect to apply appropriate create masks.
Jeremy.
2010-10-15 17:38:21 -07:00
Jeremy Allison
92adb68637 Fix bug #7733 - Invalid client DOS attributes on create can cause incorrect unix mode_t to be generated.
It turns out a client can send an NTCreateX call for a new file, but specify
FILE_ATTRIBUTE_DIRECTORY in the attribute list. Windows silently strips this,
but we don't - causing the unix_mode() function to go through the "mode bits
for new directory" codepath, instead of the "mode bits for new file" codepath.

Jeremy.
2010-10-15 17:38:21 -07:00
Volker Lendecke
c2533f94b5 s3: Remove smbd_server_conn from construct_reply
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Oct 14 12:35:07 UTC 2010 on sn-devel-104
2010-10-14 12:35:07 +00:00
Volker Lendecke
63e08ef885 s3: Lift smbd_server_conn from receive_smb_talloc 2010-10-14 13:53:07 +02:00
Volker Lendecke
a2db154caa s3: Lift smbd_server_conn from receive_smb_raw_talloc 2010-10-14 13:53:07 +02:00
Volker Lendecke
fa0de39551 s3: Lift smbd_server_conn from receive_smb_raw_talloc_partial_read 2010-10-14 13:53:07 +02:00
Volker Lendecke
cac60a7041 s3: Remove some explicit smbd_server_conn refs in process_smb() 2010-10-14 13:53:06 +02:00
Volker Lendecke
81bdb5910c s3: Rename "conn" to the more used "sconn" in process_smb() 2010-10-14 13:53:06 +02:00
Andrew Bartlett
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
Andrew Bartlett
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.

This includes (along with other security headers) dom_sid.h and
security_token.h

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Jeremy Allison
6f4e782c53 Canonicalize incoming and outgoing ACLs.
Jeremy.
2010-10-11 17:10:28 -07:00
Jeremy Allison
71d9f51b4e Make the posix ACL module cope with a NULL incoming DACL and a
missing owner/group.

Jeremy.
2010-10-11 17:07:54 -07:00
Volker Lendecke
615482a83d s3: Hang the isilon kernel oplocks off the NULL context
All I see is a fd_event that does not need a special destructor.

Tim, Steven, I've added the #error as well for you to remove after review.

Thanks,

Volker

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Oct  8 20:48:11 UTC 2010 on sn-devel-104
2010-10-08 20:48:11 +00:00
Volker Lendecke
703e438599 s3: Hang the irix kernel oplocks off the NULL ctx
Just a fd_event to be cleaned up. The pipe is closed implicitly.
2010-10-08 21:11:46 +02:00
Volker Lendecke
613a0b6c00 s3: Hang the linux kernel oplocks off the NULL ctx
The destructor that is called removes the signal handler. But at process
exit the signal handling is lost anyway.
2010-10-08 21:11:46 +02:00
Volker Lendecke
ef96bfe885 s3: Call printer_list_parent_init in the parent
Simo, please check!
2010-10-08 21:11:46 +02:00
Volker Lendecke
b5ed09c3af Move talloc_enable_null_tracking() to the s3 daemons 2010-10-08 21:11:45 +02:00
Volker Lendecke
7915142848 s3: Fix input check in is_encrypted_packet
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Oct  8 07:40:52 UTC 2010 on sn-devel-104
2010-10-08 07:40:51 +00:00
Jeremy Allison
cd04af78d5 Fix bug 7716 - acl_xattr and acl_tdb modules don't store unmodified copies of security descriptors.
As pointed out by an OEM, the code within smbd/posix_acl.c, even though passed
a const pointer to a security descriptor, still modifies the ACE entries within
it (which are not const pointers).

This means ACLs stored in the extended attribute by the acl_xattr module have
already been modified by the POSIX acl layer, and are not the original intent
of storing the "unmodified" ACL from the client.

Use dup_sec_desc to make a copy of the incoming ACL on talloc_tos() - that
is what is then modified inside smbd/posix_acl.c, leaving the original ACL
to be correctly stored in the xattr.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct  8 00:37:53 UTC 2010 on sn-devel-104
2010-10-08 00:37:53 +00:00
Volker Lendecke
fd9effce2b s3: Fix the async echo responder for netbios keepalives
This fixes a crash in the echo responder when the client started to send the
NetBIOS-Level 0x85-style keepalive packets. We did not correctly check the
packet length, so the code writing the signing seqnum overwrote memory after
the malloc'ed area for the 4 byte keepalive packet.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Oct  7 19:47:35 UTC 2010 on sn-devel-104
2010-10-07 19:47:35 +00:00
Jeremy Allison
0cec0f0912 Fix crash in SMB2 rename found by gentest. We must always have an lcomp
in the destination struct for a rename, so set the flag appropriately.

Jeremy.
2010-10-06 22:59:15 +00:00
Volker Lendecke
342c79e265 s3: Make the write end of the echo responder pipe non-blocking
Without this, we can get a writable pipe end, but the writev call on the pipe
will block.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Oct  6 13:57:30 UTC 2010 on sn-devel-104
2010-10-06 13:57:30 +00:00
Jeremy Allison
77622acadd Fix crash in SMB2 rename found by gentest. We must always have an lcomp
in the destination struct for a rename, so set the flag appropriately.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct  6 00:29:51 UTC 2010 on sn-devel-104
2010-10-06 00:29:51 +00:00
Volker Lendecke
ea08cd280c s3: Stop using the write cache after an oplock break
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Oct  5 10:09:38 UTC 2010 on sn-devel-104
2010-10-05 10:09:38 +00:00
Volker Lendecke
79a4be4f77 s3: Remove smbd_server_conn from msg_force_tdis 2010-10-03 18:17:09 +02:00
Volker Lendecke
e128b23165 s3: Remove smbd_server_conn from process_blocking_lock_cancel_message 2010-10-03 18:17:09 +02:00
Volker Lendecke
c0eb35c0a2 s3: Remove smbd_server_conn from smb1 receive_unlock_msg 2010-10-03 18:17:09 +02:00
Volker Lendecke
db607331d3 s3: Remove smbd_server_conn from msg_file_was_renamed 2010-10-03 18:17:09 +02:00
Volker Lendecke
3cf3d54fbc s3: Remove smbd_server_conn from validate_my_share_entries 2010-10-03 18:17:09 +02:00
Volker Lendecke
924357ab52 s3: Remove smbd_server_conn from msg_close_file 2010-10-03 18:17:09 +02:00
Volker Lendecke
898f7c9603 s3: Remove smbd_server_conn from smb2 receive_unlock_msg 2010-10-03 18:17:08 +02:00
Volker Lendecke
554f5e7c60 s3: Remove smbd_server_conn from process_kernel_oplock_break 2010-10-03 18:17:08 +02:00
Volker Lendecke
5d1d575e87 s3: Remove smbd_server_conn from process_oplock_break_message 2010-10-03 18:17:08 +02:00
Volker Lendecke
35d6d44e5a s3: Remove smbd_server_conn from process_oplock_async_level2_break_message 2010-10-03 18:17:08 +02:00
Volker Lendecke
1d3aa74e4c s3: Lift smbd_server_conn from initial_break_processing 2010-10-03 18:17:08 +02:00
Volker Lendecke
fb2f0c5bdd s3: Add msg_ctx_to_sconn 2010-10-03 18:17:08 +02:00
Volker Lendecke
4a768fbef7 s3: I thought I had compiled this.... 2010-10-03 13:22:03 +02:00
Volker Lendecke
ff48f7c00c s3: Attempt to fix the IRIX build 2010-10-03 10:54:28 +02:00
Volker Lendecke
97b76364e7 s3: Attempt to fix a ton of warnings on the build farm 2010-10-03 10:51:08 +02:00
Volker Lendecke
c87d4e5ddb s3: Remove talloc_autofree_context() from dmapi.c
This is a place where an explicit dmapi_destroy_session would be needed. But we
don't use a destructor for this.
2010-10-03 10:45:57 +02:00
Steven Danneman
100843ac23 s3:smbd: Increase unsupported IOCTL debug message to 2
Even printing once per connection, level 0 was too spammy with
Windows clients frequently sending FSCTL_GET_OBJECT_ID which
is unsupported.
2010-10-01 13:31:33 -07:00
Steven Danneman
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
Günther Deschner
b38d0542e1 samba: share select wrappers.
Guenther
2010-10-01 22:30:22 +02:00
Volker Lendecke
a3e211ca3f s3: Attempt to fix bug 7518
If select returns -1, we can't rely on the fd sets. The current code might loop
endlessly because when putting an invalid fd (the closed socket?) on the read
set, a select implementation might choose not to touch it but directly return
with EINVAL. Thus run_events will see the socket readable, which leads to a
"return true", and thus a NT_STATUS_RETRY -> same game again.

We should never get into this situation, but to me the logfiles given in bug
7518 do not reveal enough information to understand how this can happen.
2010-09-28 19:22:50 +02:00
Volker Lendecke
51bc104c5c s3: Increase the debuglevel for connection termination msgs 2010-09-28 10:40:17 +02:00
Volker Lendecke
94dc2c106b s3: Lift smbd_messaging_context() from open_sockets_smbd() 2010-09-28 07:36:18 +02:00
Volker Lendecke
790ad3d1a4 s3: Remove two calls to procid_self() 2010-09-28 07:36:18 +02:00
Volker Lendecke
49b4d2e652 s3: Remove some remaining files.c globals to sconn 2010-09-28 07:36:18 +02:00
Volker Lendecke
d26d79b640 s3: Remove talloc_autofree_context() from files.c 2010-09-28 07:36:18 +02:00
Volker Lendecke
eadc4b5b78 s3: Lift smbd_server_conn from file_find_fd 2010-09-28 07:36:18 +02:00
Volker Lendecke
54f7b70212 s3: Remove smbd_server_conn from file_fsp 2010-09-28 07:36:18 +02:00
Volker Lendecke
3009178ee5 s3: Slightly simplify file_fnum
req==NULL should never happen, see the comment
2010-09-28 07:36:18 +02:00
Volker Lendecke
e57811440a s3: Remove smbd_server_conn from file_sync_all 2010-09-28 07:36:17 +02:00
Volker Lendecke
e2222fc19c s3: Remove smbd_server_conn from file_find_subpath 2010-09-28 07:36:17 +02:00
Volker Lendecke
75c6e0e5c7 s3: Lift smbd_server_conn from file_find_di_first 2010-09-28 07:36:17 +02:00
Volker Lendecke
b448e42de4 s3: Lift smbd_server_conn from file_find_dif 2010-09-28 07:36:16 +02:00
Volker Lendecke
fb8686962a s3: Remove smbd_server_conn from files_forall 2010-09-28 07:36:16 +02:00
Volker Lendecke
9fc9ff9bfa s3: Remove smbd_server_conn from file_close_user 2010-09-28 07:36:16 +02:00
Volker Lendecke
25ca1cd1a8 s3: Remove smbd_server_conn from file_close_pid 2010-09-28 07:36:16 +02:00
Volker Lendecke
6a1c4bad13 s3: Remove smbd_server_conn from file_close_conn 2010-09-28 07:36:16 +02:00
Volker Lendecke
c5d2799543 s3: Remove smbd_server_conn from file_new and file_free 2010-09-28 07:36:15 +02:00
Volker Lendecke
5276608151 s3: Lift smbd_server_conn from file_fnum 2010-09-28 07:36:15 +02:00
Volker Lendecke
5e26e4d30f s3: Move "Files" to smbd_server_connection 2010-09-28 07:36:15 +02:00
Volker Lendecke
f83e7d8f8c s3: Remove "server_fd" global variable 2010-09-28 07:36:15 +02:00
Jeremy Allison
a738f5b846 Small tweak to bugfix for 7698 - Assert causes smbd to panic on invalid NetBIOS session request.
Don't just fail to reply on a bad NBT name, just don't do the
internal action.

Jeremy.
2010-09-27 18:24:53 -07:00
Jeremy Allison
f98d217514 Change to using TDB_INCOMPATIBLE_HASH (the jenkins hash) on all
TDB_CLEAR_IF_FIRST tdb's. For tdb's like gencache where we open
without CLEAR_IF_FIRST and then with CLEAR_IF_FIRST if corrupt
this is still safe to use as if opening an existing tdb the new
hash will be ignored - it's only used on creating a new tdb not
opening an old one.

Jeremy.
2010-09-27 17:18:54 -07:00
Volker Lendecke
3235f44ac4 s3: Make file_fnum static 2010-09-27 18:14:47 +02:00
Volker Lendecke
f1c1959f13 s3: Remove some unused code 2010-09-27 18:14:47 +02:00
Volker Lendecke
6319e0da10 s3: Fix some comments 2010-09-27 18:14:47 +02:00
Volker Lendecke
3b2efdc7d7 s3: Remove talloc_autofree_context() from notify_internal_parent_init() 2010-09-26 17:36:40 +02:00
Jeremy Allison
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
Volker Lendecke
8a48ca4e3f s3: Remove talloc_autofree_context() from change_to_guest()
pass is freed at the exit of this routine
2010-09-26 03:29:29 +02:00
Volker Lendecke
34c0b166b6 s3: Remove talloc_autofree_context() from serverid_parent_init() 2010-09-26 03:29:28 +02:00
Volker Lendecke
8c55a9b459 s3: Remove talloc_autofree_context() from messaging_tdb_parent_init() 2010-09-26 03:29:28 +02:00
Volker Lendecke
dda1dd63d3 s3: Avoid an explicit ZERO_STRUCT 2010-09-26 01:12:37 +02:00
Volker Lendecke
6ee0d866c2 s3: Lift talloc_autofree_context() from make_auth_context_fixed() 2010-09-26 01:12:37 +02:00
Volker Lendecke
242e329610 s3: Lift talloc_autofree_context() from make_auth_context_subsystem() 2010-09-26 01:12:37 +02:00
Jeremy Allison
d8814b1a48 Fix bug 7694 - Crash bug with invalid SPNEGO token.
Found by the CodeNomicon test suites at the SNIA plugfest.

http://www.codenomicon.com/

If an invalid SPNEGO packet contains no OIDs we crash in the SMB1/SMB2 server
as we indirect the first returned value OIDs[0], which is returned as NULL.

Jeremy.
2010-09-23 21:44:24 -07:00
Jeremy Allison
7170b875c2 Thank goodness for code reviews. Volker caught - this should be lp_posix_pathnames()
not lp_unix_extensions().

Jeremy.
2010-09-22 18:34:19 -07:00
Jeremy Allison
314dc23ecf Fix bug #7693 - smbd changing mode of files on rename
When using "map archive", don't change the archive bit on
renames or writes with UNIX extensions turned on.

Jeremy.
2010-09-22 12:26:13 -07:00
Michael Adam
d25b2adf34 s3:registry: move prototype from reg_init_full.c to its own header. 2010-09-21 08:52:06 +02:00
Günther Deschner
4dbd743e46 s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.
Guenther
2010-09-20 14:04:37 -07:00
Günther Deschner
8e16d6dbdf s3-build: only include ctdbd_conn.h where needed.
Guenther
2010-09-20 13:54:50 -07:00
Günther Deschner
c7fe04abc7 s3-build: only include async headers where needed.
Guenther
2010-09-20 13:54:42 -07:00
Andrew Bartlett
6832d5e933 libcli/auth/ntlmssp Be clear about talloc parents for session keys
The previous API was not clear as to who owned the returned session key.
This fixes a valgrind-found use-after-free in the NTLMSSP key derivation code,
and avoids making allocations - we steal and zero instead.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-16 21:09:17 +10:00
Jeremy Allison
447d96878a Fix all sid_parse returns to be checked. Tidy up some checks and error
messages.

Jeremy.
2010-09-15 15:40:15 -07:00
Günther Deschner
db8cfda320 s3-smbd: prevent call_nt_transact_ioctl() crash in FSCTL_FIND_FILES_BY_SID case.
Jeremy, please check.

Guenther
2010-09-16 00:20:47 +02:00
Jeremy Allison
627de92521 Add check for invalid data size.
Jeremy.
2010-09-15 10:50:50 -07:00
Simo Sorce
8ec7aaef48 s3-rpc_server: Moved ncacn_np declarations in common header file.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-15 12:53:42 +02:00
Simo Sorce
5685914344 s3-rpc_server: Convert rpc_connect_spoolss_pipe into a generic interface.
This way we have one common way to open internal pipes whether they
are shortcircuited or piped to an external process.
2010-09-15 12:53:42 +02:00
Jeremy Allison
b3fccd10a6 Fix bug 7409 - Thousands of reduce_name: couldn't get realpath.
Don't log this at level 1 - every EACCES will generate one.
Thanks to muehlfeld@medizinische-genetik.de for pointing this out.

Jeremy.
2010-09-13 16:54:21 -07:00
Andrew Bartlett
3bb77516b8 s3-privs Convert from user_has_privileges() -> security_token_has_privilege()
This new call is available in the merged privileges code, and
takes an enum as the parameter, rather than a bitmask.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:09 +10:00
Andrew Bartlett
d1bb21b0d5 s3:auth Remove NT_USER_TOKEN
The all UPPER case typedef is no longer the preferred Samba style
and this makes it easier to see that this is the IDL-derivied structure

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:06 +10:00
Andrew Bartlett
4bfc8d3b1a s3-auth Change struct nt_user_token -> struct security_token
This common structure is defined in security.idl

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:05 +10:00
Jeremy Allison
a89b0ef53b Add check missing from previous patch after talloc_strdup().
Jeremy.
2010-09-10 23:33:18 -07:00
Jeremy Allison
1787c1dfc3 Factor out the recent changes into a function - check_parent_exists().
Fix this to ensure that if "start" is manipulated, then "dirpath"
is changed also.

Ensures that when the path:

/a/long/file/name/path.txt

is processed, we first stat:

/a/long/file/name/path.txt

and if this fails, we try to stat:

/a/long/file/name

if this path exists (the normal case when creating a new
entry in a directory) then we no longer do the individual
path name walk, but only do case insensitive lookup on the
last component. If the stat fails we do the full pathname
walk as normal in 3.5.x and below. Metze, examine this
change for your back-port.

Jeremy.
2010-09-10 23:28:15 -07:00
Andreas Schneider
fc1a5dbffb s3-spoolss: Don't leak memory on the session counter list.
Thanks Günther, please check.
2010-09-10 16:10:46 +02:00
Jeremy Allison
e6b85c2a7b More paranoia to ensure SD's can't be set on read-only shares.
Jeremy.
2010-09-09 15:28:43 -07:00
Andreas Schneider
021539570b s3-msdfs: Make auth_serversupplied_info const. 2010-09-09 16:00:08 +02:00
Jeremy Allison
bec9baf88a Don't rely on the underlying ACL modules to enforce share level
security when setting ACLs, check at the call level as well.

Jeremy.
2010-09-08 20:54:38 -07:00
Jeremy Allison
fcac46a612 Optimization suggested by Metze. Without this patch,
FindFirst with 'path\to\some\dir\with\files\*'

triggers the following stat calls

path\to\some\dir\with\files\* => ENOENT
path\
path\to\
path\to\some\
path\to\some\dir\
path\to\some\dir\with\
path\to\some\dir\with\files\
path\to\some\dir\with\files\* => ENOENT

With this patch we get :

path\to\some\dir\with\files\* => ENOENT
path\to\some\dir\with\files = OK

Jeremy.
2010-09-08 16:55:24 -07:00
Björn Jacke
f69085e5ff s3: use monotonic clock for aio timeout 2010-09-07 20:29:13 +02:00
Volker Lendecke
df19469295 s3: On Solaris, iov_len is an int
We can't use &iov.iov_len passing it to a size_t *
2010-09-05 16:41:28 +02:00
Volker Lendecke
5648c3f67e s3: messaging_ctdbd_connection() was only called with procid_self()
Eventually we'll get this right...
2010-08-31 17:07:41 +02:00
Björn Jacke
079baa7688 s3: use fine grained time in netprot response 2010-08-31 15:51:11 +02:00
Andrew Bartlett
8c15cf54ae s3-auth Rename NT_USER_TOKEN user_sids -> sids
This is closer to the struct security_token from security.idl
2010-08-31 10:20:14 +10:00
Volker Lendecke
6beb5563f3 s3: Fix a segfault in the printer code using create_conn_struct 2010-08-30 23:06:32 +02:00
Volker Lendecke
1d3bd5b1c0 s3: Fix some uninitialized variable warnings 2010-08-30 15:57:14 +02:00
Simo Sorce
f3501cf848 s3-smbd: use make_server_info_krb5() in smb2 too.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:24:46 +02:00
Simo Sorce
a413a86daa s3-smbd: use make_server_info_krb5()
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:24:38 +02:00
Simo Sorce
ce60d6d9cf s3-smbd: User helper function to resolve kerberos user for smb2
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:22:13 +02:00
Simo Sorce
94adbf3726 s3-smbd: Use helper function to resolve kerberos user
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:21:53 +02:00
Volker Lendecke
fbf3d03550 s3: Fix an uninitialized variable 2010-08-29 23:14:49 +02:00
Volker Lendecke
f687d43454 s3: Fix the build without cluster 2010-08-29 23:14:49 +02:00
Volker Lendecke
e466bb4af4 s3: Remove smbd_server_fd()
This breaks the perfcol_onefs() build.

Tim, Steve, this use of smbd_server_fd is replacable by calls into
substitute.c. I don't have a onefs environment around to build a fix, so I've
decided to insert an #error, making it not compile. The fix should be pretty
obvious, you can get the socket data via "%I" and "%i" substitutions.
2010-08-29 21:55:25 +02:00
Volker Lendecke
e784e160ec s3: Remove two uses of smbd_server_fd()
Actually, this is a bit cheating. But those two files depend on
smbd_server_conn anyway, it does not make things worse.
2010-08-29 21:55:25 +02:00
Volker Lendecke
744cc26451 s3: Remove smbd_server_fd() from smbd_register_ips 2010-08-29 21:55:24 +02:00
Volker Lendecke
5bbc4df168 s3: Lift smbd_server_fd() from msg_release_ip() 2010-08-29 21:55:24 +02:00
Volker Lendecke
467208e9f4 s3: Lift smbd_server_fd() from release_ip() 2010-08-29 21:55:24 +02:00
Volker Lendecke
6432383926 s3: Remove a use of smbd_server_fd() in smbd main()
The effect this might have is that we set the socket options a bit later in
inetd mode.
2010-08-29 21:55:24 +02:00
Volker Lendecke
70df6fcb2a s3: Pass sconn to check_reload
This removes a use of smbd_server_fd()
2010-08-29 21:55:24 +02:00
Volker Lendecke
babfe23717 s3: Pass sconn instead of msg_ctx to housekeeping_fn 2010-08-29 21:55:24 +02:00
Volker Lendecke
4a58c640cc s3: Set the client_id in substitute.c once
This never changes during a client connection's life, so we can set it
once.
2010-08-29 21:55:23 +02:00
Volker Lendecke
0a8d49575c s3: Remove some references to smbd_server_fd() 2010-08-28 15:05:27 +02:00
Volker Lendecke
755ef5cf11 s3: Remove smbd_server_fd() from set_local_machine_name() 2010-08-28 14:06:10 +02:00
Stefan Metzmacher
db6d1c6276 s3:smbd: s/sa_len/sa_socklen , because sa_len is a macro on IRIX
metze
2010-08-28 08:28:01 +02:00
Jeremy Allison
04f021e692 Fix bug #7653 - When SMB2 is on, Windows 7 clients can not connect as guest to a share.
Fix "security = share" with SMB2 by mapping internally
to "security = user" and "map to guest = Bad User".

Jeremy.
2010-08-27 15:25:04 -07:00
Jeremy Allison
5115f789c0 Fix bug #7651 - mknod and mkfifo fails with "No such file or directory"
Ensure we check the correct stat struct once we've created the
special fix. Thanks to izh1979@gmail.com for pointing out the
bug.

Jeremy.
2010-08-26 16:46:45 -07:00
Günther Deschner
7a05ca2c9c s3-build: use dbwrap.h only where needed.
Guenther
2010-08-26 00:25:55 +02:00
Günther Deschner
184339825d s3-build: include mangle.h only where needed.
Guenther
2010-08-26 00:20:29 +02:00
Günther Deschner
b5bdcdd65e s3-build: only include "fake_file.h" where needed.
Guenther
2010-08-26 00:20:28 +02:00
Günther Deschner
aba1bf4b5e s3-build: only include memcache.h where needed.
Guenther
2010-08-26 00:20:28 +02:00
Günther Deschner
e978a3d3f4 s3-lsa: separate out init_lsa headers.
Guenther
2010-08-25 22:50:39 +02:00
Michael Adam
be598569bb s3:smbd: add nfs quota support to the linux-non-sysquota code
This is based on the implementation for solaris and FreeBSD.
It makes rpc calls out to the nfs server to retrieve quota
information.
2010-08-25 14:05:51 +02:00
Volker Lendecke
d3a0ff311e s3: Make char_flags and base_reverse const arrays
This moves those arrays from dynamic to static, shared memory, removing them
from globals.c.

I did it by dumping the result of init_tables() with dump_data(). Some massage
by an editor macro made it the initializer.
2010-08-24 22:45:41 +02:00
Volker Lendecke
2d81721a3f s3: Move "trans_num" to smbd_server_connection 2010-08-24 21:06:41 +02:00
Volker Lendecke
1808dd0a85 s3: Make srv_send_smb take an sconn instead of a sock fd 2010-08-24 21:06:41 +02:00
Volker Lendecke
177e394f93 s3: Pass the rhost through smb_pam_accountcheck 2010-08-22 22:42:21 +02:00
Volker Lendecke
70c5bed4b2 s3: Replace calls to check_access by allow_access
We already have both the name and address of the client stored now
2010-08-22 14:28:34 +02:00