summaryrefslogtreecommitdiffstats
path: root/source/smbd
Commit message (Collapse)AuthorAgeFilesLines
...
* moved INSURE hook into util.cAndrew Tridgell2000-04-241-23/+0
|
* fixed two uninitialised memory referencesAndrew Tridgell2000-04-231-2/+2
|
* trick to get full stack trace when using the free version of insureAndrew Tridgell2000-04-231-0/+24
|
* insure caught an uninitialised memory reference - ensure it starts asAndrew Tridgell2000-04-231-0/+2
| | | | zero
* avoided a memory leak in the ubi code by deleting a mangled cacheAndrew Tridgell2000-04-231-1/+11
| | | | | | entry before adding to ensure that we don't ever add a duplicate entry this code can be removed when ubi gets fixed
* don't copy a null groups listAndrew Tridgell2000-04-221-2/+6
|
* fixed overlapping strcpy() found by insureAndrew Tridgell2000-04-221-9/+6
|
* fixed uninitialised snumAndrew Tridgell2000-04-221-0/+1
|
* This is a *big* checkin that may break some things, but implements theJeremy Allison2000-04-229-527/+547
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-127/+2
| | | | spoolssd in tng)
* patch from luke to split out lanman code from ipc.c into lanman.cAndrew Tridgell2000-04-192-3147/+3181
|
* - got rid of the "passive" optionAndrew Tridgell2000-04-193-21/+13
| | | | - cleaned up the standard_sub_*() calls a lot
* locking/locking.c: Fixed placeholder code for POSIX locking.Jeremy Allison2000-04-181-0/+1
| | | | | | | | 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
* ReadDirName calls vfs->readdirname calls dos_readdirname.Luke Leighton2000-04-181-5/+5
| | | | replaced with readdirname. ditto for OpenDir and CloseDir.
* converted a couple more functions to use a fd instead of a FILE*Andrew Tridgell2000-04-162-15/+17
| | | | | 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-162-102/+68
| | | | | | | 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
* removed old commentsAndrew Tridgell2000-04-161-2/+0
|
* use some symbolic names for print queue statusAndrew Tridgell2000-04-161-11/+17
|
* added helper fns to change from internal status codes to nt spoolss codesAndrew Tridgell2000-04-161-5/+41
|
* the changes to the main smb codeAndrew Tridgell2000-04-166-358/+318
| | | | | | | | | | | | | | | | | | | | | ------------ 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.
* Log file check patch from Mattias Gronlund <Mattias.Gronlund@sa.erisoft.se>.Jeremy Allison2000-04-151-0/+6
| | | | | | | 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.
* Implmented mapping of lock offset/count from 64 bit MS rangesJeremy Allison2000-04-121-1/+1
| | | | | | to either 63 or 31 bit POSIX ranges. Code to get these locks not yet added. Jeremy.
* Code to map tdb locks onto POSIX. Mainly placeholder code at the moment,Jeremy Allison2000-04-121-0/+3
| | | | | | but the structure is done enough so that Andrew can look it over and give a yea/nay decision. Jeremy.
* Roll back to using static MACHINE.SID after consultation with Andrew. ThisJeremy Allison2000-04-121-14/+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.
* The latest open() code changes broke the NT directory opens. Detect if aJeremy Allison2000-04-112-9/+27
| | | | | | read-only open on a directory was done and return an EISDIR from open_file(). Changed interface to fd_close to return error. Jeremy.
* include/byteorder.h: ALIGN4/ALIGN2 macros.Jeremy Allison2000-04-112-111/+59
| | | | | | | | | | | | 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.
* finally got sick of the "extern int Client" code and the stupidAndrew Tridgell2000-04-1112-86/+81
| | | | | | | | | | | | | | | | assumption that we have one socket everywhere while doing so I discovered a few bugs! 1) the clientgen session retarget code if used from smbd or nmbd would cause a crash as it called close_sockets() which closed our main socket! fixed by removing close_sockets() completely - it is unnecessary 2) the caching in client_addr() and client_name() was bogus - it could easily get fooled and give the wrong result. fixed. 3) the retarget could could recurse, allowing an easy denial of service attack on nmbd. fixed.
* Fix for soft quotas not being set fromJeremy Allison2000-04-101-0/+24
| | | | | Norbert Püschel <Pueschel.Norbert@Walzbarren-VAW.ne.uunet.de> Jeremy.
* initialise fsp->fd to -1Andrew Tridgell2000-04-101-0/+1
|
* the bulk of the changes to get rid of fd_ptr and move print openAndrew Tridgell2000-04-1011-1023/+231
| | | | | | | | | handling to printing/printing.c most of this was just replacing things like fsp->fd_ptr->fd with fsp->fd the changes in open.c are quite dramatic. Most of it is removing all the functions that handled the fd multiplexing
* utmp compile fix from peter@cadcamlab.orgAndrew Tridgell2000-04-101-2/+2
|
* Change to vfs API. POSIX states fsync should return an int, not a void.Jeremy Allison2000-04-042-4/+6
| | | | Jeremy.
* Removed strange optimisation (paranoia fix maybe ?) that stopped smbdJeremy Allison2000-04-041-6/+0
| | | | | | from returning '.' and '..' in a top level listing of a trans2 directory scan. NT does return these entries. Jeremy.
* Fixed bug found by JF where if the amount of data to return in the prs_structJeremy Allison2000-03-291-1/+1
| | | | | | | | was small enough to pass the SMBtrans max data test we weren't setting the "more data needed" error. I was fogetting the RPC_HEADER_LEN.... I now check the correct length (current pdu staging area length). More printer spool enum stuff works now. This bug does not affect TNG. Jeremy.
* More Japanese filename fixes wrt VFS code fromTim Potter2000-03-292-12/+16
| | | | Tomoki AONO <aono@cc.osaka-kyoiku.ac.jp>
* Win2k will only accept volume labels in UNICODE. Fixed.... :-(.Jeremy Allison2000-03-281-1/+2
| | | | Jeremy.
* Moved common code to set parameter offset field correctly oout of 'if'Jeremy Allison2000-03-281-10/+8
| | | | | statement into main function code path. Jeremy.
* changed the definition of dos_PutUniCodeAndrew Tridgell2000-03-271-4/+4
| | | | | | | | | the previous definition could result is us overflowing a buffer. The null termination was always added yet the size returned did not include the null termination. the new function takes a BOOL null_terminate, and always returns the total number of bytes consumed by the string.
* rpc_parse/parse_spoolss.c: Added checks on mallocs/overflow checks on all prs_xxJeremy Allison2000-03-251-32/+84
| | | | | | calls. smbd/connection.c: Fix from David Lee <T.D.Lee@durham.ac.uk>. Jeremy.
* Correctly convert from little-endian UNICODE to dos_codepage when doingJeremy Allison2000-03-221-17/+4
| | | | | secure file create. Jeremy.
* acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.Jeremy Allison2000-03-221-0/+2
| | | | | | | | | | | | | | include/byteorder.h: Added alignment macros. include/nameserv.h: Added defines for msg_type field options - from rfc1002. lib/time.c: Typo fix. lib/util_unistr.c: Updates from UNICODE branch. printing/nt_printing.c: bzero -> memset. smbd/connection.c: Added check for UT_SYSLEN for utmp code. Other fixes : Rollback of unapproved commit from Luke. Please *ask* next time before doing large changes to HEAD. Jeremy.
* indent update to make t easier to see setuid mods in TNG. someLuke Leighton2000-03-211-455/+558
| | | | code from these modules i had to leave out (nothing to do withj setuid)
* Fixes to add "paranoid" option to popen. Checks some basic things.Jeremy Allison2000-03-161-1/+1
| | | | Jeremy
* include/smb.h:Jeremy Allison2000-03-133-25/+93
| | | | | | | | smbd/negprot.c: smbd/reply.c: Fixes to recognise Win2k. param/loadparm.c: Put debug timestamp parameter back to correct default. smbd/nttrans.c: Fix to detect Win2k unicode bug with transact create. Jeremy.
* Cleaning up call_trans2getdfsreferral.Shirish Kalele2000-03-131-1/+0
| | | | Instead of a #ifdef MS_DFS in call_trans2getdfsreferral()... , now using a generic call leading to some #define problems.. hopefully I've corrected the last of them.
* Cleaned up call_trans2getdfsreferral for when MS_DFS is not defined.Shirish Kalele2000-03-132-3/+146
|
* moved #endif to end of function to compile when dfs is disabled.Jean-François Micouleau2000-03-131-1/+1
| | | | J.F.
* Fix stupid logic bug in detecting start-of-pdu in writeX on pipe.Jeremy Allison2000-03-111-1/+2
| | | | | Found by JF. Jeremy.
* Cleaning up the warnings from configure.developer.Shirish Kalele2000-03-102-7/+6
| | | | Found that Jeremy had already made some of the changes.
* Fixups for compiles with gcc flags -Wall -Wshadow -Wstrict-prototypes ↵Jeremy Allison2000-03-101-0/+2
| | | | | | | -Wpointer-arith -Wcast-qual Partially implemented rpc daemon redirect (needs more work). Jeremy.