summaryrefslogtreecommitdiff
path: root/source3/smbd
AgeCommit message (Collapse)AuthorFilesLines
2010-03-26s3-smbd: Don't close stdout if we want to log to stdout.Andreas Schneider1-1/+1
2010-03-25Fix bug 7297 - smbd crashes with CUPS printers and no [printers] share defined.Jeremy Allison1-1/+1
Ensure we don't dereference an array with an index of -1. Jeremy.
2010-03-25s3: Add a comment to notify_internal_parent_init, this is pretty confusingVolker Lendecke1-0/+6
2010-03-25s3: Make sure our CLEAR_IF_FIRST optimization works for serverid.tdbVolker Lendecke1-0/+4
In the child, we fully re-open serverid.tdb, which leads to one fcntl lock for CLEAR_IF_FIRST detection per smbd. This opens the tdb in the parent and holds it, so that tdb_reopen_all correctly catches the CLEAR_IF_FIRST bit.
2010-03-25s3: Make sure our CLEAR_IF_FIRST optimization works for the notify tdbsVolker Lendecke2-0/+31
The notify tdb files are opened at tconX time, which leads to one fcntl lock for CLEAR_IF_FIRST detection per smbd. This opens the tdbs in the parent and holds it, so that tdb_reopen_all correctly catches the CLEAR_IF_FIRST bit.
2010-03-25s3: Make sure our CLEAR_IF_FIRST optimization works for messaging.tdbVolker Lendecke1-0/+4
In the child, we fully re-open messaging.tdb, which leads to one fcntl lock for CLEAR_IF_FIRST detection per smbd. This opens the tdb in the parent and holds it, so that tdb_reopen_all correctly catches the CLEAR_IF_FIRST bit.
2010-03-24Fix bug #7233 - print fails with jobs >4GB from Win7 clients.Jeremy Allison1-25/+53
Ensure we always write at end-of-file for older write calls. Jeremy.
2010-03-24Fix valgrind warning when source and dest stat are identical.Jeremy Allison1-1/+3
Jeremy.
2010-03-22s3: Implement an asynchronous echo responder processVolker Lendecke1-19/+478
This replies to echo requests when the main smbd is stuck somewhere Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-22s3:smbd: don't allow SMB2 if the async echo handler is activeStefan Metzmacher1-1/+2
metze
2010-03-22s3:smbd: disable SMB encryption when the echo handler is activeStefan Metzmacher1-0/+10
metze
2010-03-22s3:smbd: disallow readbraw and writebraw if the echo handler is activeStefan Metzmacher1-0/+17
metze
2010-03-22s3:smbd: disable sendfile if the echo handler is activeStefan Metzmacher1-0/+4
metze
2010-03-22s3:smbd: don't use recvfile if the echo handler is activeStefan Metzmacher1-1/+2
metze
2010-03-22s3:smbd: setup a shared memory area for the signing stateStefan Metzmacher1-0/+80
metze
2010-03-22s3:smbd: add echo handler information to struct smbd_server_connectionStefan Metzmacher2-0/+22
metze
2010-03-22s3:smbd: pass down trusted_channel via receive_smb_talloc()Stefan Metzmacher1-3/+5
metze
2010-03-22s3:smbd: let reply_readbraw_error use the locked socketStefan Metzmacher1-0/+11
metze
2010-03-22s3:smbd: send keepalive packets under the socket lockStefan Metzmacher1-1/+16
metze
2010-03-22s3:smbd: smbd_[un]lock_socket() while accessing the socket to the clientStefan Metzmacher1-1/+24
metze
2010-03-22s3:smbd: add smbd_[un]lock_socket() dummiesStefan Metzmacher2-0/+13
metze
2010-03-22s3:smbd: add an option to skip signings checks srv_check_sign_mac for ↵Stefan Metzmacher2-2/+24
trusted channels metze
2010-03-22s3: Add "log writeable files on exit" parameterVolker Lendecke1-0/+31
This boolean option controls whether at exit time the server dumps a list of files with debug level 0 that were still open for write. This is an administrative aid to find the files that were potentially corrupt if the network connection died.
2010-03-22s3: file_walk_table -> files_forallVolker Lendecke1-1/+1
This is more in line with the rest of the Samba code, like connections_forall etc.
2010-03-22s3: Fix some nonempty blank linesVolker Lendecke2-7/+6
2010-03-15s3: Fix an uninitialized variable readVolker Lendecke1-1/+1
Found by Laurent Gaffie <laurent.gaffie@gmail.com> Thanks for that, Volker
2010-03-15Remove the bool admin_user from conn struct. We no longer look at this to ↵Jeremy Allison2-6/+5
make access decisions. Jeremy.
2010-03-15Fix bug #7188 - Logic error in check of total_data for call_trans2mkdir()Jeremy Allison1-16/+13
Make ea data checks identical for trans2open and trans2mkdir. Jeremy.
2010-03-15Remove reference to conn->admin_user in preparation for removal.Jeremy Allison1-9/+13
We use (uid_t)0 here not sec_initial_uid() as make test uses a single user context. I will revisit this when all the uid check changes are complete. Jeremy.
2010-03-15Simplify processing of "admin user". If a user is an admin_user ensure their ↵Jeremy Allison1-15/+14
conn token is uid 0. This simplifies change_to_user() and removes special processing of the assignments we pass to set_sec_ctx(). Jeremy.
2010-03-15Switch over to using get_currect_XXX() accessor functions.Jeremy Allison5-33/+38
Jeremy.
2010-03-15Pass "connection_struct *conn" into functions that currently use ↵Jeremy Allison1-18/+20
"current_user.XXX" Will allow me to replace them with accessor functions. Jeremy.
2010-03-15Add accessor functions for current uid, gid, unix token, NT token and vuid.Jeremy Allison1-0/+43
Jeremy.
2010-03-15Rever e80ceb1d7355c8c46a2ed90d5721cf367640f4e8 "Remove more uses of "extern ↵Jeremy Allison7-122/+66
struct current_user current_user;"." As requested by Volker, split this into smaller commits. Jeremy.
2010-03-15s3:smbd: make sure we always have a valid talloc stackframeStefan Metzmacher1-0/+3
metze
2010-03-12Missed a couple more uses of conn->server_info->ptok that need to be ↵Jeremy Allison1-19/+22
get_current_nttok(conn) Centralize the root check into smb1_file_se_access_check() so this is used by modules/vfs_acl_common.c also. Jeremy.
2010-03-12Remove more uses of "extern struct current_user current_user;".Jeremy Allison7-67/+123
Use accessor functions to get to this value. Tidies up much of the user context code. Volker, please look at the changes in smbd/uid.c to familiarize yourself with these changes as I think they make the logic in there cleaner. Cause smbd/posix_acls.c code to look at current user context, not stored context on the conn struct - allows correct use of these function calls under a become_root()/unbecome_root() pair. Jeremy.
2010-03-11s3: Make init_smb_request return boolVolker Lendecke1-5/+10
Centralize the exit_server_cleanly()
2010-03-10Fix bug #7234 - Symlink delete fails but incorrectly reports success to client.Jeremy Allison1-1/+1
Typo called LSTAT instead of STAT in the unlink by pathname path. Jeremy.
2010-03-10s3: Fix a long-standing problem with recycled PIDsVolker Lendecke2-6/+37
When a samba server process dies hard, it has no chance to clean up its entries in locking.tdb, brlock.tdb, connections.tdb and sessionid.tdb. For locking.tdb and brlock.tdb Samba is robust by checking every time we read an entry from the database if the corresponding process still exists. If it does not exist anymore, the entry is deleted. This is not 100% failsafe though: On systems with a limited PID space there is a non-zero chance that between the smbd's death and the fresh access, the PID is recycled by another long-running process. This renders all files that had been locked by the killed smbd potentially unusable until the new process also dies. This patch is supposed to fix the problem the following way: Every process ID in every database is augmented by a random 64-bit number that is stored in a serverid.tdb. Whenever we need to check if a process still exists we know its PID and the 64-bit number. We look up the PID in serverid.tdb and compare the 64-bit number. If it's the same, the process still is a valid smbd holding the lock. If it is different, a new smbd has taken over. I believe this is safe against an smbd that has died hard and the PID has been taken over by a non-samba process. This process would not have registered itself with a fresh 64-bit number in serverid.tdb, so the old one still exists in serverid.tdb. We protect against this case by the parent smbd taking care of deregistering PIDs from serverid.tdb and the fact that serverid.tdb is CLEAR_IF_FIRST. CLEAR_IF_FIRST does not work in a cluster, so the automatic cleanup does not work when all smbds are restarted. For this, "net serverid wipe" has to be run before smbd starts up. As a convenience, "net serverid wipedbs" also cleans up sessionid.tdb and connections.tdb. While there, this also cleans up overloading connections.tdb with all the process entries just for messaging_send_all(). Volker
2010-03-09s3: Fix a NULL pointer dereferenceVolker Lendecke1-1/+10
Found by Laurent Gaffie <laurent.gaffie@gmail.com>. Thanks! Volker
2010-03-08Revert "Fix bug #7067 - Linux asynchronous IO (aio) can cause smbd to fail ↵Karolin Seeger1-8/+0
to respond to a read or write." This reverts commit a6ae7a552f851a399991262377cc0e062e40ac20. This fixes bug #7222 (All users have full rigths on all shares) (CVE-2010-0728). (cherry picked from commit 1c9494c76cc9686c61e0966f38528d3318f3176f)
2010-03-05Fix for bug #7189 - Open txt files with notepad on samba shares creates problem.Jeremy Allison7-25/+71
Ensure we don't use any of the create_options for Samba private use. Add a new parameter to the VFS_CREATE call (private_flags) which is only used internally. Renumber NTCREATEX_OPTIONS_PRIVATE_DENY_DOS and NTCREATEX_OPTIONS_PRIVATE_DENY_FCB to match the S4 code). Rev. the VFS interface to version 28. Jeremy.
2010-03-01s3: Abstract access to sessionid.tdb, similar to conn_tdb.cVolker Lendecke4-72/+18
2010-03-01s3: Add connections_forall_read()Volker Lendecke1-3/+2
In a cluster, this makes a large difference: For r/w traverse, we have to do a fetch_locked on every record which for most users of connections_forall is just overkill.
2010-03-01s3: Remove unused "mypid" from count_current_connections() stateVolker Lendecke1-2/+0
2010-02-28s3: Use talloc_tos() in yield_connection()Volker Lendecke1-1/+2
2010-02-28s3: Remove unused count_all_current_connections()Volker Lendecke1-9/+0
2010-02-25Fix up debug info on smb2_rename code.Jeremy Allison1-9/+3
Jeremy.
2010-02-25Implement rename/move in SMB2 from Windows7.Jeremy Allison2-1/+111
Jeremy.