Age | Commit message (Collapse) | Author | Files | Lines |
|
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)
|
|
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)
|
|
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)
|
|
smbstatus could display the wrong filename when files change dev/inum
after a rename
(This used to be commit 990b16fcf7af74f376db157a3e5de7bb68c1a4a1)
|
|
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)
|
|
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)
|
|
Jeremy.
(This used to be commit 0216d81f061ee599a798fdbf25625fbbbd88ef08)
|
|
We now get/set/check POSIX locks, but I still need to code up the
close fd braindamage...
Jeremy.
(This used to be commit 3de058bd43976853b0ed2b6b5529e2a3a08909eb)
|
|
to either 63 or 31 bit POSIX ranges. Code to get these locks
not yet added.
Jeremy.
(This used to be commit 9c3b9146a3baff4b2e403ae8fac6c48df1b7e642)
|
|
but the structure is done enough so that Andrew can look it over and give
a yea/nay decision.
Jeremy.
(This used to be commit db96f83e34a139f47776fcbb5c1624fbf9d9943b)
|
|
include/includes.h: Added SMB_BIG_UINT_BITS.
lib/util.c: Removed align2/align4 - use macros.
libsmb/namequery.c: Use ALIGN2.
locking/locking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
Needed to move to hiding POSIX locks at a lower layer.
nmbd/nmbd_processlogon.c: Use ALIGN2/ALIGN4 macros.
smbd/blocking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
smbd/reply.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
Jeremy.
(This used to be commit 491eea8a20bf80d426625479326211dc975857a6)
|
|
element in the fsp
pretty mechanical stuff, but it affects lots of files.
(This used to be commit 368b0bc1b122ece18d11854c1506517816a01a82)
|
|
(This used to be commit eefc8972217e5a700b90f13ab040a0919f184d23)
|
|
two places i found where it was appropriate to _use_ that third argument,
in locking.c and brlock.c! there was a static traverse_function and
i removed the static variable, typecast it to a void*, passed it to
tdb_traverse and re-cast it back to the traverse_function inside the
tdb_traverse function. this makes the use of tdb_traverse() reentrant,
which is never going to happen, i know, i just don't like to see
statics lying about when there's no need for them.
as i had to do in samba-tng, all uses of tdb_traverse modified to take
the new void* state argument.
2) disabled rpcclient: referring people to use SAMBA_TNG rpcclient.
i don't know how the other samba team members would react if i deleted
rpcclient from cvs main. damn, that code's so old, it's unreal.
20 rpcclient commands, instead of about 70 in SAMBA_TNG.
(This used to be commit 49d7f0afbc1c5425d53019e234d54ddf205c8e9a)
|
|
this is used with "smbstatus -B" to dump the lock list
(This used to be commit 5f022629146701e6d543f77007dc944e4277ab0c)
|
|
changed it to "enum brl_type"
(This used to be commit 6b9ee7662c7afa70f6b20889e6b0ae1dcd677f9f)
|
|
the last piece was to use a smb timeout slightly larger than the
locking timeout in bloking locks to prevent a race
(This used to be commit 1b54cb4a33a65e62c2e3189b78ef073869a60c75)
|
|
note the ugly global_smbpid - I hope that won't bethere for long, I
just didn't want to do two lots of major surgery at the one time.
Using global_smbpid avoids the big change of getting rid of our
inbuf/outbuf interface to reply routines. I'll do that once the
locking stuff passes all tests.
(This used to be commit f8bebf91abcaa5bda3ec8701f9242f220da8943a)
|
|
it doesn't map to posix locks yet, that will come later.
(This used to be commit 7f2a493095887cb0aae915ac36b9cded71d3a7a7)
|
|
this means "nmblookup -S" now always works, even with broken servers
the database stores all unexpected replies and these can be accessed
by any client.
while doing this I cleaned up a couple of functions, and put in place
a better trn_id generator. in most places the code got quite a bit
simpler due to the addition of simple helper functions.
I haven't yet put the code in to take advantage of this for pdc
replies - that will be next. Jeremys pdc finding code will then work :)
(This used to be commit 280e6359d36c9bc8dcded302f15c3a1db8e3feeb)
|
|
- added TDB_CLEAR_IF_FIRST flag to clear the database if this is the
first attached process. Useful for non-persistent databases like our
locking area (this will also make upgrades to new database layouts easier)
- use lock_path() in a couple of places
- leave connections database open while smbd running
- cleaned up some tdb code a little, using macros for constants
(This used to be commit 00e9da3ca577527db392aced62f02c69cfee8f4f)
|
|
(This used to be commit 84fe2337c701a52c6dc5cd8c1f6e9050478703f1)
|
|
instead of either sysv or mmap shared memory or lock files.
this means we can now completely remove
locking_shm.c
locking_slow.c
shmem.c
shmem_sysv.c
and lots of other things also got simpler
locking.c got a bit larger, but is much better compartmentalised now
(This used to be commit e48c2d9937eea0667b8cd3332e49c06314ef31e7)
|
|
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
|
|
(This used to be commit 20bfa71c951a6e6018aafbd43946d1e0669feacb)
|
|
(This used to be commit ef9749798ab72a5e26f9cb5d0904266d6df70f8c)
|
|
semantics.
This was trickier than it looks :-). Check out the new DELETE_ON_CLOSE
flag in the share modes and the new code that iterates through all open
files on the same device and inode in files.c and trans2.c
Also changed the code that modifies share mode entries to take
generic function pointers rather than doing a specific thing so
this sort of change should be easier in the future.
Jeremy.
(This used to be commit 5e6a7cd99d29d1cf068fc517272559c1cf47ea3a)
|
|
painstakingly put in :)
This gets rid of most of the #ifdef LARGE_SMB_INO_T ifdefs around
DEBUG() statements. We just use %.0f in all cases. Makes the code a
bit easier to read :)
(This used to be commit 41f0069afc02169932e04ff0039bb6328eaaf04d)
|
|
Nearly at the stage where I can expose the 64-bit-ness to
the NT clients....
Jeremy.
(This used to be commit 422f1dd45074c0e28203aca5952e57bbe56676b6)
|
|
include/smb.h: Moved old typedefs of uint8 etc. into include/includes.h where
all the other defines live (changed them from typedefs to
defines).
Other changes : changed from using uint32 to SMB_DEV_T and SMB_INO_T
in preparation for moving to size independed (ie. 64 bit clean) device
and inode access. Stat call wrapper comes next :-).
Jeremy.
(This used to be commit 3d9ec96de5e04e83abafe9c5d980bd39eee856ea)
|
|
the head of an SMB request (ie. are part of a chain) will not be queued -
this will be fixed when we move to the new chain code. In practice, this
doesn't seem to cause much of a problem (in my admittedly limited testing)
bug a debug level zero message will be placed in the log when this
happens to help determine how real the problem is.
smbd/locking.c: New debug messages.
smbd/blocking.c: New blocking code - handles SMBlock, SMBlockread and SMBlockingX
smbd/chgpasswd.c: Fix for master fd leak.
smbd/files.c: Tidyup comment.
smbd/nttrans.c: Added fnum to debug message.
smbd/process.c: Made chain_reply() use construct_reply_common(). Added blocking
lock queue processing into idle loop.
smbd/reply.c: Added queue pushes for SMBlock, SMBlockread and SMBlockingX.
Jeremy.
(This used to be commit e1dd03ecda0bc6d7eaa31070c83774bb5679fd1b)
|
|
include/includes.h: Added nterr.h.
locking/locking.c: Moved blocking lock code into smbd/blocking.c for link purposes.
smbd/close.c: Added blocking lock removal to file close.
smbd/filename.c: Tidied up unix_convert() so I could read it (:-) in preparation
for the stat_cache code.
smbd/nttrans.c: Added WRITE_ATTRIBUTES check.
smbd/reply.c: Fixed multibyte char problem in wildcard mask.
Jeremy.
(This used to be commit 148eaba3dadb1d0bd3ac3ef53da3d9811636e89a)
|
|
locking/locking.c: More blocking lock changes.
Jeremy.
(This used to be commit 2ca4fc95a4227645f1009a057d46b58508846a92)
|
|
the chain pointer is now stored as a static and is set whenever a
handle is created or extracted. This also makes the code less error
prone.
(This used to be commit 068a862982bea726e8d7b1b4065d510b9840a272)
|
|
bitmap.c: added bitmap hanlding code in preparation for increasing the
default max open files to several thousand
(This used to be commit f573a65b67e7a57586fec57845598e49b157ee0a)
|
|
in files.c
it should now be faily easy to expand the default MAX_OPEN_FILES to
many thousands.
(This used to be commit b088c804f98908eb02f05ab2f2e8a61691a0a582)
|
|
Connections[] is now a local array in server.c
I might have broken something with this change. In particular the
oplock code is suspect and some .dll files aren't being oplocked when
I expected them to be. I'll look at it after I've got some sleep.
(This used to be commit c7ee025ead4a85b6fa44a832047b878451845fb6)
|
|
locking/locking.c: Made #ifdef'ed out functions static for Make proto.
lib/util.c: Re-instated old mask_match code for UNIX filesystem checks
only. Client calls use the new mask_match code. Changed the
name of the old function to unix_mask_match.
Jeremy.
(This used to be commit b68e756ff57622c6c74f28031d4be964d7b1c9bc)
|
|
Jeremy.
(This used to be commit c9695bdf2e22c3081841f116af37340308d447aa)
|
|
not?
(This used to be commit 638ee7d265982ca95ae7f49e2a84431bdf147c21)
|
|
locking/locking.c: First cut a blocking lock code. #ifdef'ed out for now.
locking/locking_shm.c: Removed dir_ptr. Not needed.
smbd/nttrans.c: More work on ChangeNotify - return is not an error and needs
to be handled as a nttrans with zero params. Removed dir_ptr. Not needed.
smbd/reply.c:
smbd/server.c:
smbd/trans2.c: Removed dir_ptr. Not needed.
Hmmm. At the moment smbclient is broken - doesn't issue prompt correctly.
This needs looking at.
Jeremy.
(This used to be commit ddfbcc05815621d3c463f92faed047f126412342)
|
|
loadparm.c: Added "ole locking compatibility" option (default "true").
locking.c: Changes to implement union in files_struct.
locking_shm.c: Changes to implement union in files_struct.
nttrans.c: Made opening a directory explicit (we have to).
Added create directory code for nttrans.
reply.c: Changes to implement union in files_struct.
server.c: Changes to implement union in files_struct. Added create directory code.
trans2.c: Changes to implement union in files_struct.
smb.h: Changes to implement union in files_struct.
util.c: Changed linked list code to UNIQX linked list. This will make
the other lists I need to implement for ChangeNotify and blocking
locks easier.
Jeremy.
(This used to be commit 3a5eea850bb256b39cff8ace1e4fb4e0c1f5472b)
|
|
(This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21)
|
|
reply.c: Do the same mask expansion we do in trans2.c - needed for Win98.
trans2.c: Make the mask expansion into a function call now we have to
do it twice.
Jeremy.
(This used to be commit 7b3a9d6285cc0d1967155a68845e28c6296ecc67)
|
|
Jeremy.
(This used to be commit 17f68cc86cafbb04dbd9cc6ecc0aac7b911c9b70)
|
|
locking.c: Added code to deal with real open mode of file.
reply.c: Added strict sync parameter.
server.c: Added strict sync parameter. Fixed open modes.
Jeremy.
(This used to be commit ed57b603b5c9333d588e62d774ad2be67e43ffd9)
|
|
as the code in reply_lockingX wasn't taking account of
the difference between read and write locks ! How did this
ever work :-) !
reply.c:
server.c: Add lock type to is_locked() and do_lock().
util.c: Also added code from klausr@ITAP.Physik.Uni-Stuttgart.De
to fix problem with log files growing too large if an
smbd writes less than 100 debug messages.
Jeremy.
(This used to be commit 80080abf772a470d5f0f4dcd4a75fb2a09a9fb2a)
|
|
This is merely updating the Copyright statements from 1997 to 1998.
It's a once a year thing :-).
NO OTHER CHANGES WERE MADE.
Jeremy.
(This used to be commit b9c16977231efb274e08856f7f3f4408dad6d96c)
|