summaryrefslogtreecommitdiff
path: root/source3/locking
AgeCommit message (Collapse)AuthorFilesLines
1998-10-31don't core dump in smbstatus if we can't open the shmem systemAndrew Tridgell1-0/+1
(This used to be commit ef9749798ab72a5e26f9cb5d0904266d6df70f8c)
1998-10-23Reasonably large change to give us *exactly* correct NT delete on close ↵Jeremy Allison3-31/+102
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)
1998-10-18Fixed sys_lseek and seek_file calls so all returnsJeremy Allison1-172/+242
are *checked* :-). Jeremy. (This used to be commit b8b781191dd7d28944d87eec5fa0fbef798e289b)
1998-10-17Small tidyups for gcc in 'preen' mode....Jeremy Allison1-2/+2
Jeremy. (This used to be commit 60dc1a4a00a22088d33369588b0d5eb292cf084a)
1998-09-28Changes to test in configure if capabilities are enabled on a system.Jeremy Allison3-13/+6
Changes to get Samba to compile cleanly with the IRIX compiler with the options : -fullwarn -woff 1209,1174 (the -woff options are to turn off warnings about unused function parameters and controlling loop expressions being constants). Split prototype generation as we hit a limit in IRIX nawk. Removed "." code in smbd/filename.c (yet again :-). Jeremy. (This used to be commit e0567433bd72aec17bf5a54cc292701095d25f09)
1998-09-28automated generation of .dummy files for each subdirectory;Alexandre Oliva1-1/+0
dummy.in files are no longer needed, and new directories will be taken care of automatically, at configure (or config.status --recheck) time (This used to be commit 237a8e5fe62d757c04b8207cbbee4df1470cfe4e)
1998-09-21major autoconf clean-upAlexandre Oliva1-0/+1
fix problems in builds with srcdir!=builddir (This used to be commit 1ffc3b807a3f80644c974b454ff5e6f68e89b546)
1998-09-11Added ssize_t to configure code.Jeremy Allison1-70/+1
Got 'religion' about using size_t and ssize_t for read/write stuff as part of the code to expose 64 bits to the client. This checkin does all the 'easy' stuff - such as all the read/write/lock calls - but now comes the harder parts (open & friends) and all the file enquiry functions..... Jeremy. (This used to be commit 36544fe5476f7770bd5748574fc54be7b3ee4d4a)
1998-09-05ahh, the joy of deleting large chunks of code that someone else hasAndrew Tridgell2-35/+0
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)
1998-09-05tridge the destroyer returns!Andrew Tridgell1-5/+6
prompted by the interpret_security() dead code that Jean-Francois pointed out I added a make target "finddead" that finds potentially dead (ie. unused) code. It spat out 304 function names ... I went through these are deleted many of them, making others static (finddead also reports functions that are used only in the local file). in doing this I have almost certainly deleted some useful code. I may have even prevented compilation with some compile options. I apologise. I decided it was better to get rid of this code now and add back the one or two functions that are needed than to keep all this baggage. So, if I have done a bit too much "destroying" then let me know. Keep the swearing to a minimum :) One bit I didn't do is the ubibt code. Chris, can you look at that? Heaps of unused functions there. Can they be made static? (This used to be commit 2204475c87f3024ea8fd1fbd7385b2def617a46f)
1998-09-04Modified dev_t and ino_t code to be 64 bit clean (including changesJeremy Allison2-31/+118
to oplock break message passing). I think that smbd/nmbd are now inode and offset size independent (at least for 32 bit and 64 bit systems). Now to expose all this new functionality to NT clients..... Jeremy. (This used to be commit 5910d07bbf45a34d3c901461f74704c029a79474)
1998-09-04More 64 bit stuff - now the fcntl locks are 64 bit clean.Jeremy Allison3-23/+32
Nearly at the stage where I can expose the 64-bit-ness to the NT clients.... Jeremy. (This used to be commit 422f1dd45074c0e28203aca5952e57bbe56676b6)
1998-09-03Ok - this is the 64 bit widening check in. It changes the configureJeremy Allison2-52/+79
to check for stat64 and friends, and then changes much of Samba to use the data type SMB_OFF_T for file size information. stat/fstat/lstat/lseek/ftruncate have now become sys_stat etc. to hide the 64 bit calls if needed. Note that this still does not expose 64 bit functionality to the client, as the changes to the reply_xxx smb's are not yet done. This code change should make these changes possible. Still to do before full 64 bit-ness to the client: fcntl lock code. statfs code widening of dev_t and ino_t (now possible due to SMB_DEV_T and SMB_OFF_T types being in place). Let me know if wierd things happen after this check-in and I'll fix them :-). Jeremy. (This used to be commit 14500936c321d15995c963766aac67bf1f4e3824)
1998-09-01More abstraction of file system data types, to move to a 64Jeremy Allison1-4/+4
bit file interface for the NT SMB's. Created a new define, SMB_STRUCT_STAT that currently is defined to be struct stat - this wil change to a user defined type containing 64 bit info when the correct wrappers are written for 64 bit stat(), fstat() and lstat() calls. Also changed all sys_xxxx() calls that were previously just wrappers to the same call prefixed by a dos_to_unix() call into dos_xxxx() calls. This makes it explicit when a pathname translation is being done, and when it is not. Now, all sys_xxx() calls are meant to be wrappers to mask OS differences, and not silently converting filenames on the fly. Jeremy. (This used to be commit 28aa182dbffaa4ffd86047e608400de4b26e80eb)
1998-08-31configure.in, configure: include/config.h.in: Added stropts and poll.Jeremy Allison3-22/+24
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)
1998-08-30- zero shared memory before freeing itAndrew Tridgell2-6/+8
- changed the hash size to 13 (much smaller than before). This should make for more efficient shared memory usage as it will lead to less fragmentation. (This used to be commit 9c1e4c2dae6323c9a1bd74148d0b45aac61e7c0a)
1998-08-20Turning on blocking locking code. NB. Blocking lock requests that are notJeremy Allison1-0/+6
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)
1998-08-19Makefile.in: Moved blocking lock code into smbd/blocking.c for link purposes.Jeremy Allison1-290/+0
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)
1998-08-17smbd/nttrans.c: Fixed bug in split off pipe code.Jeremy Allison1-4/+12
locking/locking.c: More blocking lock changes. Jeremy. (This used to be commit 2ca4fc95a4227645f1009a057d46b58508846a92)
1998-08-17much cleaner chain pointer handling for both files and pipes.Andrew Tridgell1-7/+6
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)
1998-08-16fixed some bugs in the locking_slow code caused by the recent changes.Andrew Tridgell1-8/+9
also fixed a couple of %s/%d bugs in locking slow that have been there for a while but are now revealed by the gcc printf argument testing. (This used to be commit 16228c185a7844a243db538aa1e5729e62a8bc4a)
1998-08-16server.c: fixed a bug in close_file() with the new files.c handling codeAndrew Tridgell1-2/+0
bitmap.c: added bitmap hanlding code in preparation for increasing the default max open files to several thousand (This used to be commit f573a65b67e7a57586fec57845598e49b157ee0a)
1998-08-15this checkin gets rid of the global Files[] array and makes it localAndrew Tridgell3-87/+75
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)
1998-08-15configure: Changes for extra headers.Jeremy Allison2-8/+19
configure.in: Source for header changes. client/clitar.c: Fixed isXXX macros & debugs for gcc pedantic compile. include/config.h.in: Added MEMSET, BZERO, MEMORY, RPCSVC_YPCLNT, STRINGS headers. include/includes.h: Headers for the above. include/smb.h: Made SIGNAL_CAST POSIX by default void (*)(int). lib/access.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/charset.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/debug.c: Fixed signal functs. lib/kanji.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/smbrun.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/util.c: Fixed isXXX macros & debugs for gcc pedantic compile. libsmb/namequery.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem_sysv.c: Fixed error messages in sysV stuff. nmbd/asyncdns.c: Fixed signal functs. nmbd/nmbd.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/passdb.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/smbpassfile.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/chgpasswd.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/ipc.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/nttrans.c: Fixed fsp code path. smbd/password.c: fixed HAVE_YP_GET_DEFAULT_DOMAIN problem. smbd/printing.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/reply.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/server.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/trans2.c: Fixed core dump bug. smbd/uid.c: Fixed isXXX macros & debugs for gcc pedantic compile. Jeremy. (This used to be commit 1b9cbcd02e575dc0a95fa589f720df30a4acc46b)
1998-08-14this is the bug change to using connection_struct* instead of cnum.Andrew Tridgell4-96/+91
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)
1998-08-14Makefile.in: Changed so that make proto will work with ldap & nisplus.Jeremy Allison1-3/+3
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)
1998-08-13More blocking lock code - still #ifdef'ed out - under development.Jeremy Allison1-10/+170
Jeremy. (This used to be commit c9695bdf2e22c3081841f116af37340308d447aa)
1998-08-12fixed the nested comment - Jeremy, do you want that unbecome_user() orAndrew Tridgell1-2/+1
not? (This used to be commit 638ee7d265982ca95ae7f49e2a84431bdf147c21)
1998-08-11include/smb.h: Removed dir_ptr. Not needed.Jeremy Allison2-11/+145
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)
1998-08-03First implementation of ChangeNotify - this version only checksJeremy Allison1-9/+13
for changes in the directory modify timestamps. A better version will look at the requested client flags, and create a hash that represents the current state of the directory, and check against this instead. debug.c: Added lp_timestamp_logs() function. loadparm.c: Added "change notify timeout" in seconds (default 60) - this is the scan rate for a directory. Added ""timestamp logs" boolean - default True. Turns off log timestamps (so I can read them :-). nttrans.c: ChangeNotify implementation. server.c: ChangeNotify implementation. shmem_sysv.c: Added exits on shmem errors (without them smbd can core dump if some calls fail). smb.h: Added ChangeNotify flags for future use. util.c: Tidied up typedef. Jeremy. (This used to be commit a0748c3f53974483680ebe2ea4f556ece8d7fa43)
1998-07-30Makefile.in: Moved UBIQX stuff into UTILOBJ.Jeremy Allison2-11/+11
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)
1998-07-29merge from the autoconf2 branch to the main branchAndrew Tridgell5-62/+21
(This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21)
1998-07-29locking.c: Print messages when we downgrade a lock.Jeremy Allison1-0/+2
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)
1998-07-28locking.c: Don't need to do map_lock_type on *testing* a lock, just on setting.Jeremy Allison1-2/+7
Jeremy. (This used to be commit 17f68cc86cafbb04dbd9cc6ecc0aac7b911c9b70)
1998-07-28loadparm.c: Added strict sync parameter.Jeremy Allison1-10/+34
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)
1998-07-23locking.c: Added lock type to is_locked() and do_lock()Jeremy Allison1-27/+47
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)
1998-07-02nttrans.c: More NT SMB stuff.Jeremy Allison1-2/+9
shmem_sysv.c: Fix for shared memory problems on several systems, Second and subsequent use of shmget should use zero as the size. Fix from Veselin Terzic <vterzic@systems.DHL.COM> Jeremy. (This used to be commit 1cd94b24592ca31ffae671acfd83b0d42b212cab)
1998-06-05loadparm.c: Did it ! Changed defaults for 'case preserve' and 'short case ↵Jeremy Allison1-3/+3
preserve'. Also removed 'domain allow/deny' parameters. shmem_sysv.c: Added strerror code so I can see why sysV calls are failing. lib/rpc/server/srv_netlog.c: Removed code that used 'domain allow/deny' parameters - replaced with a comment so I will remember to fix this later. Jeremy. (This used to be commit 5f46c7c4b11a75f1ffbd806cde915b4bf28232db)
1998-05-12includes.h: SunOS doesn't have strcasecmp, solaris versions prior to 2.6 don'tJeremy Allison1-1/+1
have vsnprintf. locking_slow.c: slight tidy. make_smbcodepage.c: Use safe_strcpy instead of pstrcpy. nmbd_winsserver.c: Use pstrcpy instead of fstrcpy. smbmount.c: Fixed reported bug. util.c: Removed old fstrcpy/fstrcat functions. Jeremy. (This used to be commit f257d2e4bafd3944cca737699913a8d868279ca6)
1998-05-12This is a security audit change of the main source.Jeremy Allison3-11/+13
It removed all ocurrences of the following functions : sprintf strcpy strcat The replacements are slprintf, safe_strcpy and safe_strcat. It should not be possible to use code in Samba that uses sprintf, strcpy or strcat, only the safe_equivalents. Once Andrew has fixed the slprintf implementation then this code will be moved back to the 1.9.18 code stream. Jeremy. (This used to be commit 2d774454005f0b54e5684cf618da7060594dfcbb)
1998-05-11changed to use slprintf() instead of sprintf() just aboutAndrew Tridgell1-1/+1
everywhere. I've implemented slprintf() as a bounds checked sprintf() using mprotect() and a non-writeable page. This should prevent any sprintf based security holes. (This used to be commit ee09e9dadb69aaba5a751dd20ccc6d587d841bd6)
1998-04-10includes.h: Moved HPUX undefine of SEMMSL to where it actually does something.Jeremy Allison1-0/+41
ipc.c: Added Luke's debug statement. locking_slow.c: Added FTRUNCATE_NEEDS_ROOT code for broken systems that need it (not sure what these are yet). membuffer.c ntdomain.h proto.h lib/rpc/include/rpc_dce.h lib/rpc/include/rpc_srvsvc.h lib/rpc/parse/parse_prs.c lib/rpc/parse/parse_rpc.c lib/rpc/server/srv_pipe_hnd.c lib/rpc/server/srv_util.c: Re-merge of Luke's NTDOM changes 'cos he's a lazy git with carpel tunnel syndrome :-). Jeremy. (This used to be commit 52e3966fbcf7b5fbdbc7cbe9ac0b453ab5bf3217)
1998-03-22- added a check for broken RH5 include files. With the standard RH5Andrew Tridgell2-0/+15
includes (ie. unpatched RH5) Samba gets file corruption because of the incorrect definition of the shmid_ds structure. Updating your RH5 installation of glibc-devel fixes this. - don't try to fcntl_lock() a read-only fd in shmem.c - allow level 0 debug messages to get through in smbstatus (This used to be commit 45553771f90087a12db0153524146d42155d1d3f)
1998-01-22This is *not* a big change (although it looks like one).Jeremy Allison5-5/+5
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)
1997-12-29a dummy change to shmem_sysv.c to try and break CVS out of a problemAndrew Tridgell1-0/+1
with the ntdom branch (This used to be commit 213c3a4ed27cdc689e941b9a6d70e02e8b7dedd4)
1997-12-16- handle ENOSPC in shmem init.Andrew Tridgell1-4/+6
- be a little bit more friendly about grabbing semaphores (This used to be commit 87f88708939a3b72b26716a0d6648c4ea2d14047)
1997-12-04don't use free and alloc as structure elementsAndrew Tridgell1-13/+13
(This used to be commit f7066355b00a169423b4f64f58567e19b52abc1b)
1997-11-29don't display locks for dead processes in smbstatusAndrew Tridgell2-5/+9
(This used to be commit c7df484ef6d746fb1f5b53007ee04fa54e5f2223)
1997-11-01don't use SEM_UNDO because of ridiculously small undo limits on someAndrew Tridgell1-1/+25
OSes. Instead add explicit checks for dead locks at startup. (This used to be commit 79858d610c37675b9dc56a949723053ac9b67620)
1997-11-01some locking code cleanupsAndrew Tridgell3-238/+222
(This used to be commit 6d77311d6cecabafb86c02e26b30724425ef6208)