summaryrefslogtreecommitdiffstats
path: root/source3/locking/locking.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:locking: add mark_share_mode_disconnected()Stefan Metzmacher2012-09-081-0/+38
| | | | Pair-Programmed-With: Michael Adam <obnox@samba.org>
* Move copy_unix_token() from locking/locking.c to lib/util.c.Jeremy Allison2012-07-031-29/+0
| | | | Make public.
* s3:util: rename procid_equal() to serverid_equal()Michael Adam2012-06-211-3/+3
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Remove a user of procid_is_meVolker Lendecke2012-06-211-1/+2
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: change locking.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-8/+8
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:include: change lock_struct->fnum to uint64_tMichael Adam2012-06-061-2/+2
| | | | | | | | | 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
* s3: Simplify get_delete_on_close_token moreVolker Lendecke2012-06-031-6/+2
| | | | | | All remaining callers actually want the token Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Simplify get_delete_on_close_token slightlyVolker Lendecke2012-06-031-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>
* s3: Avoid a lot of calls to serverid_exists()Volker Lendecke2012-06-011-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
* s3: Be less picky on stale share mode entriesVolker Lendecke2012-05-251-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>
* s3: Check for serverid_exists in rename_share_filenameVolker Lendecke2012-05-251-0/+4
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* Fix an invalid state only reachable on server crash/abort.Jeremy Allison2012-05-251-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>
* s3: Add "share_mode_stale_pid"Volker Lendecke2012-05-251-0/+32
| | | | | | | | 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>
* s3: Revert the serverid changes, they need more workVolker Lendecke2012-05-181-39/+1
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Fri May 18 13:12:14 CEST 2012 on sn-devel-104
* s3: Be less picky on stale share mode entriesVolker Lendecke2012-05-171-1/+3
| | | | | | If a process died, the share mode entry might be bogus. Ignore those entries. Signed-off-by: Jeremy Allison <jra@samba.org>
* s3: Check for serverid_exists in rename_share_filenameVolker Lendecke2012-05-171-0/+4
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* s3: Add "share_mode_stale_server"Volker Lendecke2012-05-171-0/+32
| | | | | | | 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>
* Found whilst back-porting the fix for bug 8837 - smbd crashes when deleting ↵Jeremy Allison2012-04-071-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
* Second part of bugfix for bug #8837 - smbd crashes when deleting directory ↵Jeremy Allison2012-04-041-8/+43
| | | | | | | 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.
* s3: get_share_mode_lock_fresh->get_share_mode_lockVolker Lendecke2012-02-191-1/+1
| | | | | | | 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
* s3: get_share_mode_lock->get_existing_share_mode_lockVolker Lendecke2012-02-191-5/+5
|
* Add comments to all functions (to help me understand it better).Jeremy Allison2012-01-131-0/+5
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jan 13 01:35:03 CET 2012 on sn-devel-104
* s3: Move the share_mode_lock handling to its own fileVolker Lendecke2012-01-121-415/+0
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* s3: Put an indirection layer into share_mode_lockVolker Lendecke2012-01-121-133/+147
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* s3: Introduce get_share_mode_lock_fresh()Volker Lendecke2012-01-121-11/+19
| | | | | | | | 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>
* s3: Replace fill_share_mode_lock()Volker Lendecke2012-01-121-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>
* Fix format warning message.Jeremy Allison2012-01-061-1/+1
|
* s3: Fix a 64-bit warningVolker Lendecke2011-12-251-1/+1
|
* s3:locking: avoid using sconn_server_id()Stefan Metzmacher2011-12-161-6/+6
| | | | metze
* s3: Fix a typoVolker Lendecke2011-12-151-1/+1
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Dec 15 23:35:28 CET 2011 on sn-devel-104
* s3: Remove UNUSED_SHARE_MODE_ENTRYVolker Lendecke2011-12-141-44/+19
|
* s3: Move can_set_delete_on_close to smbd/Volker Lendecke2011-12-131-59/+0
|
* s3: Use talloc_tos() in set_write_time()Volker Lendecke2011-12-131-1/+1
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Dec 13 15:44:58 CET 2011 on sn-devel-104
* s3: Use talloc_tos() in set_sticky_write_time()Volker Lendecke2011-12-131-1/+1
|
* s3: Use autogenerated open_files.idlVolker Lendecke2011-12-021-349/+65
|
* s3: Fix a valgrind errorVolker Lendecke2011-11-231-1/+1
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Nov 23 19:17:20 CET 2011 on sn-devel-104
* s3: Replace delete_token_list by an arrayVolker Lendecke2011-11-231-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
* s3: Use serverids_exist in parse_share_modesVolker Lendecke2011-10-271-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.
* s3: Use talloc_tos() in parse_share_modes()Volker Lendecke2011-10-271-1/+1
|
* Fix bug #8515 - Empty CIFS share can be blocked for other clients by ↵Volodymyr Khomenko2011-10-121-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
* s3:locking: convert locking.c to use dbwrap wrapper functions onlyMichael Adam2011-10-111-12/+31
| | | | Avoid direct use of the db_record and db_context structs.
* s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam2011-07-291-1/+1
| | | | | Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
* s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.Michael Adam2011-07-291-0/+1
| | | | | | 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.
* tdb_compat: Higher level API fixes.Rusty Russell2011-06-201-1/+1
| | | | | | | | | | | | 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>
* s3-talloc Change TALLOC_MEMDUP() to talloc_memdup()Andrew Bartlett2011-06-091-1/+1
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_MEMDUP isn't standard talloc.
* s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett2011-06-091-3/+3
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
* s3-talloc Change TALLOC_P() to talloc()Andrew Bartlett2011-06-091-3/+3
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_P isn't standard talloc.
* s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett2011-06-091-3/+3
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
* s3: Fix a tiny memleak in copy_unix_tokenVolker Lendecke2011-05-281-0/+1
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sat May 28 11:47:11 CEST 2011 on sn-devel-104
* s3: Use talloc_memdup in copy_unix_tokenVolker Lendecke2011-05-281-2/+2
|