summaryrefslogtreecommitdiffstats
path: root/source/include
Commit message (Collapse)AuthorAgeFilesLines
...
* fixed a potential problem with wins_write_database() child processes.Andrew Tridgell1998-09-171-6/+1
| | | | | | | | | In sig_term() we were calling wins_write_database(0) which would fork a child. This child might then get killed by the same process killing off the parent. That process would then fork another child etc. The solution is to pass a "background" flag to wins_write_database(0) and only fork if this is set.
* Fixed problems people were having with creating profileJeremy Allison1998-09-141-0/+10
| | | | | | | | | directories (NTTrans/Create with Security Descriptor for a directory). It turns out the CIFS spec is bogus (what a suprise) and the 'is a directory' flag is actually embedded in the create_options field. Jeremy.
* Ok so with this bugfix 64 bit file access actually seems to work :-).Jeremy Allison1998-09-111-1/+1
| | | | | | Problems were just dumb bugs like (defining sys_lseek to return 'int' DOH !). Jeremy.
* Ok - this is the 'expose 64 bit to the clients' checkin.Jeremy Allison1998-09-111-0/+1
| | | | | | | | | | I have tested it by creating a 'holey' 20GB file - checking that it shows up correctl in the NT file view (it does) and am busily copying it to NULL: on the NT box. All good so far.... :-). Also implemented NT 'delete on close' semantics. Jeremy.
* Added ssize_t to configure code.Jeremy Allison1998-09-113-15/+20
| | | | | | | | | | | 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.
* smb.h: Removed fdnum from file_fd_struct. Not needed.Jeremy Allison1998-09-101-1/+0
| | | | | | | files.c: Removed fd bitmap - not needed. Added code to do use arrays rather than linked list - disabled by default but can be enabled to check performance. Jeremy.
* Added back groupname map stuff removed by Andrew's "slash 'n' burn"Jeremy Allison1998-09-081-1/+8
| | | | | | | | | | | | | | | | | tactics :-). Protected by #ifdef until used. Fixed bug in fd_attempt_close() where a pointer to potentially free'd memory was returned. I hate that. Added "blocking locks" as a per-share option for performance testing. Changed is_mangled() so it will return true if called with a pathname and any component of the pathname was mangled (it was already attempting to do this, but not checking for a '/' as end-of-mangle). This should be a better fix for the wierd stat cache bug Andrew identified. Jeremy.
* add a "stat cache" boolean smb.conf option. (defaults to on)Andrew Tridgell1998-09-061-0/+1
| | | | | | | | I think we need this so we can rule out stat cache bugs when dealing with bug reports. If we ask a user to disable the stat cache and the problem persists then we know it isn't a stat cache bug. The stat cache code is sufficiently complicated that it can be pretty hard to tell if it is causing problems or not.
* some people are foolishly running ./configure from other than theAndrew Tridgell1998-09-051-22/+22
| | | | | source directory! This adds a new "trivial" test that makes sure that the autoconf tests are working. It aborts the configure run if not.
* tridge the destroyer returns!Andrew Tridgell1998-09-051-322/+0
| | | | | | | | | | | | | | | | | | | | | | 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?
* Bugfix for leak in reference counted file struct.Jeremy Allison1998-09-051-0/+2
| | | | | Added "nt smb support" parameter to allow NT SMB's to be turned off. Jeremy.
* got rid of interpret_security(). Thanks to Jean-Francois for pointingAndrew Tridgell1998-09-051-1/+0
| | | | out it is no longer used (replaced by enumerated types in loadparm.c)
* Modified dev_t and ino_t code to be 64 bit clean (including changesJeremy Allison1998-09-042-2/+18
| | | | | | | | | | 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-16/+53
| | | | | | 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-034-19/+61
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* fixed a bug in the name mangling code. It implicitly assumed thatAndrew Tridgell1998-09-031-5/+3
| | | | | | | | mangling a name can't increase it's size which isn't true. (imagine a file called "L B" which mangles to "LB~XX") The symptoms were that users couldn't run batch files from short directory names that contained non 8.3 characters (such as spaces).
* More abstraction of file system data types, to move to a 64Jeremy Allison1998-09-012-19/+30
| | | | | | | | | | | | | | | | | | | | | 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-314-47/+69
| | | | | | | | | | | 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.
* fixed a commentAndrew Tridgell1998-08-311-1/+1
|
* set a maximum name refresh time of 20 minutes.Andrew Tridgell1998-08-311-0/+4
| | | | | | | | | | The previous code was strictly correct, but not very practical. self names were only refreshed every 3 days. I hit a situation where the Samba WINS server was restarted after deleting wins.dat and didn't notice some remote subnets (also running Samba). I realised that the complete database wouldn't have been rebuilt for 3 days, which is way too long. In order to recover from WINS restarts we need a much shorter maximum refresh time.
* bounds check next_token() to prevent possible buffer overflowsAndrew Tridgell1998-08-311-1/+1
|
* added a dest_port parameter to send_mailslot() so we send replies toAndrew Tridgell1998-08-301-1/+2
| | | | the correct port in environments like ip masq.
* finished the asynchronous browse synchronisation code. It even seemsAndrew Tridgell1998-08-301-0/+8
| | | | | | | | to work (not a lot of testing yet though). Now we just need to deal with people worried about having more than two nmbd processes sometimes. (the async processes are created on demand for browse sync, so you'll only see more than 2 occasionally)
* changed the way that name query records are sorted in replies. TheyAndrew Tridgell1998-08-301-0/+1
| | | | | are now sorted by the number of common leading bits in the IP address with the address of the querying host.
* changed the format of the wins.dat file slightly.Andrew Tridgell1998-08-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | It now has a line like this: VERSION 1 251152 the first number is a version #define in nmbd_winsserver.c and will be used if we ever have to change the format again. The second number is a hash of the current interfaces setting. It is used to detect the case where nmbd is restarted on a machine after the IP of the machine has changed (or the interfaces list has changed in any way). When that happens we need to discard the old wins.dat cache or you end up with chaos. This has bitten quite a few people, they find that when they move a machine it continues using the old IP for some things for the next week until the wins entries time out! I've checked, and the old nmbd can handle the new format, although it does spit out a spurious error message about the VERSION line. So users can safely run 2.0alpha then switch back to 1.9.18 without problems.
* changed the size of a char array in the userdata_struct from 1 to 16Andrew Tridgell1998-08-303-1/+11
| | | | | | | | | | | | to account for padding/alignment issues. Eventually I'd like to find a way to get rid of this construct altogether as it is a bit error prone and hard to debug. also added a new macro: ZERO_STRUCTP() that takes a pointer to a structure and zeros the structure. Used in nmbd to zero allocated structures before freeing them to try to catch bugs a bit faster.
* This checking fixes the statcache bug that stopped NetBench from runningJeremy Allison1998-08-281-2/+3
| | | | | | | | | | | | | | correctly. Added new parameter "stat cache size" - set to 50 by default. I now declare the statcache code officially "open" for business :-). It gets a hit rate of 97% with a NetBench run and seems to make using a case insensitive run as efficient as a case sensitive run. Also tidied up our sys_select usage - added a maxfd parameter and also added an implementation of select in terms of poll(), for systems where poll() is much faster. This is disabled by default. Jeremy.
* This is the stat cache code - seems to work fine (needs heavyJeremy Allison1998-08-273-1/+15
| | | | | | NetBench testing though.... :-). Attempts to efficiently reduce the number of stat() calls Samba does. Jeremy.
* use a separate ZERO_ARRAY() macro instead of ZERO_STRUCT() forAndrew Tridgell1998-08-261-0/+1
| | | | arrays. This prevents (harmless) warnings from some compilers
* get includes right for systems that use getpwanam()Andrew Tridgell1998-08-261-0/+6
|
* took all the rpc includes back out until we can work out _why_ freebsdAndrew Tridgell1998-08-261-24/+0
| | | | needs them and what should really be there.
* added loads of pointless rpcsvc/ and rpc/ include files, all becauseLuke Leighton1998-08-252-0/+35
| | | | | rpcsvc/ypclnt.h wants a struct dom_binding. knock-on include effect under freebsd 2.1.
* proto changesAndrew Tridgell1998-08-251-1/+5
|
* changed the default permissions code to do this:Andrew Tridgell1998-08-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | if ((sbuf->st_mode & S_IWUSR) == 0) result |= aRONLY; rather than the very complex user/group permissions checks we do currently. This is equivalent ot setting "alternate permissions = yes" in the old code. The change is motivated by three main reasons: 1) it's basically impossible to second guess whether a file is writeable without trying to open it for writing. ACLs, root squash etc just make it too hard. 2) setting it not RONLY if the owner can write is closer to what NT does (eg. look at a cdrom - files are not marked read only). 3) it prevents the silly problem of copying files from a read only share to a writeable share and then finding you can't write to them as windows preserves the RONLY flag. Lots of people get bitten by this when they drag a folder from a Samba drive. It also hurts some install programs. I have also added a new flag type for loadparm.c called FLAG_DEPRECATED which I've set for "alternate permissions". I'll soon add code to testparm to give a warning about deprecated options.
* Changed ASSERT macros to SMB_ASSERT macros as some systems alreadyJeremy Allison1998-08-241-2/+2
| | | | | have an ASSERT macro defined. Jeremy.
* resource.h on FreeBSD 2.1 requires sys/time.h to come first.Luke Leighton1998-08-241-11/+11
|
* added ASSERT() and ASSERT_ARRAY() macros and sprinkled them liberallyAndrew Tridgell1998-08-221-0/+4
| | | | in the rpc code.
* expanded MAX_LOOKUP_SIDS to 30 (I saw 21 in a packet)Andrew Tridgell1998-08-221-1/+1
|
* added new smb.conf option "panic action". see my samba-technicalAndrew Tridgell1998-08-212-5/+2
| | | | explanation.
* added a macro ZERO_STRUCT() which is useful for initialisingAndrew Tridgell1998-08-211-0/+3
| | | | structures declared on the stack.
* Turning on blocking locking code. NB. Blocking lock requests that are notJeremy Allison1998-08-201-3/+3
| | | | | | | | | | | | | | | | | | 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.
* added a test for a working setresuidAndrew Tridgell1998-08-191-3/+1
|
* Makefile.in: Moved blocking lock code into smbd/blocking.c for link purposes.Jeremy Allison1998-08-192-2/+9
| | | | | | | | | | | 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.
* Fixed bug introduced by the recent changes where the chain_fnumJeremy Allison1998-08-171-1/+3
| | | | | could be overwritten in oplock processing code. Jeremy.
* this completes the splitup of server.c.Andrew Tridgell1998-08-171-26/+49
| | | | | | | | the splitup was done with an axe, not a scalpel, so there are some rough edges. I mostly wanted to get the general form right with fine tuning of what goes where to come later. Still, this is better than what we had before where server.c was a general repository for anything that didn't fit elsewhere.
* more splitting of server.cAndrew Tridgell1998-08-171-6/+15
| | | | created dosmode.c and filename.c
* now that we have no global arrays we can start to split up the monsterAndrew Tridgell1998-08-172-8/+19
| | | | | | | server.c without breaking things. this splits off netprot.c and fileio.c for negprot and read/write/seek handling respectively.
* added some optimisation for the case where the number of open files isAndrew Tridgell1998-08-172-0/+54
| | | | | | | | | very large. files.c now promotes a files_struct to the top of the list if it is used when it is more than 10 elements from the top. also moved common linked list code for the 5 sets of linked lists that I've created over the past few days into dlinklist.h (I've explained to Chris why I didn't use the ubiqx code)
* moved connection_struct handling code into smbd/conn.c and changed itAndrew Tridgell1998-08-173-11/+14
| | | | to a linked list with bitmap format.
* converted the policy code to use a linked list and bitmap. This savesAndrew Tridgell1998-08-171-1/+1
| | | | us a bit of memory.