diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-18 22:30:28 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-19 05:38:06 +0200 |
commit | 8a7c535db1f40a0f7c43d4e36227ad172bf6a654 (patch) | |
tree | cbde1eebf6f28c9e77338294fc2c63a5fb3e44ac /lib/ntdb/lock.c | |
parent | d48f6f884b2789828bb183249faf3918ec4e363a (diff) | |
download | samba-8a7c535db1f40a0f7c43d4e36227ad172bf6a654.tar.gz samba-8a7c535db1f40a0f7c43d4e36227ad172bf6a654.tar.bz2 samba-8a7c535db1f40a0f7c43d4e36227ad172bf6a654.zip |
ntdb: make fork test more thorough.
We document that the child of a fork() can do a brunlock() if the parent
does a brlock: we should not log an error when they do this.
Also, test the case where we fork() and return inside a parse function
(which is allowed).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/ntdb/lock.c')
-rw-r--r-- | lib/ntdb/lock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ntdb/lock.c b/lib/ntdb/lock.c index 167770d097..625a2c4934 100644 --- a/lib/ntdb/lock.c +++ b/lib/ntdb/lock.c @@ -232,7 +232,7 @@ static enum NTDB_ERROR ntdb_brunlock(struct ntdb_context *ntdb, return NTDB_SUCCESS; } - if (!check_lock_pid(ntdb, "ntdb_brunlock", true)) + if (!check_lock_pid(ntdb, "ntdb_brunlock", false)) return NTDB_ERR_LOCK; if (unlock(ntdb, rw_type, offset, len) == -1) { |