Age | Commit message (Collapse) | Author | Files | Lines |
|
When a file is being closed, once it passes the fnum and tid tests then
the locking context should be ignored when removing all locks. This is
what is done in the brl close case, but when you have outstanding
POSIX locks, then you cannot remove all the brl locks in one go, you
have to get the lock list and call do_unlock individually. As this
uses global_smbpid as the locking context, you need to make sure
that this is set correctly for the specific lock being removed. I
now do this by storing the smbpid in each entry in the unlock list returned from
the query call. I removed the smbpid from fsp (not needed) and
things seem ok (even with the stupid smbpid tricks that smbtorture plays :-).
Jeremy.
(This used to be commit 6baa96bb466915cc17e8cbad50254d6bd47b967b)
|
|
smbpid used when a file was opened in the files_struct. Else we use
the wrong global_smbpid when we are closing the file and trying to
remove the brl locks - this causes the brl locks to be left when the
file is closed as the samba_context check fails.
Jeremy.
(This used to be commit 2746e5602e493e5b022764b4b839eb4d2f14363b)
|
|
removed from the smbd/open.c code.
We now use a dlink list of structures indexed by dev/inode to store
all pending fd's for close. This could be rewritten to use lib/hash.c
if this is discovered to be too slow in use.
Andrew, please take a look and let me know if this is what you
had in mind.
Jeremy.
(This used to be commit 0487841120a7584da9a2b83b9574562c415d7024)
|
|
test. Was miscounting posix locks, plus was not taking into account
the case where other_fsp == fsp in the 'move locks' case. DOH ! This
code will be re-written anyway :-).
Jeremy.
(This used to be commit 5278ec016cb24d8263fe6e7c1d389f466270ef24)
|
|
Jeremy.
(This used to be commit 9cde198108439358e99128fa9a1b3000e33f5414)
|
|
Jeremy.
(This used to be commit 4a4b7a994bbe327216f736133edc51cf9a351716)
|
|
(This used to be commit 2d37c1f98f45646546ee76743f9df90b1c0b01ae)
|
|
HEAD should now map brl locks correctly into POSIX locks, including the
really nasty case of large range unlock.
There is a lot of pretty ASCII art in locking/brlock.c explaining
exactly how this code works. If it is unclear, please ask me.
Jeremy.
(This used to be commit 135855dbd3b8934a49229b81646cd4469acba926)
|
|
(This used to be commit d7cd7c88fdabb01d9e40ae8a657737907a21ac37)
|
|
the next step is splitting out the auth code, to make adding lukes
NTLMSSP support easier
(This used to be commit 10c5470835b43116ed48b3137c3b9cc867a20989)
|
|
(This used to be commit 90b574296e06cd6ed4fedc1e5a8ae412a5e78b45)
|
|
(This used to be commit 49865ea06c96b01a5e5dec84d64b78bf26129be3)
|
|
this stuff is screaming out for talloc() rather than malloc/free
(This used to be commit e9576124cbe8322ed7bee9f4e72b5d1753ee0bac)
|
|
(This used to be commit 6faa3c23ae6d8aab52f8d6689e04bde9b3029804)
|
|
open on the same dev/inode pair with existing POSIX locks.
This is done at the smbd/open layer, so smbd just calls fd_close() and
the transfer of any open fd's is done under the covers of fd_close().
When an fsp is closed and no other fsp's open on the same dev/inode
pair have existing POSIX locks then all fd's associated with this fsp
are closed.
Now only the hard part of doing the POSIX range unlock code when read
locks overlap remains for full POSIX/SMB lock integration....
Jeremy.
(This used to be commit 1df48ed55ee303b6d84d7277fd79761cfe5f7052)
|
|
fsp->open is no longer needed (if an fsp pointer is valid, then it's open :-).
NB for Luke, this patch also did not apply to TNG. TNG is not yet
identical w.r.t file serving with HEAD. This makes it impossible for
me to help maintain TNG. Please fix asap.
lib/substitute.c: Removed unused variable (pidstr).
Jeremy.
(This used to be commit 389b700a26e8a308a0dff6fc038c38068aa0119a)
|
|
(This used to be commit 41af3232dba90832684ad8260ce0bb05e077cb02)
|
|
(This used to be commit 044af3cf977e3172b3b1ce3f71457d5b0a4fc1b2)
|
|
(This used to be commit 2fba24ef0e4cae64c5a179370c83d8bbf4e70bb8)
|
|
(This used to be commit 780713f67a848ade49c523cda96015ab46337cde)
|
|
(This used to be commit a559a8066fb162c4da0a5046c49a105eabf131d9)
|
|
(This used to be commit 8c726b9764bac0bc95cf9877e172c9e1262e576d)
|
|
(This used to be commit ba1931bb6596b538549e712cb8898b1ed19f5adc)
|
|
smbstatus could display the wrong filename when files change dev/inum
after a rename
(This used to be commit 990b16fcf7af74f376db157a3e5de7bb68c1a4a1)
|
|
error fd)
(This used to be commit defbedd198f02f7bb9af70436f5a25ab754b5fb6)
|
|
(This used to be commit 91ed7d8ffe8208d06191c64f5332954ec6bf75da)
|
|
I am falling in love with insure - it is finding _lots_ of memory
problems
(This used to be commit d9b4076293a4d37e1558ad63a3f522385ee3e521)
|
|
(This used to be commit 4c889d08aed3cebba54abbc96f28a2d1c545a4b5)
|
|
substituted in the loadparm code and thus leaving lpq with no printer
(This used to be commit b7c7a4d564d36885aa7c3efb2a87caec470df7fe)
|
|
(This used to be commit 8af70f288723e4597bc8639fc0cbec44af2e50c7)
|
|
(This used to be commit 381ddb464fd0da671d567177f1ded10f67952692)
|
|
(This used to be commit 980a81651a043f2281f6a8b863d31438212b584a)
|
|
in TNG
(This used to be commit 82df25b28b94b0041676fb433e0e677acb544579)
|
|
(This used to be commit e4ddd1a4a96b7f723d3d92e4334f4033e1dbc8a8)
|
|
(This used to be commit bb9b3e03deebe23cf3fe10c2cb9b67a730e086a2)
|
|
zero
(This used to be commit 53077295b76487a6eafc6b14b69a91074a02aa35)
|
|
entry before adding to ensure that we don't ever add a duplicate entry
this code can be removed when ubi gets fixed
(This used to be commit 062d79bf8ba5308803393c7b9140d1f77db3690f)
|
|
(This used to be commit be7186b0dd2779fc9f98b4c9f77874ef3ded37d6)
|
|
(This used to be commit 1c6322473afcf9065fa25777d1b0627f133af3f6)
|
|
(This used to be commit 9416b58b9c2ff898cdae2cb81ab1e150ef9f0e89)
|
|
(This used to be commit d0fc1675df35e65488a19d7f5929792fba347b07)
|
|
(This used to be commit 1106fa7f24d229c3877263b7a7dde359556435e6)
|
|
(This used to be commit 14251aab2ec00aa7f3e6a6e791e78732cb5a9eda)
|
|
new open mechanism Andrew & I discussed.
config.sub:
configure: Included the QNX patch.
include/vfs.h:
smbd/vfs-wrap.c:
smbd/vfs.c: Added ftruncate vfs call (needed).
Note that we will also need locking calls in the vfs (to be added).
lib/util_unistr.c:
nmbd/nmbd_processlogon.c: Fix for NT domain logons causing nmbd to core dump.
Also fix for sidsize DOS bug.
locking/locking.c: Check value of ret before using it for memdup.
printing/printing.c: Convert print_fsp_open to return an allocated fsp.
rpc_server/srv_lsa.c: Fix for NT domain logons.
I have removed all use of lp_share_modes() from the code (although I
left the parameter in the table for backwards compatibility). It no longer makes
sense for this to exist.
smbd/close.c: Removed lp_share_modes().
smbd/fileio.c: Fixed parameters to unlock_share_entry call in panic code.
smbd/files.c: Correctly set the unix_ERR_code to ERRnofids on fsp allocation fail.
smbd/nttrans.c:
smbd/reply.c:
smbd/trans2.c: Changed all occurrences of open_file_shared/open_directory/
open_file_stat to return an fsp from the call.
smbd/open.c: Changed all occurrences of open_file_shared/open_directory/
open_file_stat to return an fsp from the call.
In addition I have fixed a long standing race condition in the deny mode
processing w.r.t. two smbd's creating a file. Andrew, please note that
your original idea of using open with O_EXCL in this case would not work
(I went over the races very carefully) and so we must re-check deny modes
*after* the open() call returns. This is because there is a race between
the open with O_EXCL and the lock of the share mode entry. Imagine the
case where the first smbd does the open with O_EXCL and a deny mode of DENY_ALL,
but is pre-empted before it locks the share modes and creates the deny
mode entry for DENY_ALL. A second smbd could then come in with O_RDONLY
and a deny mode of DENY_NONE and the two opens would be allowed.
The *only* way to fix this race is to lock the share modes after the
open and then do the deny mode checks *after* this lock in the case
where the file did not originally exist.
This code will need extensive testing but seems to initially work.
Jeremy.
(This used to be commit ab0ecc39d688f16b9692fe90b991f0b89287070a)
|
|
(This used to be commit 763704f78fc44976b2d977e8a08ffdeb727903c4)
|
|
spoolssd in tng)
(This used to be commit e2eacdd74c369fbbcd118148149321e36f3d0010)
|
|
(This used to be commit 95246a8432e04bcdeed962d1a6112dfd90518941)
|
|
- cleaned up the standard_sub_*() calls a lot
(This used to be commit 2c2d95d77d3667eaa9252506a82b9054b0d0e01c)
|
|
Jeremy.
(This used to be commit 8a99d824c0e9a43c8a8c81140f8c9005c7e2621a)
|
|
printing/printing.c: Cast tdb_delete to (tdb_traverse_func) to stop warning.
tmpfile gives mirror warning.
smbd/groupname.c: Remember to file_lines_free() on exit.
tdb/tdb.h: Add tdb_traverse_func typedef.
Jeremy
(This used to be commit 204ca1195c86499bd9beb273ce573db7a56ccead)
|