summaryrefslogtreecommitdiffstats
path: root/source/locking
Commit message (Collapse)AuthorAgeFilesLines
* locking/locking_shm.c: Added printf to help track down negative share mode ↵Jeremy Allison1999-02-011-1/+1
| | | | | | | | | | | | | | | problem. printing/print_svid.c: Fix for DG/UX lpstat. smbd/dfree.c: Added 'max_four_gig' parameter to normalize to 4GB when asked (used to be the default). smbd/open.c smbd/reply.c smbd/trans2.c: Changed to allow a <4GB volume size to be returned on a trans2 qfsinfo level 1 call. NT clients refuse to do the correct call to Samba servers (Herb recons it's the unicode bit) - this allows even a level 1 to return a volume size up to 9444732961341243916800 bytes (should be enough for now, until we get the unicode support added :-). Jeremy.
* Added full pathname lock patch from Andy <thwartedefforts@wonky.org>Jeremy Allison1999-01-062-5/+9
| | | | Jeremy.
* acconfig.h configure configure.in include/config.h.in lib/system.c: Fixed ↵Jeremy Allison1999-01-041-0/+45
| | | | | | | | | --with-mmap code. lib/time.c: Changed %T to %H:%M:%S for systems that don't have %T. locking/locking_slow.c: Re-added FTRUNCATE_NEEDS_ROOT code - now to test for it... smbd/quotas.c: Fixed IRIX quota compile. Jeremy.
* Fixed missing ';'s in locking_slow code.Jeremy Allison1998-12-221-3/+3
| | | | Jeremy.
* Spelling mistake change due to very pick people (you know who you are :-).Jeremy Allison1998-12-221-2/+2
| | | | | | | | | | Changed privilage to privilege. Also added set_real_uid() call to lib/util_sec.c. Removed last set[re]uid calls from quotas.c - all such calls now live only in lib/util_sec.c. Jeremy.
* In my changes prevously to the dos_xxx calls I missed dos_readdir andJeremy Allison1998-11-251-2/+2
| | | | | friends. Jeremy.
* Changed (most) open()/fopen()/creat()/mmap() calls to use sys_XXX() instead.Jeremy Allison1998-11-172-8/+7
| | | | | | Needed as in the 64 bit file spec new open types are needed on many OS's to be able to seek past 32bits. Jeremy.
* don't core dump in smbstatus if we can't open the shmem systemAndrew Tridgell1998-10-311-0/+1
|
* Reasonably large change to give us *exactly* correct NT delete on close ↵Jeremy Allison1998-10-233-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.
* Fixed sys_lseek and seek_file calls so all returnsJeremy Allison1998-10-181-172/+242
| | | | | are *checked* :-). Jeremy.
* Small tidyups for gcc in 'preen' mode....Jeremy Allison1998-10-171-2/+2
| | | | Jeremy.
* Changes to test in configure if capabilities are enabled on a system.Jeremy Allison1998-09-283-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.
* automated generation of .dummy files for each subdirectory;Alexandre Oliva1998-09-281-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
* major autoconf clean-upAlexandre Oliva1998-09-211-0/+1
| | | | fix problems in builds with srcdir!=builddir
* Added ssize_t to configure code.Jeremy Allison1998-09-111-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.
* ahh, the joy of deleting large chunks of code that someone else hasAndrew Tridgell1998-09-052-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 :)
* tridge the destroyer returns!Andrew Tridgell1998-09-051-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?
* Modified dev_t and ino_t code to be 64 bit clean (including changesJeremy Allison1998-09-042-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.
* More 64 bit stuff - now the fcntl locks are 64 bit clean.Jeremy Allison1998-09-043-23/+32
| | | | | | Nearly at the stage where I can expose the 64-bit-ness to the NT clients.... Jeremy.
* Ok - this is the 64 bit widening check in. It changes the configureJeremy Allison1998-09-032-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.
* More abstraction of file system data types, to move to a 64Jeremy Allison1998-09-011-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.
* configure.in, configure: include/config.h.in: Added stropts and poll.Jeremy Allison1998-08-313-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.
* - zero shared memory before freeing itAndrew Tridgell1998-08-302-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.
* Turning on blocking locking code. NB. Blocking lock requests that are notJeremy Allison1998-08-201-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.
* Makefile.in: Moved blocking lock code into smbd/blocking.c for link purposes.Jeremy Allison1998-08-191-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.
* smbd/nttrans.c: Fixed bug in split off pipe code.Jeremy Allison1998-08-171-4/+12
| | | | | locking/locking.c: More blocking lock changes. Jeremy.
* much cleaner chain pointer handling for both files and pipes.Andrew Tridgell1998-08-171-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.
* fixed some bugs in the locking_slow code caused by the recent changes.Andrew Tridgell1998-08-161-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.
* server.c: fixed a bug in close_file() with the new files.c handling codeAndrew Tridgell1998-08-161-2/+0
| | | | | bitmap.c: added bitmap hanlding code in preparation for increasing the default max open files to several thousand
* this checkin gets rid of the global Files[] array and makes it localAndrew Tridgell1998-08-153-87/+75
| | | | | | | in files.c it should now be faily easy to expand the default MAX_OPEN_FILES to many thousands.
* configure: Changes for extra headers.Jeremy Allison1998-08-152-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 is the bug change to using connection_struct* instead of cnum.Andrew Tridgell1998-08-144-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.
* Makefile.in: Changed so that make proto will work with ldap & nisplus.Jeremy Allison1998-08-141-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.
* More blocking lock code - still #ifdef'ed out - under development.Jeremy Allison1998-08-131-10/+170
| | | | Jeremy.
* fixed the nested comment - Jeremy, do you want that unbecome_user() orAndrew Tridgell1998-08-121-2/+1
| | | | not?
* include/smb.h: Removed dir_ptr. Not needed.Jeremy Allison1998-08-112-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.
* First implementation of ChangeNotify - this version only checksJeremy Allison1998-08-031-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.
* Makefile.in: Moved UBIQX stuff into UTILOBJ.Jeremy Allison1998-07-302-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.
* merge from the autoconf2 branch to the main branchAndrew Tridgell1998-07-295-62/+21
|
* locking.c: Print messages when we downgrade a lock.Jeremy Allison1998-07-291-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.
* locking.c: Don't need to do map_lock_type on *testing* a lock, just on setting.Jeremy Allison1998-07-281-2/+7
| | | | Jeremy.
* loadparm.c: Added strict sync parameter.Jeremy Allison1998-07-281-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.
* locking.c: Added lock type to is_locked() and do_lock()Jeremy Allison1998-07-231-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.
* nttrans.c: More NT SMB stuff.Jeremy Allison1998-07-021-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.
* loadparm.c: Did it ! Changed defaults for 'case preserve' and 'short case ↵Jeremy Allison1998-06-051-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.
* includes.h: SunOS doesn't have strcasecmp, solaris versions prior to 2.6 don'tJeremy Allison1998-05-121-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 is a security audit change of the main source.Jeremy Allison1998-05-123-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.
* changed to use slprintf() instead of sprintf() just aboutAndrew Tridgell1998-05-111-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.
* includes.h: Moved HPUX undefine of SEMMSL to where it actually does something.Jeremy Allison1998-04-101-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.
* - added a check for broken RH5 include files. With the standard RH5Andrew Tridgell1998-03-222-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