summaryrefslogtreecommitdiffstats
path: root/source/smbd/nttrans.c
Commit message (Collapse)AuthorAgeFilesLines
* another sync with SAMBA_2_2. Regenerated docs after vl new strip-links.plGerald Carter2002-08-281-2/+8
| | | | change
* syncing up for 2.2.6pre2Gerald Carter2002-08-271-30/+125
|
* merging for 2.2.6pre1Gerald Carter2002-07-271-3/+5
|
* beginning to sync up for 2.2.5 release....Gerald Carter2002-06-171-4/+7
|
* Start of merge to 2_2_RELEASE branch for release.Jeremy Allison2002-04-301-479/+453
| | | | Jeremy.
* Move over to RELEASE branch.Jeremy Allison2002-02-011-189/+172
| | | | Jeremy.
* Fix for using talloc context before creation.Jeremy Allison2001-10-121-9/+13
| | | | Jeremy.
* nsswitch/winbindd_group.c: Memory leak fixes.Jeremy Allison2001-10-121-22/+46
| | | | | | Changed "nt acl support" to a per-share parameter, fixed profile problem with w2ksp2. Jeremy
* Sync-up with SAMBA_2_2 branch.Jeremy Allison2001-10-111-136/+72
| | | | Jeremy.
* Syncup getting ready for release.Jeremy Allison2001-07-061-5/+28
| | | | 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.
* 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.
* But Doctor, I had to kill the patient in order to save him....Jeremy Allison2001-02-211-11/+0
| | | | | | | | | | | | | | | | | | | This will probably break 2.2 for a while. Do *NOT* checkout unless you like core dumps. This is the first merge of the TNG SAMR code into 2.2. It will eventually give us a wonderful PDC, but maybe painful in the short term. It had to be done however, and this touches almost every file (mostly just removing the OLD_NT_DOMAIN) stuff. I removed some SAMR functionality from rpcclient that would no longer compile. Also changed fstring to 256 bytes to better match an NT pathname. Jeremy.
* Fix for DACL/SACL masking typo - spotted by medha@pezman.austin.ibm.com.Jeremy Allison2001-02-121-2/+2
| | | | Jeremy.
* smbencrypt.c: rewrote decode_pw_buffer() to generate the NT and LM hashes.Jean-François Micouleau2001-02-031-1/+10
| | | | | | | | | | | | | | | | | That way the NT hash is not converted back and forth between unicode and ascii. srv_reg.c: added checks for the netlogon parameter key. Send a reply like NT4. Should fix the "unknown RPC call" error with a W2K joining a samba domain. srv_samr.c: don't check if smb_create_user() succed ot not. Explanation in the code. nttrans.c: changed checking of W2K in get_filename_transact(). added check on the SD. That fix the incorrect perms set on W2K profiles. J.F.
* lib/system.c: Fix for pw caching.Jeremy Allison2001-01-311-46/+93
| | | | | | srv_samr.c: Fix for pw caching. smbd/nttrans2.c: Allow create call to set ACLs. Jeremy.
* printing/printing.c: Merge from appliance head.Jeremy Allison2001-01-241-4/+12
| | | | | | smbd/lanman.c: Fix for calling qsort with num=0 (insure fix). smbd/nttrans.c: Memory leak fixes as added to trans2.c Jeremy.
* This should fix Office failing to print to "FILE:".Jeremy Allison2000-11-241-3/+3
| | | | Jeremy.
* Fixes for extra stat's broght back from HEAD. This cuts down on theJeremy Allison2000-10-251-47/+10
| | | | | | | number of stats per smb call as we now trust the statcache. There are more optimizations to come.... Also generic merges to keep 2.2.0 and HEAD in sync. Jeremy.
* add remaining profile statsHerb Lewis2000-10-101-8/+58
|
* 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). 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.
* prs_give_memory in wrong place, also poss. was losing mem.Luke Leighton2000-05-271-7/+7
|
* fixed nttrans.cLuke Leighton2000-05-271-406/+38
|
* Changed MS_DFS to WITH_MSDFS throughout.Shirish Kalele2000-05-261-1/+1
| | | | Fixed trans2 calls on IPC$ to let dfs referral calls through.
* Did a proper fix for the file access on IPC$. Denied all pipe opens onJeremy Allison2000-05-231-124/+192
| | | | | trans2 open calls as we don't have the pipe open response coded up yet. Jeremy.
* Fixed bug where file access was allowed on IPC$ share.Jeremy Allison2000-05-231-0/+3
| | | | | Return correct error codes on invalid share name. Jeremy.
* Added the NETDFS pipe to allow remote administration of the msdfs symlinksShirish Kalele2000-05-181-0/+3
| | | | on the samba server.
* more merging voodooAndrew Tridgell2000-05-101-1/+3
| | | | | | 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
* moved trans2.h and nterr.h into includes.h with all our other includesAndrew Tridgell2000-04-251-1/+0
|
* Now that fsp's are created on successful file open, the structure memberJeremy Allison2000-04-241-1/+1
| | | | | | | | | | | | 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.
* insure caught an uninitialised memory reference - ensure it starts asAndrew Tridgell2000-04-231-0/+2
| | | | zero
* This is a *big* checkin that may break some things, but implements theJeremy Allison2000-04-221-40/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* finally got sick of the "extern int Client" code and the stupidAndrew Tridgell2000-04-111-6/+4
| | | | | | | | | | | | | | | | 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.
* the bulk of the changes to get rid of fd_ptr and move print openAndrew Tridgell2000-04-101-32/+8
| | | | | | | | | 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
* Correctly convert from little-endian UNICODE to dos_codepage when doingJeremy Allison2000-03-221-17/+4
| | | | | secure file create. Jeremy.
* include/smb.h:Jeremy Allison2000-03-131-19/+84
| | | | | | | | 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.
* Fixups for Win2K security descriptors from the 2.0.x branch.Jeremy Allison2000-03-091-26/+60
| | | | Jeremy.