summaryrefslogtreecommitdiff
path: root/source3/include
AgeCommit message (Collapse)AuthorFilesLines
2000-04-25Added the hard code :-).Jeremy Allison2-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. (This used to be commit 135855dbd3b8934a49229b81646cd4469acba926)
2000-04-25moved trans2.h and nterr.h into includes.h with all our other includesAndrew Tridgell2-54/+97
(This used to be commit d7cd7c88fdabb01d9e40ae8a657737907a21ac37)
2000-04-24Added the code that keeps fd's open across a close if there are other fsp'sJeremy Allison1-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. (This used to be commit 1df48ed55ee303b6d84d7277fd79761cfe5f7052)
2000-04-24Now that fsp's are created on successful file open, the structure memberJeremy Allison3-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 used to be commit 389b700a26e8a308a0dff6fc038c38068aa0119a)
2000-04-22This is a *big* checkin that may break some things, but implements theJeremy Allison2-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. (This used to be commit ab0ecc39d688f16b9692fe90b991f0b89287070a)
2000-04-19split fsusage() into a separate module (to fix linking problems withAndrew Tridgell1-0/+4
spoolssd in tng) (This used to be commit e2eacdd74c369fbbcd118148149321e36f3d0010)
2000-04-19patch from luke to split out lanman code from ipc.c into lanman.cAndrew Tridgell1-9/+9
(This used to be commit 95246a8432e04bcdeed962d1a6112dfd90518941)
2000-04-19- got rid of the "passive" optionAndrew Tridgell1-3/+13
- cleaned up the standard_sub_*() calls a lot (This used to be commit 2c2d95d77d3667eaa9252506a82b9054b0d0e01c)
2000-04-17got rid of some more old configure tests and includesAndrew Tridgell4-65/+7
(This used to be commit f137648504362479143d50477fa38ebf7147968b)
2000-04-17removed some obsolete configure tests (sysv ipc etc)Andrew Tridgell1-3/+0
(This used to be commit e8905a557a342ba3604a61663c6ff24887a9fd46)
2000-04-16converted a couple more functions to use a fd instead of a FILE*Andrew Tridgell1-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 (This used to be commit 384ecd9d66ccd31ee85000c0ca55d413d8f2cc53)
2000-04-16converted a bunch more functions to use a fd instead of a FILE*Andrew Tridgell1-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 (This used to be commit a09470817c5b21dba42f9ef4ce5e8b768a254c0b)
2000-04-16added fdprintf()Andrew Tridgell1-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. (This used to be commit bd5cd502bf52164b95d7bfc026189e04988171db)
2000-04-16the fsp needs a jobid in it nowAndrew Tridgell2-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. (This used to be commit 4973b7e276ca75dcb63ccb54687d17f87aede7c1)
2000-04-15don't need this monster any moreAndrew Tridgell1-65536/+0
(This used to be commit 180312c4a6a92ed4b80691d7febade3ef02c8595)
2000-04-15a quick hack to reduce the size of the unicode map table headers fromAndrew Tridgell2-0/+10730
3MB to 250k. I split the table into 3 sections, after noticing that 5/6 of the table was empty. (This used to be commit c1496736bbdb7f6bf1eb43a54f883e5f41a4d39e)
2000-04-15Log file check patch from Mattias Gronlund <Mattias.Gronlund@sa.erisoft.se>.Jeremy Allison1-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. (This used to be commit c3794fd29fdc4e5a0dbd725cdc24fe210934caf2)
2000-04-12Code to map tdb locks onto POSIX. Mainly placeholder code at the moment,Jeremy Allison2-4/+6
but the structure is done enough so that Andrew can look it over and give a yea/nay decision. Jeremy. (This used to be commit db96f83e34a139f47776fcbb5c1624fbf9d9943b)
2000-04-12Ensure that CHECK_FNUM rejects fd == -1 correctly.Jeremy Allison1-1/+4
Jeremy. (This used to be commit d2fff2596ad1585fc6a5e033fe8410fe5438a57b)
2000-04-12Roll back to using static MACHINE.SID after consultation with Andrew. ThisJeremy Allison1-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. (This used to be commit fbfe94a799cda7f728bc920d4f0655d4f537e3b6)
2000-04-11Andrew made it faster :-).Jeremy Allison1-2/+2
Jeremy. (This used to be commit f2a775d3fb605587d3ce134dec7a895de1fe562a)
2000-04-11Bloody typo ! It should be & 3 , & 1 *not* &~3, &~1.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 83734b67615382d08c3f302f90a94a0eb836c79e)
2000-04-11The latest open() code changes broke the NT directory opens. Detect if aJeremy Allison1-1/+1
read-only open on a directory was done and return an EISDIR from open_file(). Changed interface to fd_close to return error. Jeremy. (This used to be commit df4302f3911447fcebe9342f6cbf3b89bd3bafba)
2000-04-11include/byteorder.h: ALIGN4/ALIGN2 macros.Jeremy Allison3-9/+9
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. (This used to be commit 491eea8a20bf80d426625479326211dc975857a6)
2000-04-11prototypesAndrew Tridgell1-0/+1
(This used to be commit 04bee56160d95cdf971dd2e2c05e1b7482e0fbe9)
2000-04-11new prototypesAndrew Tridgell1-4/+8
(This used to be commit be7ecd0977734174645c1389836a657f62375db8)
2000-04-10new prototypesAndrew Tridgell1-11/+10
(This used to be commit d9130377b297a7a12e953e11bf5d484d48e772e0)
2000-04-10got rid of the file_fd_struct structure completely.Andrew Tridgell1-22/+4
With the new br_lock() code we no longer need the fd multiplexing, which is great because it was really horrible :) Moved the dev, inode and delete_on_close elements into the fsp. A nice side effect is that this has greatly simplified open.c (This used to be commit c3b61b33272e7b164d3b3ac4777036848c262e93)
2000-04-06Modified interfaces and added checks around *all* *alloc callsJeremy Allison1-2/+2
so that errors are returned on memory allocation failure. Jeremy. (This used to be commit 9a118cd4a2b03146b341eeffb62144a2d29b574c)
2000-04-05changed all the status code to ERROR_xxx instead of NT_STATUS_xx which areJean-François Micouleau1-0/+3
wrong in the spoolss case. fxed a bug in the job notify code (that's the polite answer), the truth is different: there is a bug in the NT spooler service, including SP6a and NT2K. changed the default lpcommand in the LPRNG case. J.F. (This used to be commit 396f73c11b29a47650b3243fef0825252a3cef9b)
2000-04-04Change to vfs API. POSIX states fsync should return an int, not a void.Jeremy Allison2-2/+2
Jeremy. (This used to be commit 6c442d68afae4140e28b770343a900b5ce510b4a)
2000-04-04Removed unused parameter vuid from rpc_server api_* calls. For the very fewTim Potter1-1/+1
functions that need to access the vuid, it can be obtained from the current_user global. Did some whitespace cleanup. (This used to be commit 738b307bd7053ede369431da7b1349befaa523d9)
2000-03-29Added check for LL suffix to long long ints needed by AIX 4.3.x compilerJeremy Allison1-0/+1
to allow successful build. Jeremy. (This used to be commit 567713a07c089ab3ebb4c9b96087777de154b601)
2000-03-29rewrote getprinterdriver level 3, now correctly handle the dependentJean-François Micouleau2-10/+12
files. A number of memleak fixed some error return values fixed. J.F. (This used to be commit c212fbe009fe556d5329b5d7106159cf21402d82)
2000-03-27changed the definition of dos_PutUniCodeAndrew Tridgell1-1/+1
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. (This used to be commit 426c90433396a95033eefcc4af97603abc934221)
2000-03-27the final part of the nmbd merge between head and tng - this gets theAndrew Tridgell2-343/+344
GETDC stuff sorted out (This used to be commit f6b56ae93e47a54317f2711533ec8208d5cbc8a9)
2000-03-27moved nmblib-specific code from util.c to nmblib.c.Luke Leighton1-344/+343
(This used to be commit 1b9077a1d5295bc8522b83ebed2d41d5dbd28a27)
2000-03-22Correctly convert from little-endian UNICODE to dos_codepage when doingJeremy Allison1-16/+18
secure file create. Jeremy. (This used to be commit 90134dd13721f60d4fb05ce9434b65e95ff09629)
2000-03-22acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.Jeremy Allison3-0/+14
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. (This used to be commit f02999dbf7971b4ea05050d7206205d7737a78b2)
2000-03-16Fixes to add "paranoid" option to popen. Checks some basic things.Jeremy Allison1-1/+1
Jeremy (This used to be commit 3b8cbb10de322fd7a1063fb5b681790b10d24ab0)
2000-03-13include/smb.h:Jeremy Allison1-0/+3
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. (This used to be commit bb100352ab2f98fab3978008d269920e03efcf6d)
2000-03-13oops ! forgot smb.h in last commitJean-François Micouleau3-0/+14
added info level 1 parsing code for addprinter(ex) J.F. (This used to be commit 4847f7b17b2d23e4efd4e7cae6bfcfc2319b9409)
2000-03-13parse correctly getprinterdriver2Jean-François Micouleau2-6/+8
found a stupid bug in enumprinters fixed some memleaks found a coredump in enumprinterdata getprinterdriverdir responds correctly now. J.F. (This used to be commit 07f2e194ba61e72320636fb7e5d0f041e255868b)
2000-03-10Cleaned up unused variables, returns from non-void functions etc.Shirish Kalele1-5/+1
(This used to be commit 6ce72c37429c3fc0629fdbd5f5656f07970a8e4a)
2000-03-10Fixups for compiles with gcc flags -Wall -Wshadow -Wstrict-prototypes ↵Jeremy Allison3-33/+22
-Wpointer-arith -Wcast-qual Partially implemented rpc daemon redirect (needs more work). Jeremy. (This used to be commit a462191698fa589ceac4afd14c652adf699eccad)
2000-03-10you know, when you do a cvs commit, you _really_ expect it to actually work.Luke Leighton2-24/+34
this explains why j-f wasn't happy. (This used to be commit c51e38214a5323d0aa9b6dcd948a76ddc29f5305)
2000-03-10getprinter level 0: was to short, found most of the fields, undocumented,Jean-François Micouleau5-52/+82
undecoded, nothing in MSDN, but now it works :-) cleanup of error codes. fixed some dfs declarations function. J.F. (This used to be commit 87da4404aba29a2ebd999886e4c06958c96d3e05)
2000-03-10indent went wrong. grr.Luke Leighton1-226/+357
(This used to be commit 525338e80766fe3dbcc4a64db8e957ae63c5e9d6)
2000-03-09Big update moving the multi-pdu support from 2.0.x into HEAD for JFJeremy Allison6-49/+115
and the printer functions. Also tidied up some header includes and got the order right so you can now do a : make proto make clean make Jeremy. (This used to be commit 833cd9fba92e4ad5297b235d108dd2be8c17079b)
2000-03-08dded Microsoft Dfs services.Shirish Kalele6-1/+84
* added a new msdfs/ directory under source/ * added msdfs sources under this directory. * modified configure setup to add a --with-msdfs configure time option Modified Files: Makefile.in acconfig.h configure configure.in include/config.h.in include/includes.h include/proto.h include/smb.h include/smb_macros.h param/loadparm.c smbd/negprot.c smbd/nttrans.c smbd/process.c smbd/reply.c smbd/server.c smbd/trans2.c Added Files: include/msdfs.h msdfs/README msdfs/msdfs.c msdfs/msdfs_tdb.c msdfs/parse_dfs_map.c ---------------------------------------------------------------------- (This used to be commit 4684b4a188b54493dbe7f0de2909a8d3c5c3ebf9)