summaryrefslogtreecommitdiffstats
path: root/source/include
Commit message (Collapse)AuthorAgeFilesLines
...
* - changed smb_getpwnam() to use winbind style usernamesAndrew Tridgell2000-05-101-1/+1
| | | | - finished ntdom -> winbind rename in head
* proto rebuildAndrew Tridgell2000-05-101-0/+1
|
* more merging voodooAndrew Tridgell2000-05-101-0/+72
| | | | | | this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic - this isn't permanent, it should go after another few merge steps have been done
* more mergingAndrew Tridgell2000-05-105-506/+560
| | | | | it is now at the stage that winbindd can compile in the head branch, but not link
* Fix for misunderstanding of fsync added when vfs layerHerb Lewis2000-05-101-1/+1
| | | | | was done. Samba was doing fsync's (bleagh). Jeremy.
* the beginnings of a new scheme I've working on to allow an easierAndrew Tridgell2000-05-095-293/+1984
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | head/tng merge. It goes something like this: - headers from tng get copied over one at a time - the old headers get renamed to *_old.h - server side code that used the old headers gets a #define OLD_NTDOMAIN 1 #undef OLD_NTDOMAIN at the start and end of the code - mkproto.awk recognises these special defines and does magic stuff so that each .c file sees the right headers - we start moving the rpc client libraries from tng to head. if this goes OK then, in theory, we should be able to move the client side rpc code from tng to head without disturbing the existing head server side code. Then when that works we can consider merging the server side. it remains to be seen if this scheme will work. So far I've moved rpc_samr.h and don't seem to have broken anything. Note this this is still a very delicate operation, as at every step of the way I want to keep head fully functional. Please don't take part unless you discuss it with me first.
* brought across some rpc header files from tngAndrew Tridgell2000-05-092-0/+112
|
* added secrets.tdb and changed storage of trust account password to useAndrew Tridgell2000-05-083-6/+22
| | | | it
* Fix for uninitialized memory read in brlock code. brl_locktest now needsJeremy Allison2000-05-051-1/+1
| | | | | to correctly set the fnum, as the brl_conflict code looks at it. Jeremy.
* a minimal change to get appliance mode to work with winbinddAndrew Tridgell2000-05-041-3/+8
| | | | | | | | | we needed to accept usernames of the form DOMAIN/user, which means we needed to pass the domain to a getpwnam() like routine in certain critical spots. What I'd rather do is get rid of "char *user" everywhere and use the new userdom_struct, but that will have to wait a few days.
* - use full_name instead of real_nameAndrew Tridgell2000-05-042-5/+1
| | | | - got rid of guest map code in lpq parser
* Insure uninitialized memory read fixes.Jeremy Allison2000-05-031-1/+1
| | | | Jeremy.
* added support for deleting printers into the spoolss systemAndrew Tridgell2000-05-022-1/+18
|
* split the username in the vuser structure into a separateAndrew Tridgell2000-05-021-3/+8
| | | | | | | | userdom_struct. As the name implies this also contains a domain (unused at the moment). This will be important shortly, as operation in appliance mode needs the domain to be always carried with the username.
* Moved uglyness needed in fcntl locking (64->32 bit mapping, NFSJeremy Allison2000-05-022-1/+2
| | | | | | | errors etc.) into locking/posix.c, where it is needed. fcntl_lock in lib/util.c is now very small and clean. Added (*lock) op to vfs layer. Jeremy.
* Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison2000-05-021-0/+2
| | | | | of doing a system call every time we want to just get our pid. Jeremy.
* allow a DEFAULT_PRINTING to be specified in CFLAGSAndrew Tridgell2000-05-011-0/+4
|
* added cli_list_old() to allow for old style directory listing fromAndrew Tridgell2000-04-301-4/+2
| | | | masktest
* we don't need fnmatch.c any moreAndrew Tridgell2000-04-301-3/+0
|
* - removed all our old wildcard matching code and replaced it with aAndrew Tridgell2000-04-302-16/+19
| | | | | | | | | | | | | | | | call to ms_fnmatch(). This also removes all the Win9X semantics stuff and a bunch of other associated cruft. - moved the stat cache code into statcache.c - fixed the uint16 alignment requirements of ascii_to_unistr() and unistr_to_ascii() - trans2 SMB_FIND_FILE_BOTH_DIRECTORY_INFO returns the short name as unicode always (at least thats what NT4 does) - fixed some errors in the in-memory tdb code. Still ugly, but doesn't crash as much
* YIPEE!!!!!Andrew Tridgell2000-04-301-0/+1
| | | | | | | | | | | We finally have a perfect emulation of Microsoft wildcard matching. The routine ms_fnmatch() does wildcard matching with all MS wildcards (including the unicode wildcards), and masktest against a NT4 workstation with hundreds of thousands of random exmaples has not found a single error. amazingly it is only about 60 lines of code, but it has taken us years to get it right. I didn't sleep much last night :)
* Ok - this is the *third* implementation of this (third time's the charm :-).Jeremy Allison2000-04-282-17/+10
| | | | | | | | | | | | | | | | | This implementation keeps all POSIX lock records in a separate in memory tdb database only known about in locking/posix.c. In addition, the pending close fd's are also held in a tdb which has an array of fd's indexed by device and inode. The walk-split code uglyness has been moved to posix.c from brlock.c, which is the only place that needs to know about it, and the extra functions hacked into brlock to expose internal state have been removed. This implementation passes smbtorture locktest4, the only thing I need to check now for completeness is what to do about lock upgrade/downgrades which Win32 allows under some *very* strange circumstances. Jeremy.
* Added info level 1005 to netsharegetinfo (is the share a DFS root)Shirish Kalele2000-04-282-1/+8
| | | | Added dfs_server announcement in set_default_server_announce_type()
* Added tdb_get/set_int_byblob, which takes a size_t len and then implementedJeremy Allison2000-04-281-0/+2
| | | | | | the tdb_get/set_int string functions in terms of them. Will be useful in storing POSIX pending close records (which are ints but indexed by dev/inode pairs). Jeremy.
* Made changes suggested by Andrew review.Jeremy Allison2000-04-281-1/+1
| | | | | | | fd_close now calls fd_close_posix() directly. set_posix_lock/release_posix_lock() now handle the reference counting. More changes due when this gets moved to the file locking/posix.c Jeremy.
* Ok - this is more subtle than it looks :-).Jeremy Allison2000-04-271-1/+1
| | | | | | | | | | | | | | | 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.
* Fixed subtle unlocking bug when a file is closed. We need to store theJeremy Allison2000-04-271-0/+1
| | | | | | | | 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.
* Did the rewrite Andrew wanted where all knowledge of POSIX locking isJeremy Allison2000-04-272-3/+1
| | | | | | | | | | 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.
* Fixed crash bugs Andrew pointed out with LOCK4 smbtortureJeremy Allison2000-04-271-1/+1
| | | | | | | 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.
* Added the hard code :-).Jeremy Allison2000-04-252-1/+16
| | | | | | | | | | 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.
* moved trans2.h and nterr.h into includes.h with all our other includesAndrew Tridgell2000-04-252-54/+97
|
* Added the code that keeps fd's open across a close if there are other fsp'sJeremy Allison2000-04-241-0/+2
| | | | | | | | | | | | | | | 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.
* Now that fsp's are created on successful file open, the structure memberJeremy Allison2000-04-243-7/+11
| | | | | | | | | | | | 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 is a *big* checkin that may break some things, but implements theJeremy Allison2000-04-222-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* split fsusage() into a separate module (to fix linking problems withAndrew Tridgell2000-04-191-0/+4
| | | | spoolssd in tng)
* patch from luke to split out lanman code from ipc.c into lanman.cAndrew Tridgell2000-04-191-9/+9
|
* - got rid of the "passive" optionAndrew Tridgell2000-04-191-3/+13
| | | | - cleaned up the standard_sub_*() calls a lot
* got rid of some more old configure tests and includesAndrew Tridgell2000-04-174-65/+7
|
* removed some obsolete configure tests (sysv ipc etc)Andrew Tridgell2000-04-171-3/+0
|
* converted a couple more functions to use a fd instead of a FILE*Andrew Tridgell2000-04-161-0/+1
| | | | | added a new utility fn file_lines_slashcont() which is used to handle files that treat a \ followed by a newline as a blank
* converted a bunch more functions to use a fd instead of a FILE*Andrew Tridgell2000-04-161-2/+5
| | | | | | | to support some of this I added the following functions in util_file.c file_lines_pload : load lines from a pipe file_pload : load a pipe into memory
* added fdprintf()Andrew Tridgell2000-04-161-0/+10
| | | | | | | this is like fprintf() but operates on a file descriptor combined with file_load_lines() this makes it really easy to get rid of the use of fopen() in Samba.
* the fsp needs a jobid in it nowAndrew Tridgell2000-04-162-14/+34
| | | | | | | | | | | | | | | | | | | | | ------------ The following series of commits are for the new tdb based printing backend. This completely replaces our old printing backend. Major changes include: - all print ops are now done in printing/*.c rather than scattered all over the place - system job ids are decoupled from SMB job ids - the lpq parsers don't need to be nearly so smart, they only need to parse the filename, the status and system job id - we can store lots more info about a job, including the full job name - the queue cache control is much better I also added a new utility routine file_lines_load() that loads a text file and parses it into lines. This is used in out lpq parsing and I also want to use it to replace all of our fgets() based code in other places.
* don't need this monster any moreAndrew Tridgell2000-04-151-65536/+0
|
* a quick hack to reduce the size of the unicode map table headers fromAndrew Tridgell2000-04-152-0/+10730
| | | | | | | 3MB to 250k. I split the table into 3 sections, after noticing that 5/6 of the table was empty.
* Log file check patch from Mattias Gronlund <Mattias.Gronlund@sa.erisoft.se>.Jeremy Allison2000-04-151-1/+2
| | | | | | | Modified to do checks in timeout processing not in main loop. This (IMHO) is the correct place as (a) we are already root, and (b) it is guarenteed to be called every 200 smb requests. Jeremy.
* Code to map tdb locks onto POSIX. Mainly placeholder code at the moment,Jeremy Allison2000-04-122-4/+6
| | | | | | but the structure is done enough so that Andrew can look it over and give a yea/nay decision. Jeremy.
* Ensure that CHECK_FNUM rejects fd == -1 correctly.Jeremy Allison2000-04-121-1/+4
| | | | Jeremy.
* Roll back to using static MACHINE.SID after consultation with Andrew. ThisJeremy Allison2000-04-121-4/+1
| | | | | | code will be removed soon and a SID auto-generated from (probably) primary hostname and never stored in a file will replace it. Jeremy.
* Andrew made it faster :-).Jeremy Allison2000-04-111-2/+2
| | | | Jeremy.