summaryrefslogtreecommitdiffstats
path: root/source/smbd/trans2.c
Commit message (Collapse)AuthorAgeFilesLines
* sync with SAMBA_2_2 for 2.2.6rc1Gerald Carter2002-10-091-2/+8
|
* syncing up for 2.2.6pre2Gerald Carter2002-08-271-31/+51
|
* merging for 2.2.6pre1Gerald Carter2002-07-271-1/+2
|
* more syncs with SAMBA_2_2Gerald Carter2002-06-181-12/+41
|
* beginning to sync up for 2.2.5 release....Gerald Carter2002-06-171-34/+50
|
* Start of merge to 2_2_RELEASE branch for release.Jeremy Allison2002-04-301-75/+90
| | | | Jeremy.
* Check for NULL params (from HEAD).Jeremy Allison2002-02-051-0/+3
|
* 2.2.3 now in sync.Jeremy Allison2002-02-021-5/+9
| | | | Jeremy.
* Sync for release.Jeremy Allison2002-02-021-0/+13
| | | | Jeremy.
* Move over to RELEASE branch.Jeremy Allison2002-02-011-1814/+2436
| | | | Jeremy.
* nsswitch/winbindd_group.c: Memory leak fixes.Jeremy Allison2001-10-121-1/+1
| | | | | | 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-324/+349
| | | | Jeremy.
* Syncup getting ready for release.Jeremy Allison2001-07-061-19/+182
| | | | Jeremy.
* - remove template from smbrun(). Now uses /tmp and mkstempAndrew Tridgell2001-04-131-1/+1
| | | | | | | - fixed some uninitialised variable warnings - removed smbrun utility (never used) - removed some incorrect varargs usage - removed smbrun smb.conf option
* This is a big, rather ugly patch. Whilst investigating the files not truncatedJeremy Allison2001-03-301-134/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Insure fix. Only read 4 bytes from data area if there are 4 bytes to read.Jeremy Allison2001-03-281-1/+1
| | | | Jeremy.
* Two OS/2 printer fixes from Jim McDonough @ IBM.Jeremy Allison2001-03-231-5/+59
| | | | | | | First one adds a new info level into the lanman printing and an ioctl to the trans2 code. Andrew - this uses ASCII only. It looks ok to me but please check ! Second one adds a parameter "os2 driver map" that allows OS/2 driver names to be mapped. Jeremy.
* Fixed file descriptor leak in error conditions on print close.Jeremy Allison2001-02-221-3/+17
| | | | | | NT sends "delete on close" to cancel a print job copied from the command line. Cope with this. Jeremy.
* But Doctor, I had to kill the patient in order to save him....Jeremy Allison2001-02-211-4/+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.
* include/debug.h:Jeremy Allison2001-02-091-5/+0
| | | | | | | | | | | lib/debug.c: Fixes from JohnR to implement debug classes. smbd/process.c: smbd/server.c: param/loadparm.c: "max smbd processes" parameter from JohnR. rpc_parse/parse_spoolss.c: Drivername fix from JohnR. rpc_server/srv_spoolss_nt.c: Update from JF. smbd/trans2.c: Revert incorrect wildcard fix. Jeremy.
* Wildcard fixes for NT4 clients and DOS clients.Gerald Carter2001-02-081-2/+8
|
* Fix from Kenichi Okuyama for memory leak on Realloc fail.Jeremy Allison2001-01-231-21/+51
| | | | Jeremy.
* Fix for short names not being returned correctly with non-mangled shares.Jeremy Allison2000-12-111-1/+2
| | | | Jeremy
* Ok - fixed a bug in our levelII oplock code. We need to break a level II onJeremy Allison2000-11-161-8/+23
| | | | | | | | | a byte range lock (write lock only, but Win2k breaks on read lock also so I do the same) - if you think about why, this is obvious. Also fixed our client code to do level II oplocks, if requested, and fixed the code where we would assume the client wanted level II if it advertised itself as being level II capable - it may not want that. Jeremy.
* Fixes for extra stat's broght back from HEAD. This cuts down on theJeremy Allison2000-10-251-31/+27
| | | | | | | 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-5/+42
|
* Restructuring of vfs layer to include a "this" pointer - can be an fsp orJeremy Allison2000-10-061-14/+14
| | | | | | | | | | | | | | 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.
* Fixes for the fact that UNICODE sizes are no always 2*no of chars whenJeremy Allison2000-10-031-8/+9
| | | | | in multibyte codepages. Fix from Hiroshi MIURA, Samba User Group Japan staff. Jeremy.
* utf-8 and EUC3 patch from Hiroshi Miura Samba User Group Japan staff.Jeremy Allison2000-10-031-2/+1
| | | | | mkdir high bits patch from Robert Dahlem" <Robert.Dahlem@gmx.net>. jeremy.
* Changed MS_DFS to WITH_MSDFS throughout.Shirish Kalele2000-05-261-2/+3
| | | | 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-0/+4
| | | | | 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.
* The new msdfs implementation that uses symlinks to point to otherShirish Kalele2000-05-161-2/+13
| | | | | | | | | | | | | | | | servers. Very intuitive. Removed the dfs map parsing code and tdb maintenance code (files msdfs/parse_dfs_map.c & msdfs/msdfs_tdb.c), dfs map loading and unloading calls (param/loadparm.c smbd/server.c). Added code to display msdfs format symlinks as directories in a transact2_findfirst/findnext. (smbd/trans2.c) Modified msdfs/msdfs.c to use the msdfs symlinks to create dfs referrals. Changed msdfs/README to reflect new operability.
* lib/util_unistr.c:Jeremy Allison2000-05-101-1/+1
| | | | | | | | | | libsmb/clilist.c: rpc_server/srv_spoolss_nt.c: smbd/trans2.c: Changed unistr_to_ascii to unistr_to_dos - do codepage conversion. msdfs/msdfs.c: Removed stub unistr_to_dos. libsmb/pwd_cache.c: Removed obfuscation functions as they don't do anything and don't add any security. Jeremy.
* more merging voodooAndrew Tridgell2000-05-101-0/+4
| | | | | | 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
* go back to ascii in SMB_FIND_FILE_BOTH_DIRECTORY_INFOAndrew Tridgell2000-04-301-10/+4
| | | | NT gives out unicode, but NT clients can't handle a unicode response!
* - removed all our old wildcard matching code and replaced it with aAndrew Tridgell2000-04-301-38/+29
| | | | | | | | | | | | | | | | 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
* 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-2/+2
| | | | | | | | | | | | 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.
* fixed two uninitialised memory referencesAndrew Tridgell2000-04-231-2/+2
|
* This is a *big* checkin that may break some things, but implements theJeremy Allison2000-04-221-87/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-4/+3
| | | | | | | | | | | | | | | | 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-11/+11
| | | | | | | | | 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
* 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.
* 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.
* 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-131-1/+1
|
* moved #endif to end of function to compile when dfs is disabled.Jean-François Micouleau2000-03-131-1/+1
| | | | J.F.