summaryrefslogtreecommitdiff
path: root/source3/locking
AgeCommit message (Collapse)AuthorFilesLines
2012-04-07Found whilst back-porting the fix for bug 8837 - smbd crashes when deleting ↵Jeremy Allison1-9/+10
directory and veto files are enabled. The delete tokens are unique to each name hash representing a pathname, if we don't correctly return here we'll add duplicate tokens for a given pasname hash. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Apr 7 02:13:58 CEST 2012 on sn-devel-104
2012-04-06build: Remove SMB_OFF_T, replace with off_tAndrew Bartlett1-32/+32
Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Apr 6 01:47:43 CEST 2012 on sn-devel-104
2012-04-05build: Remove SMB_F* locking definesAndrew Bartlett1-6/+6
2012-04-05build: #ifdef LARGE_SMB_OFF_T as off_t is now always 64 bitsAndrew Bartlett1-15/+2
2012-04-04Second part of bugfix for bug #8837 - smbd crashes when deleting directory ↵Jeremy Allison2-10/+51
and veto files are enabled. Store the 'struct security_token' as well as the 'struct security_unix_token' inside the locking db when setting a delete on close.
2012-02-22s3: Add an error msg when a share mode entry is discardedVolker Lendecke1-0/+2
2012-02-19s3: get_share_mode_lock_fresh->get_share_mode_lockVolker Lendecke3-3/+3
get_share_mode_lock_fresh is just a confusing name Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Sun Feb 19 19:16:41 CET 2012 on sn-devel-104
2012-02-19s3: get_share_mode_lock->get_existing_share_mode_lockVolker Lendecke2-7/+7
2012-01-18s3: Add a "lock_order" argument to db_openVolker Lendecke2-2/+4
This will be used to enforce a lock hierarchy between the databases. We have seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb. These should be fixed by refusing a dbwrap_fetch_locked that does not follow a defined lock hierarchy.
2012-01-13s3: Fix the talloc hierarchy in fetch_share_mode_unlockedVolker Lendecke1-1/+1
Thanks, metze for noticing! Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri Jan 13 13:16:44 CET 2012 on sn-devel-104
2012-01-13Add comments to all functions (to help me understand it better).Jeremy Allison2-0/+32
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jan 13 01:35:03 CET 2012 on sn-devel-104
2012-01-12s3: Fix nested get_share_mode_lock callsVolker Lendecke1-5/+57
This forces us to only do one real get_share_mode_lock call and share the data between the nested get_share_mode_lock calls. Signed-off-by: Jeremy Allison <jra@samba.org>
2012-01-12s3: Move the share_mode_lock handling to its own fileVolker Lendecke2-415/+463
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-01-12s3: Put an indirection layer into share_mode_lockVolker Lendecke1-133/+147
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-01-12s3: Introduce get_share_mode_lock_fresh()Volker Lendecke2-15/+26
This slightly simplifies the code path for all callers which assume that a share mode exists already. Only the callers in open_file_ntcreate and open_directory will ever create new share modes. Signed-off-by: Jeremy Allison <jra@samba.org>
2012-01-12s3: Replace fill_share_mode_lock()Volker Lendecke1-84/+67
This replaces fill_share_mode_lock() with the two routines fresh_share_mode_lock() and parse_share_modes(). This lifts the decision whether a share mode already existed on level up. Signed-off-by: Jeremy Allison <jra@samba.org>
2012-01-06Fix format warning message.Jeremy Allison1-1/+1
2011-12-25s3: Fix a 64-bit warningVolker Lendecke1-1/+1
2011-12-16s3:locking: avoid using sconn_server_id()Stefan Metzmacher2-7/+7
metze
2011-12-15s3: Fix a typoVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Dec 15 23:35:28 CET 2011 on sn-devel-104
2011-12-14s3: Remove UNUSED_SHARE_MODE_ENTRYVolker Lendecke2-45/+19
2011-12-14s3:smbd: remove brl_register_msgs()Stefan Metzmacher2-12/+10
metze
2011-12-13s3: Move can_set_delete_on_close to smbd/Volker Lendecke2-60/+0
2011-12-13s3: Use talloc_tos() in set_write_time()Volker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Dec 13 15:44:58 CET 2011 on sn-devel-104
2011-12-13s3: Use talloc_tos() in set_sticky_write_time()Volker Lendecke1-1/+1
2011-12-12vfs: Make function pointer names consistent. They all end in _fnRichard Sharpe2-6/+8
Autobuild-User: Richard Sharpe <sharpe@samba.org> Autobuild-Date: Mon Dec 12 04:58:40 CET 2011 on sn-devel-104
2011-12-02s3: Use autogenerated open_files.idlVolker Lendecke1-349/+65
2011-11-25s3:locking:posix: remove uses of SMB_ASSERT() from get_windows_lock_ref_count()Michael Adam1-2/+13
SMB_ASSERT is useless, since in non-developer build it does not actually fail after the log message, but usual flow just continues. Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Nov 25 14:59:53 CET 2011 on sn-devel-104
2011-11-25s3:locking:posix: adapt use of dbrwrap_fetch() to new NTSTATUS semanticsMichael Adam1-5/+14
2011-11-23s3: Fix a valgrind errorVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Nov 23 19:17:20 CET 2011 on sn-devel-104
2011-11-23s3: Replace delete_token_list by an arrayVolker Lendecke1-50/+66
This will make it easier to convert locking.tdb to IDL, and I don't think there will be enough entries to justify a linked list over an array. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Nov 23 09:02:12 CET 2011 on sn-devel-104
2011-10-27s3: Use serverids_exist in parse_share_modesVolker Lendecke1-1/+23
This is the main reason for the preceding commits. We need to reduce the number of round-trips to ctdb when checking the locking record entries for existence. Using the plural version of process_exists gets the number of round-trips to ctdb for process_exists down to 1.
2011-10-27s3: Use talloc_tos() in parse_share_modes()Volker Lendecke1-1/+1
2011-10-12Fix bug #8515 - Empty CIFS share can be blocked for other clients by ↵Volodymyr Khomenko1-0/+8
deleting it via empty path (DELETE_PENDING until the last client) Disallow "." in can_set_delete_on_close(). Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Oct 12 21:07:27 CEST 2011 on sn-devel-104
2011-10-11s3:locking: convert posix.c to use dbwrap wrapper functions onlyMichael Adam1-29/+40
Avoid direct use of the db_record and db_context structs.
2011-10-11s3:locking: convert locking.c to use dbwrap wrapper functions onlyMichael Adam1-12/+31
Avoid direct use of the db_record and db_context structs.
2011-10-11s3:locking: convert brlock to only use dbwrap wrapper functionsMichael Adam1-15/+28
Avoid direct use of the db_record and db_context structs.
2011-10-11s3:dbwrap: move the db_open_rbt() prototype to a new header dbwrap_rbt.hMichael Adam1-0/+1
2011-07-29s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam3-3/+3
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
2011-07-29s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.Michael Adam2-0/+2
Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and make the fallbacke implementation functoins non-static and create a dbwrap_private.h header file that contains their prototypes.
2011-07-16Fix bug #8307 - brl_close_fnum does not call SMB_VFS_BRL_UNLOCK_WINDOWS on ↵Jeremy Allison1-122/+23
all locks Reported by herb@samba.org. Remove the (premature) optimization on file close. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Jul 16 02:32:02 CEST 2011 on sn-devel-104
2011-06-20tdb_compat: Higher level API fixes.Rusty Russell2-2/+2
My previous patches fixed up all direct TDB callers, but there are a few utility functions and the db_context functions which are still using the old -1 / 0 return codes. It's clearer to fix up all the callers of these too, so everywhere is consistent: non-zero means an error. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-09lib/util Bring procid_str() into lib/util as server_id_string()Andrew Bartlett1-1/+1
This is needed for OpenChange, which prints Samba struct server_id values in debug messages. Andrew Bartlett
2011-06-09s3-talloc Change TALLOC_MEMDUP() to talloc_memdup()Andrew Bartlett2-2/+2
Using the standard macro makes it easier to move code into common, as TALLOC_MEMDUP isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett2-4/+4
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_P() to talloc()Andrew Bartlett3-8/+8
Using the standard macro makes it easier to move code into common, as TALLOC_P isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett2-4/+4
Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
2011-05-31s3:locking/proto.h: add _LOCKING_PROTO_H_ guardMichael Adam1-0/+5
2011-05-31s3:locking/proto.h: add GPL/Copyright headerMichael Adam1-0/+21
2011-05-28s3: Fix a tiny memleak in copy_unix_tokenVolker Lendecke1-0/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sat May 28 11:47:11 CEST 2011 on sn-devel-104