summaryrefslogtreecommitdiffstats
path: root/source/smbd/nttrans.c
Commit message (Collapse)AuthorAgeFilesLines
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* This is the current patch from Luke Leighton <lckl@samba-tng.org> to add aAndrew Bartlett2002-01-201-1/+1
| | | | | | | | | | | | | | | | | | degree of seperation betwen reading/writing the raw NamedPipe SMB packets and the matching operations inside smbd's RPC components. This patch is designed for no change in behaviour, and my tests hold that to be true. This patch does however allow for the future loadable modules interface to specify function pointers in replacement of the fixed state. The pipes_struct has been split into two peices, with smb_np_struct taking the information that should be generic to where the data ends up. Some other minor changes are made: we get another small helper function in util_sock.c and some of the original code has better failure debugs and variable use. (As per on-list comments). Andrew Bartlett
* Re-wrote the guts of the rename_internals code to cope with a reportedJeremy Allison2002-01-041-1/+2
| | | | | | | bug (renaming name -> name was failing, on W2K it succeeds). Simplified the common case, did a lot of work to ensure NT error codes are correctly reported back to client. Jeremy.
* Grr - numbers printed in hexadecimal should be preceeded by 0xTim Potter2001-12-201-7/+7
|
* Return NT_STATUS_OBJECT_NOT_FOUND or ERRbadpipe if pipe name not found.Jeremy Allison2001-12-181-1/+1
| | | | Jeremy.
* Fixed delete on close bug. Added core dump code to winbindd.Jeremy Allison2001-11-231-7/+14
| | | | Jeremy.
* Fix detection of RedHat 7.2.Jeremy Allison2001-11-151-0/+5
| | | | | | Remove unused old file. Test 42 byte reply to SMBntcreate (W2K does this). Jeremy.
* Formatting fixes only.Jeremy Allison2001-11-131-44/+43
| | | | Jeremy.
* Don't put a \n on the end of the arg to exit_server()Tim Potter2001-11-051-5/+5
|
* Made nt acl support a local parameter for w2ksp2 profile fix.Jeremy Allison2001-10-121-26/+54
| | | | Jeremy.
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-1/+0
|
* move to SAFE_FREE()Simo Sorce2001-09-171-21/+12
|
* - enable MSDFS by default, there seems no reason not to have it enabledAndrew Tridgell2001-09-121-2/+0
| | | | | | | | by default in Samba 3.x - got rid of some unused parameters in Makefile.in - declare DEBUGLEVEL in debug.h rather than in each file
* the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but ↵Andrew Tridgell2001-09-041-22/+20
| | | | the client code still needs some work
* started converting NTSTATUS to be a structure on systems with gcc in order ↵Andrew Tridgell2001-08-271-7/+7
| | | | to make it type incompatible with BOOL so we catch errors sooner. This has already found a number of bugs
* converted smbd to use NTSTATUS by defaultAndrew Tridgell2001-08-271-45/+40
| | | | | | | | | | | | | | | | major changes include: - added NSTATUS type - added automatic mapping between dos and nt error codes - changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT() these calls auto-translate to the client error code system - got rid of the cached error code and the writebmpx code We eventually will need to also: - get rid of BOOL, so we don't lose error info - replace all ERROR_DOS() calls with ERROR_NT() calls but that is too much for one night
* merge from 2.2Gerald Carter2001-08-101-1/+1
|
* Added Gerald's lanman printing only change to HEAD.Jeremy Allison2001-08-061-68/+4
| | | | Jeremy.
* uint -> uint32.Jeremy Allison2001-07-301-1/+1
| | | | Jeremy.
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-2/+2
| | | | can't redefine them. damn.
* The big character set handling changeover!Andrew Tridgell2001-07-041-9/+9
| | | | | | | This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation.
* Ensure we correctly round down to 2 second boundary if dos filetimeJeremy Allison2001-07-041-2/+22
| | | | | set for a share. Jeremy.
* *Wonderful* patch from Andrew Bartlett that will help ensure tdb's areJeremy Allison2001-06-091-3/+6
| | | | | cleaned on clients abending connections. Thanks Andrew ! Jeremy.
* This is a big, rather ugly patch. Whilst investigating the files not truncatedJeremy Allison2001-03-301-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | when copying to a full disk problem, I discovered that we were not allowing the delete on close flag to be set properly, this led to other things, and after investigation of the proper delete on close semantics and their relationship to the file_share_delete flag I discovered there were some cases where we weren't doing the deny modes properly. And this after only 5 years working on them..... :-) :-). So here's the latest attempt. I realised the delete on close flag needs to be set across all smbds with a dev/ino pair open - in addition, the delete on close flag, allow share delete and delete access requested all need to be stored in the share mode tdb. The "delete_on_close" entry in the fsp struct is now redundant and should really be removed. This may also mean we can get rid of the "iterate_fsp" calls that I didn't like adding in the first place. Whilst doing this patch, I also discovered we needed to do the se_map_generic() call for file opens and POSIX ACL mapping, so I added that also. This code, although ugly, now passes the deny mode torture tests plus the delete on close tests I added. I do need to add one more multiple connection delete on close test to make sure I got the semantics exactly right, plus we should also (as Andrew suggested) move to random testing here. The good news is that NT should now correctly delete the file on disk full error when copying to a disk :-). Jeremy.
* Ensure get/set NT ACL code is redirected through vfs.Jeremy Allison2001-03-261-2/+2
| | | | Jeremy.
* converted the nttrans code to unicode on the wireAndrew Tridgell2001-03-161-117/+13
|
* this patch does a number of things:Andrew Tridgell2001-03-131-8/+9
| | | | | | | | | | | | | | | - removes SMB_ALIGNMENT. That macro caused all sorts of problems with getting unicode aligned right in sub-protocols (such as SMBtrans and SMBtrans2). I believe the performance reasons for having SMB_ALIGNMENT has gone away with the new variants of the SMB protocol anyway, as newer commands tend to have their own internal alignment. - fix the locations where we set smb_flg2 to absolute values. We must never do this if we want a hope of coping with unicode. - add initial support for unicode on the wire in smbd. Currently enabled using SMBD_USE_UNICODE environment variable.
* Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison2001-03-111-2/+0
| | | | | | RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy.
* Serious (and I *mean* serious) attempt to fix little/bigendian RPC issues.Jeremy Allison2001-03-091-2/+2
| | | | | | | | | We were reading the endainness in the RPC header and then never propagating it to the internal parse_structs used to parse the data. Also removed the "align" argument to prs_init as it was *always* set to 4, and if needed can be set differently on a case by case basis. Now ready for AS/U testing when Herb gets it set up :-). Jeremy.
* Move to talloc control of SPOOL_XXX structs. Move to talloc control ofJeremy Allison2001-02-281-9/+0
| | | | | security descriptors and pointers. Syncup with 2.2 tree. Jeremy.
* Fix for DACL/SACL masking typo - spotted by medha@pezman.austin.ibm.com.Jeremy Allison2001-02-121-2/+2
| | | | Jeremy.
* Merge of JohnR's changes to appliance-head, JF's changes to 2.2,Jeremy Allison2001-02-121-1/+10
| | | | | updated the POSIX_ACL code to be in sync. Jeremy.
* lib/system.c: Fix for pw caching.Jeremy Allison2001-01-311-46/+93
| | | | | | srv_samr.c: Fix for pw caching. smbd/nttrans.c: Fix to allow trans create to set ACL on open. Jeremy.
* smbd/lanman.c: Fix for calling qsort with 0 number.Jeremy Allison2001-01-241-4/+12
| | | | | | | smbd/nttrans.c: Realloc mem fixes based on those that went into trans2.c smbd/process.c: Move to a table based dispatch, based on a comment from Andrew about Antons work. Jeremy.
* This should fix Office failing to print to "FILE:".Jeremy Allison2000-11-241-3/+3
| | | | Jeremy.
* Ok - this is a big patch - and it may break smbd a bit (althoughJeremy Allison2000-10-191-47/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | I hope not). If you encounter strange file-serving behavior after this patch then back it out. I analysed our stat() usage and realised we were doing approx. 3 stat calls per open, and 2 per getattr/setattr. This patch should fix all that. It causes the stat struct returned from unix_convert() (which now *must* be passed a valid SMB_STRUCT_STAT pointer) to be passed through into the open code. This should prevent the multiple stats that were being done so as not to violate layer encapsulation in the API's. Herb - if you could run a NetBench test with this code and do a padc/par syscall test and also run with the current 2.2.0 code and test the padc/par syscalls I'd appreciate it - you should find the number of stat calls reduced - not sure by how much. The patch depends on unix_convert() actually finding the file and returning a stat struct, or returning a zero'd out stat struct if the file didn't exist. I believe we can guarentee this to be the case - I just wasn't confident enough to make this an assertion before. Ok ok - I did write this whilst at the Miami conference..... sometimes you get a little free time at these things :-). Jeremy.
* changes to sync with 2.2. treeHerb Lewis2000-10-111-8/+58
| | | | | | | | | | | | | | | | | .cvsignore remove config.h - not in this directory include/profile.h profile changes lib/messages.c added message to return debug level libsmb/clierror.c cast to get rid of compiler warning libsmb/smbencrypt.c cast to get rid of compiler warning profile/profile.c add flush profile stats changes for profile struct rpc_parse/parse_samr.c fix for compiler warning rpc_server/srv_samr.c cast to get rid of compiler warning smbd/ipc.c profile stats message.c profile stats smbd/negprot.c profile stats smbd/nttrans.c profile stats smbd/trans2.c profile stats utils/smbcontrol.c new flush stats command
* Fixed error return messages needed for NTTrans CreateDirectory.Jeremy Allison2000-10-061-0/+16
| | | | | | This patch allows the standard W2k recursive mkdir to work against Samba. Jeremy.
* Restructuring of vfs layer to include a "this" pointer - can be an fsp orJeremy Allison2000-10-061-5/+5
| | | | | | | | | | | | | | | a conn struct depending on the call. We need this to have a clean NT ACL call interface. This will break any existing VFS libraries (that's why this is pre-release code). Andrew gets credit for this one :-) :-). In addition - added Herb's WITH_PROFILE changes - Herb - please examine the changes I've made to the smbd/reply.c code you added. The original code was very ugly and I have replaced it with a START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor. Please check this compiles ok with the --with-profile switch. Jeremy.
* Vector get_nt_acl/set_nt_acl via vfs. POSIX ACL support should be addedJeremy Allison2000-10-051-1/+4
| | | | | above this layer. Jeremy.
* Fix to allow a timestamp of zero to cause an instantaneous changenotifyJeremy Allison2000-09-201-1/+8
| | | | | | scan - then call this from renames. This allows instantaneous update for W2k renames. Jeremy.
* Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need ↵Jeremy Allison2000-08-011-5/+5
| | | | | | | | NT_STATUS_XXX). Removed IS_BITS_xxx macros as they were just reproducing "C" syntax in a more obscure way. Jeremy.
* Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison2000-07-271-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | in the RPC code. This change was prompted by trying to save a long (>256) character comment in the printer properties page. The new system associates a TALLOC_CTX with the pipe struct, and frees the pool on return of a complete PDU. A global TALLOC_CTX is used for the odd buffer allocated in the BUFFERxx code, and is freed in the main loop. This code works with insure, and seems to be free of memory leaks and crashes (so far) but there are probably the occasional problem with code that uses UNISTRxx structs on the stack and expects them to contain storage without doing a init_unistrXX(). This means that rpcclient will probably be horribly broken. A TALLOC_CTX also needed associating with the struct cli_state also, to make the prs_xx code there work. The main interface change is the addition of a TALLOC_CTX to the prs_init calls - used for dynamic allocation in the prs_XXX calls. Now this is in place it should make dynamic allocation of all RPC memory on unmarshall *much* easier to fix. Jeremy.
* split all the change notify code out into a separate moduleAndrew Tridgell2000-06-121-392/+35
| | | | | | | | smbd/notify.c. All the data structures are now private to that module. this is in preparation for Linux kernel support for change notify (coming soon to a CVS tree near you)
* (Correct) fix for desired_access being zero in map_share_mode().Jeremy Allison2000-06-091-12/+12
| | | | Jeremy.
* Fix for map_share_mode to allow desired access of zero map to stat open.Jeremy Allison2000-06-081-0/+11
| | | | Jeremy.
* Fixing get/set of security descriptors.Jeremy Allison2000-06-071-1/+4
| | | | | | Removed ugly hack for NT printing. Fixed up tdb parse stuff memory leaks. Jeremy.
* rpc_client/cli_lsarpc.c: Removed unused variable.Jeremy Allison2000-06-031-9/+9
| | | | | | rpc_server/srv_spoolss_nt.c: Fixed more memory leaks. smbd/nttrans.c: Fixed shadow variable problem. Jeremy.
* Changed interface to set_nt_acl slightly.Jeremy Allison2000-05-311-1/+1
| | | | Jeremy.
* Fixed interface between new ACLS and nttrans code.Jeremy Allison2000-05-311-183/+12
| | | | Jeremy.