summaryrefslogtreecommitdiff
path: root/source3/locking
AgeCommit message (Collapse)AuthorFilesLines
2012-06-21s3:util: rename procid_equal() to serverid_equal()Michael Adam3-8/+8
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-21s3: Remove a user of procid_is_meVolker Lendecke1-1/+2
Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:locking: change locking.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam1-8/+8
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:locking: change brlock.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam1-4/+4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-14s3: Fix a commentVolker Lendecke1-15/+13
The fd count is implicit Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jun 14 01:53:17 CEST 2012 on sn-devel-104
2012-06-06s3:include: change lock_struct->fnum to uint64_tMichael Adam3-5/+6
Note: this changes the format of brlock.tdb! Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Wed Jun 6 23:22:00 CEST 2012 on sn-devel-104
2012-06-06s3:include: change connection_struct->cnum to uint32_tMichael Adam1-1/+1
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-06-03s3: Simplify get_delete_on_close_token moreVolker Lendecke1-6/+2
All remaining callers actually want the token Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-03s3: Simplify get_delete_on_close_token slightlyVolker Lendecke1-19/+32
Introduce find_delete_on_close_token. Thus is_delete_on_close_set does not have to call get_delete_on_close_token anymore. Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-01s3: Avoid a lot of calls to serverid_exists()Volker Lendecke1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Jun 1 18:58:30 CEST 2012 on sn-devel-104
2012-05-25s3: Do not check the PIDs is parse_share_modesVolker Lendecke1-42/+0
We do that when conflicts arise Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25s3: Be less picky on stale share mode entriesVolker Lendecke1-1/+3
If a process died, the share mode entry might be bogus. Ignore those entries. Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25s3: Check for serverid_exists in rename_share_filenameVolker Lendecke1-0/+4
Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25Fix an invalid state only reachable on server crash/abort.Jeremy Allison1-0/+11
Remove any delete-on-close tokens and clear the count if there are no valid share modes. Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25s3: Add "share_mode_stale_pid"Volker Lendecke2-0/+33
This is a helper routine that prunes a dead share mode entry on demand. This prepares for removing the serverids_exist call in parse_share_modes. Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-18Raise the debug level from 1 to 5 in get_share_mode_lock_internal()Jeremy Allison1-1/+2
This isn't a fatal condition, there is a valid codepath that can cause this message.
2012-05-18s3: Revert the serverid changes, they need more workVolker Lendecke3-40/+43
Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Fri May 18 13:12:14 CEST 2012 on sn-devel-104
2012-05-17s3: Be less picky on stale share mode entriesVolker Lendecke1-1/+3
If a process died, the share mode entry might be bogus. Ignore those entries. Signed-off-by: Jeremy Allison <jra@samba.org>
2012-05-17s3: Check for serverid_exists in rename_share_filenameVolker Lendecke1-0/+4
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-05-17s3: Do not check the PIDs is parse_share_modesVolker Lendecke1-42/+0
We do that when conflicts arise Signed-off-by: Jeremy Allison <jra@samba.org>
2012-05-17s3: Add "share_mode_stale_server"Volker Lendecke2-0/+33
This is a helper routine that prunes a dead share mode entry on demand. This prepares for removing the serverids_exist call in parse_share_modes. Signed-off-by: Jeremy Allison <jra@samba.org>
2012-05-14s3: talloc_zero is not needed for structs we ndr_pull intoVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Mon May 14 18:59:07 CEST 2012 on sn-devel-104
2012-04-19s3: Fix Coverity ID 2682 -- NULL_RETURNSVolker Lendecke1-3/+10
Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Thu Apr 19 22:28:34 CEST 2012 on sn-devel-104
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