summaryrefslogtreecommitdiffstats
path: root/source/smbd/trans2.c
Commit message (Collapse)AuthorAgeFilesLines
* r25387: Sync with 3.2.0 svn treeGerald Carter2007-09-271-271/+378
|
* r24809: Consolidate the use of temporary talloc contexts.Volker Lendecke2007-08-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the two functions talloc_stackframe() and talloc_tos(). * When a new talloc stackframe is allocated with talloc_stackframe(), then * the TALLOC_CTX returned with talloc_tos() is reset to that new * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse * happens: The previous talloc_tos() is restored. * * This API is designed to be robust in the sense that if someone forgets to * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and * resets the talloc_tos(). The original motivation for this patch was to get rid of the sid_string_static & friends buffers. Explicitly passing talloc context everywhere clutters code too much for my taste, so an implicit talloc_tos() is introduced here. Many of these static buffers are replaced by a single static pointer. The intended use would thus be that low-level functions can rather freely push stuff to talloc_tos, the upper layers clean up by freeing the stackframe. The more of these stackframes are used and correctly freed the more exact the memory cleanup happens. This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and lp_talloc_ctx (did I forget any?) So, never do a tmp_ctx = talloc_init("foo"); anymore, instead, use tmp_ctx = talloc_stackframe() :-) Volker
* r24699: Actually write 24 zeros instead of zero 24's...Volker Lendecke2007-08-271-1/+1
| | | | Jeremy, please check ;-)
* r24660: Merge the inbuf/outbuf changesVolker Lendecke2007-08-251-599/+932
|
* r24548: Fix the case-changing renamesVolker Lendecke2007-08-191-1/+20
| | | | | This was broken when I changed reply_mv to wrap in a open_file_ntcreate call, unix_convert on the destination was called twice
* r24499: Move the checks for DOS error codes on open to a function.Jeremy Allison2007-08-161-21/+3
| | | | Jeremy.
* r24475: Fix the error mapping for SMB_POSIX_PATH_OPEN.Jeremy Allison2007-08-161-0/+11
| | | | Jeremy.
* r24472: Start fixing up the mapping of OBJECT_NAME_COLLISIONJeremy Allison2007-08-151-1/+11
| | | | | to DOS error ERRDOS, ERRfilexists on open calls. Jeremy.
* r24471: Revert inadvertant commit.Jeremy Allison2007-08-151-11/+1
| | | | Jeremy.
* r24470: Start fixing up the mapping of OBJECT_NAME_COLLISIONJeremy Allison2007-08-151-1/+11
| | | | | to DOS error ERRDOS, ERRfilexists on open calls. Jeremy.
* r24122: merge from SAMBA_3_2:Stefan Metzmacher2007-08-021-4/+10
| | | | | | | | | add a file_id_create() hook into the VFS layer it's needed for some cluster filesystems to overload this function. metze
* r23942: Fix issue found by Shlomi Yaakobovich <Shlomi@exanet.com> whereJeremy Allison2007-07-181-5/+6
| | | | | | invalid names sent as a resume name were incorrectly mapped into . and .. Ensure they really *are . and .. Jeremy.
* r23935: We were lying to the client in the case of POSIX_UNLINKJeremy Allison2007-07-171-16/+51
| | | | | | | | | | | if a Windows client had the file open. We were setting delete on close and returning "ok". The POSIX client then believed the file was gone (and it wasn't). Fix this to return SHARING_VIOLATION if there is an existing NTcreateX open on the file and someone calls POSIX_UNLINK. Still one more Cthon test to fix but getting closer now. Should be in 3.0.25c also. Jeremy.
* r23877: Fix two segfaults in (very unlikely) error paths, found by the IBMVolker Lendecke2007-07-151-0/+2
| | | | checker.
* r23855: Setting the allocation size updates the modified timeJeremy Allison2007-07-121-12/+29
| | | | | as a write does. Fix bug #4779. Jeremy.
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-07-101-2/+1
|
* r23780: Find and fix more GPL2 -> GPL3.Jeremy Allison2007-07-091-1/+1
| | | | Jeremy.
* r23761: Rename reduce_name to check_reduced_nameVolker Lendecke2007-07-091-1/+1
| | | | | The function name reduce_name is misleading, making the user believe it changes an argument.
* r23741: Combined merge of 23726, 23727 and 23731 from 3_0:Volker Lendecke2007-07-071-10/+28
| | | | | | | | | | | | | | | | | | | | | 23726: Explicitly pass down the FLAGS2 field to srvstr_pull_buf. The next checkin will pull this up to srvstr_get_path. At that point we can get more independent of the inbuf, the base_ptr in pull_string will only be used to satisfy UCS2 alignment constraints. 23731: Explicitly pass down FLAGS2 to srvstr_get_path. Next step is to remove the bug that in the trans2 code we use the inbuf as the base pointer to decide whether we need ucs2 alignment where we need to use the beginning of the params buffer 23731: Forgot one reference to inbuf
* r23739: Merge r23724 from 3_0 without the accidential checkin:Volker Lendecke2007-07-071-30/+53
| | | | | | | | Reduce access to the global inbuf a tiny bit. Add a struct smb_request that contains some of the fields from the SMB header, removing the need to access inbuf directly. This right now is used only in the open file code & friends, and creating that header is only done when needed. This needs more work, but it is a start.
* r23500: Two changes to survive the now activated test for rename_internals_fsp:Volker Lendecke2007-06-141-3/+3
| | | | | With the target being open we have to return NT_STATUS_ACCESS_DENIED and root_fid != 0 leads to NT_STATUS_INVALID_PARAMETER
* r23183: Check in a change made by Tridge:Volker Lendecke2007-05-291-4/+4
| | | | | | | | | | | | | This replaces the internal explicit dev/ino file id representation by a "struct file_id". This is necessary as cluster file systems and NFS don't necessarily assign the same device number to the shared file system. With this structure in place we can now easily add different schemes to map a file to a unique 64-bit device node. Jeremy, you might note that I did not change the external interface of smb_share_modes.c. Volker
* r23106: Use lchown for symlinks.Jeremy Allison2007-05-241-2/+11
| | | | Jeremy.
* r23100: Implement the delete on close semantics I've just tested forJeremy Allison2007-05-231-2/+3
| | | | | | in Samba4 smbtorture. Fix rename on an open file handle. Needed for 3.0.25a. Jeremy.
* r23087: Fix POSIX setfilepathinfo to use lstat, not stat.Jeremy Allison2007-05-221-9/+21
| | | | | | | Still missing lchown (will add this for 3.0.26). Don't merge for 3.0.25a - possibly 3.0.25b (if it exists). Jeremy.
* r23014: For all branches, ensure that if we're blocked on a POSIXJeremy Allison2007-05-191-2/+6
| | | | | | | | lock we know nothing about that we retry the lock every 10 seconds instead of waiting for the standard select timeout. This is how we used to (and are supposed to) work. Jeremy.
* r22920: Add in the UNIX capability for 24-bit readX, as discussedJeremy Allison2007-05-161-1/+2
| | | | | | with the Apple guys and Linux kernel guys. Still looking at how to do writeX as there's no recvfile(). Jeremy.
* r22909: Change prototype of dump_data(), so that it takes unsigned char *Michael Adam2007-05-151-2/+2
| | | | | | | | | | instead of char *, which matches what samba4 has. Fix all the callers to prevent compiler warnings. This essentially ports r22001 from SAMBA_3_0 to SAMBA_3_0_26. There are a few additional type cast corrections.
* r22846: Chunk one to replace message_send_pid with messaging_send: Deep insideVolker Lendecke2007-05-141-2/+4
| | | | | | locking/locking.c we have to send retry messages to timed lock holders. The majority of this patch passes a "struct messaging_context" down there. No functional change, survives make test.
* r22652: re-add Jeremy objectID changesGerald Carter2007-05-031-1/+90
|
* r22649: revert the objectID changes (for now) and leave these for 3.0.26Gerald Carter2007-05-031-90/+1
|
* r22542: Move over to using the _strict varients of the tallocJeremy Allison2007-04-271-1/+1
| | | | | calls. No functional changes. Looks bigger than it is :-). Jeremy.
* r22493: Fix horrible memory corruption bug with CIFS POSIX open/mkidr.Jeremy Allison2007-04-231-0/+2
| | | | | Found by SteveF + valgrind :-). Jerry - essential for rc3. Jeremy.
* r22490: Fix a couple of bugs found whist investigating CSC Vista issues.Jeremy Allison2007-04-231-4/+92
| | | | | | | Ensure we correctly NULL out allocation size fields. Allow QFILEINFO on pipes (Vista bug ?). Jerry - don't automatically merge for 3.0.25. Jeremy.
* r22266: Fix bug #4512 - we were returning a volume label greater thanJeremy Allison2007-04-161-1/+3
| | | | | 32 unicode chars. Windows XP doesn't like that :-). Jeremy
* r22064: Fix the DFS code to work better with Vista clients. AllowJeremy Allison2007-04-031-2/+3
| | | | | | | | "host msdfs = true" to be set in the [global] section and allow Vista to see shares with "msdfs root = yes" and "msdfs root = no" off the same server. Down to an error message really :-). Jeremy.
* r21955: Merge over jpeach's fixes for UNIX_INFO2.Jeremy Allison2007-03-231-1/+5
| | | | | | | | | | | | | | | Jeremy. After discussion with the Apple and Linux client maintainers, changing the FindFirst response for the UNIX_INFO2 level to include a length field before the name. The name is not required to be null terminated. The length field does not count any null. Also add call to chflags(2) in the default VFS module so that this will work be default on BSD-derived platform. Add UNIX-INFO2 test to the build farm to get some non-BSD coverage. Jeremy and Jerry, please review for inclusion in 3.0.25.
* r21952: Fix critical (!) error found by IBM checker.Jeremy Allison2007-03-231-22/+28
| | | | | | | Missing break statements meant that no info levels would ever be returned correctly from POSIX open/mkdir. Jeremy.
* r21800: Check-in the DFS rewrite. I am still testing this but itJeremy Allison2007-03-121-14/+29
| | | | | | | | works from smbclient and Windows, and I am promising to support and fix both client and server code moving forward. Still need to test the RPC admin support but I haven't changed that code. Jeremy.
* r21792: Fix crash bug triggered by Excel reported by Jerry.Jeremy Allison2007-03-121-1/+1
| | | | | Bad cut-n-paste on rewrite of timestamps. Jeremy.
* r21783: Add in the "create info" field to the replyJeremy Allison2007-03-111-22/+32
| | | | | | | | | | | | | | | from POSIX_OPEN and POSIX_MKDIR as specified by Stevef in the wikki (extra 4 byte field). Also fix horrible bug in James's code (James you should review this for your Apple patch tree) where he failed to allocate the correct return memory size when returning a INFO2 struct. Added #define for the size of the INFO2 struct and made sure we allocate the correct size for return. Jeremy.
* r21781: Add support for the UNIX_INFO2 info level. Merge the followingJames Peach2007-03-091-46/+250
| | | | | | | | SAMBA_3_0 revisions: r21756:21757 r21761:21762 r21762:21763 r21764:21767
* r21777: As Stevef requested and the Apple guys agreed, makeJeremy Allison2007-03-091-4/+8
| | | | | | | mode_t in posix_open/posix_mkdir -> 8 bytes to match the SET_UNIX_INFO_BASIC call. Steve is updating the Wikki. Jeremy.
* r21754: Volker is completely correct. There's no need forJeremy Allison2007-03-071-5/+15
| | | | | | | the RESOLVE_DFSPATH macros and their varients any more. Fix reporting profile bug with all error returns. Jeremy.
* r21718: Merge -r21716:21717 from SAMBA_3_0: Support the SMB_QUERY_POSIX_WHOAMIJames Peach2007-03-061-1/+110
| | | | info level on QueryFsInfo.
* r21714: Change the VFS interface to use struct timespecJeremy Allison2007-03-051-43/+48
| | | | | | | | | | for utimes - change the call to ntimes. This preserves nsec timestamps we get from stat (if the system supports it) and only maps back down to usec or sec resolution on time set. Looks bigger than it is as I had to move lots of internal code from using time_t and struct utimebuf to struct timespec. Jeremy.
* r21672: The cannonical file access pattern should look like this :Jeremy Allison2007-03-031-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | srvstr_get_path(inbuf, name, smb_buf(inbuf) + 1, sizeof(name), 0, STR_TERMINATE, &status); if (!NT_STATUS_IS_OK(status)) { return ERROR_NT(status); } RESOLVE_DFSPATH(name, conn, inbuf, outbuf); status = unix_convert(conn, name, False, NULL, &sbuf); if (!NT_STATUS_IS_OK(status)) { return ERROR_NT(status); } status = check_name(conn, name); if (!NT_STATUS_IS_OK(status)) { return ERROR_NT(status); } Make sure that every access pattern (including the wildcard generated paths from unlink, rename, and copy) do the same. Tidy things up a bit.... Jeremy.
* r21667: posix_unlink should break existing oplocks.Jeremy Allison2007-03-021-1/+1
| | | | Jeremy.
* r21645: Make posix_unlink work - on open files too !Jeremy Allison2007-03-011-1/+24
| | | | Jeremy.
* r21644: Allow mkdir on platforms with no O_DIRECTORY.Jeremy Allison2007-03-011-0/+31
| | | | | | Add proper debug to all possible setfilepathinfo functions. Jeremy.