1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/source3/smbd
Jeremy Allison 3d4a9ddc24 Based on a conversation with Volker, refactor some of the oplock code to make it comprehensible.
delay_for_oplocks() did 4 things.

1). Validation of existing oplock types.
2). Check for compatibility with batch oplocks (pass 1).
3). Check for compatibility with exclusive oplocks (pass 2).
4). Set the correct oplock type from the requested value.

Refactor into 4 separate functions:

1). find_oplock_types() - does validation of oplock types and
	returns pointers to specific values.
2). delay_for_batch_oplocks() - the pass 1 phase above.
3). delay_for_exclusive_oplocks() - the pass 2 phase above
4). grant_fsp_oplock_type() - Set the correct oplock type from the requested value.

Now separated out this code should be much easier to understand
and modify. This also fixes an erroneous SMB_ASSERT which was
hidden by the previous complexity of the single delay_for_oplocks()
code.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Feb  2 01:52:21 CET 2011 on sn-devel-104
2011-02-02 01:52:21 +01:00
..
aio.c Change interface of schedule_smb2_aio_read() to allocate the return DATA_BLOB. 2010-12-15 01:38:16 +01:00
avahi_register.c
blocking.c s3: Remove smbd_server_conn from process_blocking_lock_cancel_message 2010-10-03 18:17:09 +02:00
close.c Fix bug #7863 - Unlink may unlink wrong file when hardlinks are involved. 2011-01-25 14:23:19 -08:00
conn.c 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
connection.c s3-build: use dbwrap.h only where needed. 2010-08-26 00:25:55 +02:00
dfree.c
dir.c Add uint32_t name_hash argument (currently unused) to get_file_infos(). 2011-01-25 14:02:18 -08:00
dmapi.c s3: I thought I had compiled this.... 2010-10-03 13:22:03 +02:00
dnsregister.c
dosmode.c Fix bug #7892 - open_file_fchmod() leaves a stale lock. 2010-12-29 02:15:23 +01:00
error.c
fake_file.c s3-build: only include "fake_file.h" where needed. 2010-08-26 00:20:28 +02:00
file_access.c libcli/security Provide a common, top level libcli/security/security.h 2010-10-12 05:54:10 +00:00
fileio.c Keep track of the sparse status of an open file handle. Allows bypass of 2010-12-21 04:12:22 +01:00
filename_util.c
filename.c Fix bug #7863 - Unlink may unlink wrong file when hardlinks are involved. 2011-01-25 14:23:19 -08:00
files.c Add name_hash to files_struct. Set within fsp_set_smb_fname(). 2011-01-25 13:49:01 -08:00
globals.c s3-printing: Initiate pcap reload from parent smbd 2011-01-07 15:37:39 -08:00
globals.h s3-printing: Initiate pcap reload from parent smbd 2011-01-07 15:37:39 -08:00
ipc.c s3: Make srv_send_smb take an sconn instead of a sock fd 2010-08-24 21:06:41 +02:00
lanman.c s3-lanman: prefer dcerpc_samr_X functions. 2011-02-01 16:45:10 +01:00
mangle_hash2.c s3-build: include mangle.h only where needed. 2010-08-26 00:20:29 +02:00
mangle_hash.c s3-build: include mangle.h only where needed. 2010-08-26 00:20:29 +02:00
mangle.c s3-build: include mangle.h only where needed. 2010-08-26 00:20:29 +02:00
message.c
msdfs.c Fix bug 7781 - Samba transforms ShareName to lowercase (sharename) when adding new share via MMC 2010-11-10 01:14:17 +00:00
negprot.c s3: Fix some nonempty blank lines 2010-12-19 23:25:06 +01:00
noquotas.c
notify_inotify.c
notify_internal.c Change to using TDB_INCOMPATIBLE_HASH (the jenkins hash) on all 2010-09-27 17:18:54 -07:00
notify.c s3-notify: use autogenerated FILE_NOTIFY_INFORMATION marshalling in smbd. 2010-07-07 13:54:57 +02:00
ntquotas.c
nttrans.c Add uint32_t name_hash argument (currently unused) to get_file_infos(). 2011-01-25 14:02:18 -08:00
open.c Based on a conversation with Volker, refactor some of the oplock code to make it comprehensible. 2011-02-02 01:52:21 +01:00
oplock_irix.c s3: Attempt to fix the IRIX build 2010-10-03 10:54:28 +02:00
oplock_linux.c s3: Lift smbd_server_conn from file_find_fd 2010-09-28 07:36:18 +02:00
oplock_onefs.c
oplock.c Ensure we send the direct levelII oplock break to the correct fid. 2011-02-01 00:39:56 +01:00
password.c Remove fstring from map_username. Create a more sane interface than the called-parameter-is-modified. 2010-11-10 01:14:17 +00:00
perfcount.c s3: Make g_smb_perfcount_handlers static 2010-06-14 12:06:52 +02:00
pipes.c libcli/security Provide a common, top level libcli/security/security.h 2010-10-12 05:54:10 +00:00
posix_acls.c Fix bug #7892 - open_file_fchmod() leaves a stale lock. 2010-12-29 02:15:23 +01:00
process.c s3:smbd: let smbd_server_connection_loop_once() check for select errors 2011-01-31 16:16:09 +01:00
quotas.c s3:smbd: add nfs quota support to the linux-non-sysquota code 2010-08-25 14:05:51 +02:00
reply.c Looking into printer driver issues, I ran across some peculiarities in 2011-01-27 00:59:56 +01:00
seal.c s3: Fix input check in is_encrypted_packet 2010-10-08 07:40:51 +00:00
sec_ctx.c s3-auth Use security_token_debug() from common code 2010-10-14 02:35:04 +00:00
server_exit.c s3-rpcecho: Only register rpcecho in the developer build. 2011-01-04 18:56:38 +01:00
server_reload.c s3-printing: Initiate pcap reload from parent smbd 2011-01-07 15:37:39 -08:00
server.c s3-printing: Initiate pcap reload from parent smbd 2011-01-07 15:37:39 -08:00
service.c Move the uglyness of #ifdef REALPATH_TAKES_NULL into the vfs_default 2010-11-20 02:15:50 +01:00
session.c s3-build: use dbwrap.h only where needed. 2010-08-26 00:25:55 +02:00
sesssetup.c Remove fstring from map_username. Create a more sane interface than the called-parameter-is-modified. 2010-11-10 01:14:17 +00:00
share_access.c Remove fstring from map_username. Create a more sane interface than the called-parameter-is-modified. 2010-11-10 01:14:17 +00:00
signing.c s3:smbd: use anonymous_shared_free() for shared memory signing state 2011-01-20 07:48:29 +01:00
smb2_break.c
smb2_close.c
smb2_create.c Add uint32_t name_hash argument (currently unused) to get_file_infos(). 2011-01-25 14:02:18 -08:00
smb2_find.c
smb2_flush.c
smb2_getinfo.c We need to reply to SMB2_GETINFO_FILE with a class of SMB2_FILE_STANDARD_INFO on an IPC$ share. 2011-01-28 22:53:18 +01:00
smb2_glue.c s3: Remove a direct reference to smbd_server_conn 2010-08-08 16:03:15 +02:00
smb2_ioctl.c
smb2_keepalive.c
smb2_lock.c s3: Remove smbd_server_conn from smb2 receive_unlock_msg 2010-10-03 18:17:08 +02:00
smb2_negprot.c Move the addition of the 16 byte guid out of spnego_gen_negTokenInit() and 2010-07-19 16:45:16 -07:00
smb2_notify.c s3: change_notify_reply() does not need its "conn" argument 2010-06-12 15:42:55 +02:00
smb2_read.c Implement "use sendfile = yes" for SMB2. (cherry picked from commit 95cb7adcd03a1abbd0af395b6c96dd8e0eebd3d1) 2010-12-15 02:24:08 +01:00
smb2_server.c Change "security=share" to downgrade to SMB1 from SMB2, rather than trying to fake it. 2011-01-27 15:26:47 -08:00
smb2_sesssetup.c s3-smbd: use make_server_info_krb5() in smb2 too. 2010-08-30 14:24:46 +02:00
smb2_setinfo.c Don't rely on the underlying ACL modules to enforce share level 2010-09-08 20:54:38 -07:00
smb2_signing.c
smb2_tcon.c Fix bug 7781 - Samba transforms ShareName to lowercase (sharename) when adding new share via MMC 2010-11-10 01:14:17 +00:00
smb2_write.c Implement AIO in SMB2. Doesn't allow cancel calls yet (to be added). 2010-06-10 13:20:37 -07:00
srvstr.c
statcache.c s3-build: only include memcache.h where needed. 2010-08-26 00:20:28 +02:00
statvfs.c
trans2.c Fix bug #7863 - Unlink may unlink wrong file when hardlinks are involved. 2011-01-25 14:23:19 -08:00
uid.c s3-smbd: Fixed a possible null pointer dereference. 2011-01-19 22:27:48 +01:00
utmp.c
vfs.c Added call out to a Linux-compatible fallocate() when we need to extend a file 2010-12-21 02:41:23 +01:00