summaryrefslogtreecommitdiff
path: root/source3/smbd/nttrans.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r23640: When we support the SeSecurity privilage, this is whereJeremy Allison1-0/+21
we'll check it. Jeremy. (This used to be commit 1b73bf79f4f8a2bc408d52a1ce9df47f33fb3a87)
2007-10-10r23620: Convert set_nt_acl to return NTSTATUS. Also fix the chownJeremy Allison1-9/+3
return to correctly return NT_STATUS_INVALID_OWNER if it should be disallowed. Matches better what W2K3R3 does. NFSv4 ACL module owners, please examine these changes. Jeremy. (This used to be commit fc6899a5506b272f8cd5f5837ca13300b4e69a5f)
2007-10-10r23510: Tidy calls to smb_panic by removing trailing newlines. Print theJames Peach1-1/+1
failed expression in SMB_ASSERT. (This used to be commit 171dc060e2a576d724eed1ca65636bdafffd7713)
2007-10-10r23450: max_params_return is complete fiction when getting a changenotifyJeremy Allison1-4/+2
request. Ignore it. Should fix bug #4689 but more tests and valgrinding will follow. Jeremy. (This used to be commit c23e08cc09b8de860ab9c7ac9d0e7c2502dfccd9)
2007-10-10r23346: Fix offline caching with XP/Vista. It was an off-by-oneJeremy Allison1-4/+4
in storing the access mask. I shouldn't have made this mistake. Damn. Fixes bug #4673. Jeremy (This used to be commit 84801d4e83786b9de3d0875a317ca9ed8ff5b3e4)
2007-10-10r23206: remove unreachable codeGerald Carter1-3/+0
(This used to be commit 6e2bb4836fab5e548429613dea431007af3a7995)
2007-10-10r23183: Check in a change made by Tridge:Volker Lendecke1-4/+2
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 (This used to be commit 9b10dbbd5de8813fc15ebbb6be9b18010ffe8139)
2007-10-10r22542: Move over to using the _strict varients of the tallocJeremy Allison1-1/+1
calls. No functional changes. Looks bigger than it is :-). Jeremy. (This used to be commit f6fa3080fee1b20df9f1968500840a88cf0ee592)
2007-10-10r22492: Add objectid code.Jeremy Allison1-10/+23
Jeremy. (This used to be commit d3df922038032b65f52e1e0ac1f2dd53a6933fb7)
2007-10-10r22391: Looks bigger than it is. Make "inbuf" availableJeremy Allison1-25/+31
to all callers of smb_setlen (via set_message() calls). This will allow the server to reflect back the correct encryption context. Jeremy. (This used to be commit 2d80a96120a5fe2fe726f00746d36d85044c4bdb)
2007-10-10r22129: Fix the nttrans create extended response for pipesJeremy Allison1-5/+44
and files (tested with Win32 code). Bug #4404 should now be dead :-). Jeremy. (This used to be commit 40a86a56662eca2668b8a9515b9f924f54d80cc0)
2007-10-10r22128: Fix the pipe open response with EXTENDED_RESPONSE_REQUIREDJeremy Allison1-1/+24
set. Only the NTTrans create left to fix for csc. Jeremy. (This used to be commit 7856db9fce9906c5a7d19fbe69dfcfd4b644c134)
2007-10-10r22124: Wow - NTCreateX sets the word count to 42, but returns 50 onJeremy Allison1-1/+7
the wire. Strange.... But now we're returning Windows compatible extended info. Next to fix the pipe returns and NTTrans Creates. Jeremy. (This used to be commit 57e46f2f80db153fc7ce0eb09f24afa78aa27349)
2007-10-10r22123: Try and fix the csc (#4404) bug by supporting the extendedJeremy Allison1-7/+18
response to NTCreateX - need to fix this also for pipe open and NTTransCreate as well so this isn't finished. Jeremy. (This used to be commit be742f248178ae606dfa3a90c6148a18b42128e3)
2007-10-10r22001: change prototype of dump_data(), so that it takes unsigned char * now,Stefan Metzmacher1-1/+1
which matches what samba4 has. also fix all the callers to prevent compiler warnings metze (This used to be commit fa322f0cc9c26a9537ba3f0a7d4e4a25941317e7)
2007-10-10r21800: Check-in the DFS rewrite. I am still testing this but itJeremy Allison1-8/+25
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. (This used to be commit 7a7862c01d07796ef206b255c676ad7dc2cc42fc)
2007-10-10r21754: Volker is completely correct. There's no need forJeremy Allison1-5/+16
the RESOLVE_DFSPATH macros and their varients any more. Fix reporting profile bug with all error returns. Jeremy. (This used to be commit cdf0fdb1049fd68b46885cbea887dc0e595fa524)
2007-10-10r21748: More cosmetic alignment. One change to call_nt_transact_create(): We ↵Volker Lendecke1-11/+14
were asking open_file_ntcreate for a batch oplock if the client asked us to do so, even if it did not ask for an oplock in the first place. Did not test it, but I think this is bogus anyway. Volker (This used to be commit 0b94af112b9a40171fd9b14ea39981ac65d709f2)
2007-10-10r21747: Cosmetic checkin to bring ntcreate and nttranscreate closer togetherVolker Lendecke1-13/+19
(This used to be commit ecc781f1a211377e9ebb3e416c86123c00b11ed3)
2007-10-10r21714: Change the VFS interface to use struct timespecJeremy Allison1-1/+1
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. (This used to be commit 8f3d530c5a748ea90f42ed8fbe68ae92178d4875)
2007-10-10r21672: The cannonical file access pattern should look like this :Jeremy Allison1-19/+20
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. (This used to be commit b8327b21ddf518d34c6cd6c01bd7fc0fd3f63c0c)
2007-10-10r21191: Add in the POSIX open/mkdir/unlink calls.Jeremy Allison1-10/+16
Move more error code returns to NTSTATUS. Client test code to follow... See if this passes the build-farm before I add it into 3.0.25. Jeremy. (This used to be commit 83dbbdff345fa9e427c9579183f4380004bf3dd7)
2007-10-10r21123: Make notify_fsp() static to notify.c.Volker Lendecke1-36/+3
Volker (This used to be commit d663b729c0b3f4265fa90a5df8534ad52b8f04eb)
2007-10-10r21121: Fix error message, based on RAW-NOTIFYVolker Lendecke1-1/+1
(This used to be commit 2d0a0a0b34fe4b8778d453ccfb5df6bc4534ef62)
2007-10-10r21092: Ok, that's the one that activates the Samba4 notify backend.Volker Lendecke1-5/+49
Now to clean up / fix lots of stuff. Volker (This used to be commit 9e7443fa1417c01be903b15073825dc4def78d99)
2007-10-10r21002: Get rid of unused macros - merge change from 3_0_24Herb Lewis1-16/+16
(This used to be commit 9d23cf0cc4a8974bf0cf74b219a1138383083360)
2007-10-10r20931: This changes the notify infrastructure from a polling-based to an ↵Volker Lendecke1-13/+1
event-driven based approach. The only remaining hook into the backend is now void *(*notify_add)(TALLOC_CTX *mem_ctx, struct event_context *event_ctx, files_struct *fsp, uint32 *filter); (Should we put this through the VFS, so that others can more easily plug in?) The trick here is that the backend can pick filter bits that the main smbd should not handle anymore. Thanks to tridge for this idea. The backend can notify the main smbd process via void notify_fsp(files_struct *fsp, uint32 action, char *name); The core patch is not big, what makes this more than 1800 lines are the individual backends that are considerably changed but can be reviewed one by one. Based on this I'll continue with inotify now. Volker (This used to be commit 9cd6a8a82792b7b6967141565d043b6337836a5d)
2007-10-10r20878: Fix build with --enable-profilingVolker Lendecke1-1/+0
(This used to be commit eb14d0ea83273c60aee900557aa5dceb77bb8127)
2007-10-10r20873: Some correctness fixes w.r.t. Samba4 torture BASE-DELETE.Jeremy Allison1-9/+14
Allow us to correctly refuse to set delete on close on a non-empty directory. There are still some delete-on-close wrinkles to be fixed, but I understand how to do that better now. I'll fix this tomorrow. Jeremy. (This used to be commit 029635885825a5562e7974a6f5675cce3bf1b5dc)
2007-10-10r20854: Ok, now I think we're at a point where looking at notify starts to ↵Volker Lendecke1-6/+47
make sense again :-) Volker (This used to be commit 5533cdeec1b0cdee39b1d89e2320587dc9281ee6)
2007-10-10r20844: Somewhat radical change - this may break the build (I willJeremy Allison1-11/+17
watch carefully - so I'm doing it in one transaction so I can roll back). Change check_name(), reduce_name() and dptr_create() to return NTSTATUS. This helps a lot in error path processing and especially in reduce_name() allows us to ditch the flaky and error-prone saving of errno and return errors directly. Jeremy. (This used to be commit 6133a694aa429d638320e39ffe1c49d172583ccf)
2007-10-10r20781: Fix a couple of paths found by Volker where we weren'tJeremy Allison1-1/+7
correctly handling deferred opens. Jeremy. (This used to be commit e47b79d1cef279a1de1128d114d423c1fd2b1e8d)
2007-10-10r20724: Get closer to passing RAW-OPEN. If the client is usingJeremy Allison1-12/+10
create disposition of FILE_CREATE then there's no need to check can_delete_file_in_directory(). Jeremy. (This used to be commit eb32b60efc4c332295ff6fc7e5d575f4b40e8ff6)
2007-10-10r20718: Sync up the filename path parsing changes from SAMBA_3_0_24.Jeremy Allison1-38/+14
The only difference between the two trees now w.r.t file serving are the changes to smbd/open.c in this branch I need to review. Jeremy. (This used to be commit f4474edf6a0c71001dbd01429ef70bafad6abd74)
2007-10-10r20634: A *LOT* more work is necessary before touching notify remotely ↵Volker Lendecke1-47/+6
starts to make sense. Until then, remove it from the tree to keep the diff between 3_0_24 and 3_0 small. Volker (This used to be commit f146a85e74c84e78a11e616a1cbeaeef4693a0e0)
2007-10-10r20612: A checkin I've wanted to do for ages: For bad_path==False ↵Volker Lendecke1-3/+2
set_bad_path_error is equivalent to UNIX_ERROR. Expand the last reference. Lets see if I can kill that as well :-) Volker (This used to be commit 794d5d38f19601bb5b30b965b41b844aacf1caeb)
2007-10-10r20611: All but one callers to set_bad_path_error have had the ↵Volker Lendecke1-2/+3
bad_path==True argument being handled further up. Volker (This used to be commit 358673c36697a16aa87f9cebbace34abf16ed28e)
2007-10-10r20470: Jeremy, another one to check:Volker Lendecke1-22/+17
The only error path of can_delete() that we're interested in ntcreate&x is the one of can_delete_file_in_directory(), so call that directly. The only other one where we might get a NT_STATUS_ACCESS_DENIED is from the lstat in can_delete, but this is covered later in the open_directory and open_file_ntcreate calls. open_directory does a stat() in the open case which also covers the (potential) symlink, and open_file_ntcreate does the open(2) itself, so this should also work. This makes can_delete() static to reply.c. Volker (This used to be commit d289037fdbc8bd3e0723784888946d5b39ffadef)
2007-10-10r20465: Get rid of a redundant !NT_STATUS_IS_OK(status)Volker Lendecke1-4/+4
(This used to be commit ff173995cfeac216ab26faef6553be8f7f439347)
2007-10-10r20451: Survive the first of the filter-tests (mkdir).Volker Lendecke1-3/+9
Add lots of TODOs :-) Volker (This used to be commit 0e953884a15873b0962ab1ab064d6b3a436726c0)
2007-10-10r20442: Slight rewrite of the change notify infrastructure. This now ↵Volker Lendecke1-3/+27
survives the first of the raw-notify subtests, the one-level test_notify_dir without any flags around yet. The tricky part was getting the data structures right, I hope the next tests don't let that fall over. fsp->notify is now by default NULL, meaning that nobody has issued a changenotify call. This means nobody is interested in changes for this directory. If that has happened, notify_change_buf collects the changes if no current request is outstanding, and it collects the requests if no change has happened since the last request. Happy New Year, somewhere on this planet it's already 2007 :-) Volker P.S: Jeremy, there's a question for you in smbd/files.c line 367. (This used to be commit ce0ad24988075465addcac0b9afc872e909135af)
2007-10-10r20433: Work in progress: Survive more of RAW-NOTIFY.Volker Lendecke1-0/+11
call_nt_transact_notify_change() is now sync if there are changes around. A notify_message does a direct reply from within the message, so process_pending_change_notify_queue is not needed anymore for samba-generated events. Next step is to restructure the kernel-mechanisms to generate messages. Volker (This used to be commit c813f71d0036ec52c99a97e60fe33ee47d0635fa)
2007-10-10r20394: This is a *VERY* early start of my work on notify.Volker Lendecke1-4/+3
Checking in because Jeremy was bugging me. Potentially this becomes quite intrusive, I'm not sure if I should open a temporary branch for this. Jeremy, Jerry, do you think 3_0 is the right place for this? Volker (This used to be commit bcf5c751cbe203c00814642e26440cf88f300bce)
2007-10-10r20372: Make NTrename the same as SMBmv w.r.t. wildcards.Jeremy Allison1-6/+12
Jeremy. (This used to be commit b8d5faac69f3a0c2620a34f9026b4018ebd48bb8)
2007-10-10r20363: Fix any possible valgrind errors in srvstr_get_XX or srvstr_pull_XXJeremy Allison1-2/+2
by ensuring we pass in a valid src_len (or zero when appropriate). Volker is correct in that this is a *horrible* interface and he is now free to generally clean it up everywhere :-). Go for it Volker ! Jeremy. (This used to be commit cd991fb839994dd29dc790b655f5597fa1e12843)
2007-10-10r20356: Consolidate the calls to parent_dirname() per open to one.Volker Lendecke1-1/+2
This involved passing the dirname as argument to a few routines instead of calling parent_dirname() deep down. Volker (This used to be commit 7977fd78652897bb7d4db1c21c5749043428f911)
2007-10-10r20345: Simplify call_nt_transact_create by using tmp_talloc_ctx()Volker Lendecke1-14/+2
(This used to be commit df6362baa0928616c6934950fb9c1264cb27106e)
2007-10-10r20338: Restructure open_directory a bit. This gets rid of a race condition ↵Volker Lendecke1-0/+8
regarding error messages: We relied upon a stat that a directory did not exist to later on then do the mkdir or not. This does the mkdir directly and copes with a potential error. The second one is more important: It's possible with Samba 3 to do a ntcreate&x with NTCREATEX_OPTIONS_DIRECTORY and we happily do a NT_STATUS_OK. Also move up the use_nt_status() logic a bit. I think this does not belong into the core routines, the smb server as such should take care of it. Jeremy, do you think this should go to 3.0.24? I'll update samba4torture when the build farm has picked up this checkin. Volker (This used to be commit 472fb11f4968d30cedc9851215c63acd3132f3db)
2007-10-10r20335: Port oplock return logic from ntcreate&x to NT_TRANSACT_CREATE. ↵Volker Lendecke1-2/+6
Fixes parts of raw-open. Volker (This used to be commit e4e766c092e19f78a593c08f22ea1d7521be18e7)
2007-10-10r20237: Replace exit_server with exit_server_cleanly where appropriate. AllJames Peach1-2/+2
send_smb failures should be clean exits. All times when we exit as a matter of policy should also be clean exits. (This used to be commit d6382092e72120a3c89ffe81975e8898d454bf06)