Age | Commit message (Collapse) | Author | Files | Lines |
|
This removes file_id_string_static and file_id_string_static2
(This used to be commit 638c848c9afe374feb30e34c494f89b2a6c64f7b)
|
|
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
(This used to be commit 6585ea2cb7f417e14540495b9c7380fe9c8c717b)
|
|
(This used to be commit 17df313db42199e26d7d2044f6a1d845aacd1a90)
|
|
it's needed for some cluster filesystems to
overload this function.
metze
(This used to be commit cdaa24e8047399002e4b287a31a8340a665e580f)
|
|
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
|
|
Jeremy.
(This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
|
|
Jeremy, next one to review :-)
(This used to be commit a50555dda7db5e848e337185ed91c41c2557f7be)
|
|
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.
Jeremy, I'm only checking this into 3_0, please review before I merge it
to _26.
Volker
(This used to be commit ca988f4e79e977160d82e86486972afd15d4acf5)
|
|
(This used to be commit c592b562fa793c9fb3bd0d84074d4ffaa8f63b64)
|
|
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)
|
|
"file existed" case above. This has no functional
change but is easier to see that it's doing the
same thing.
Jeremy.
(This used to be commit 0a7d8362be8379b77e6afb803ab88d726ae7877d)
|
|
file was being created and we go into the race condition check,
we were testing for compatible open modes, but were not breaking
oplocks in the same way as if the file existed. This meant that
we weren't going into the code path that sets fsp->oplock = FAKE_LEVEL_II_OPLOCK
if the client didn't ask for an oplock on file create. We need
to do this as internally it's what Windows does.
Jeremy.
(This used to be commit 9b9513856e9e9f84d5acd94e3e3d6e73358ee7dc)
|
|
in Samba4 smbtorture. Fix rename on an open file handle.
Needed for 3.0.25a.
Jeremy.
(This used to be commit a301467d5f645dada27093ddfd74890b88bb4ce8)
|
|
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.
(This used to be commit f546750176a22cdd7298a73afc81587923baaff9)
|
|
(This used to be commit 65335a420645202fc79c599a1177838ec19a4075)
|
|
tomorrow.
(This used to be commit 74fa57ca5d7fa8eace72bbe948a08a0bca3cc4ca)
|
|
patch.
This changes "struct process_id" to "struct server_id", keeping both is
just too much hassle. No functional change (I hope ;-))
Volker
(This used to be commit 0ad4b1226c9d91b72136310d3bbb640d2c5d67b8)
|
|
Jeremy.
(This used to be commit fe00771df517071c5e654e0b2b9cfde2d88bd701)
|
|
errno into an NTSTATUS immediately.
Jeremy.
(This used to be commit 71dd02cc164197152e76d8141f906390c4bd1526)
|
|
It should probably better be integrated with our write cache.
Volker
(This used to be commit 58bfd168b046a97a895aaa3384fd7af8d077a1d5)
|
|
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)
|
|
crashed. So
it needs the specific error message.
Make messages.c return NTSTATUS and specificially NT_STATUS_INVALID_HANDLE if
sending to a non-existent process.
Volker
(This used to be commit 3f620d181da0c356c8ffbdb5b380ccab3645a972)
|
|
checkin, I'm
working on that right now.
Volker
(This used to be commit 01c9fb17281e99300b339d2cfc0acac7ca94843c)
|
|
(This used to be commit defa28f9c3eda85a072b972fffd2d5de8bcf01f7)
|
|
void message_register(int msg_type,
void (*fn)(int msg_type, struct process_id pid,
- void *buf, size_t len))
+ void *buf, size_t len,
+ void *private_data),
+ void *private_data)
{
struct dispatch_fns *dfn;
So this adds a (so far unused) private pointer that is passed from
message_register to the message handler. A prerequisite to implement a tiny
samba4-API compatible wrapper around our messaging system. That itself is
necessary for the Samba4 notify system.
Yes, I know, I could import the whole Samba4 messaging system, but I want to
do it step by step and I think getting notify in is more important in this
step.
Volker
(This used to be commit c8ae60ed65dcce9660ee39c75488f2838cf9a28b)
|
|
works - even with the strange "initial delete on close"
semantics. The "initial delete on close" flag isn't
committed to the share mode db until the handle is
closed, and is discarded if any real "delete on close"
was set. This allows me to remove the "initial_delete_on_close"
flag from the share db, and move it into a BOOL in files_struct.
Warning ! You must do a make clean after this. Cope with
the wrinkle in directory delete on close which is done
differently from files. We now pass all Samba4 smbtortute
BASE-DELETE tests except for the one checking that files
can't be created in a directory which has the delete on
close set (possibly expensive to fix).
Jeremy.
(This used to be commit f2df77a1497958c1ea791f1d2f4446b5fc3389b3)
|
|
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)
|
|
make sense
again :-)
Volker
(This used to be commit 5533cdeec1b0cdee39b1d89e2320587dc9281ee6)
|
|
previous commit :-(.
Jeremy.
(This used to be commit 8fe3829e8a884ce2ddb91121d46b7a3a385874c1)
|
|
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)
|
|
Add lots of TODOs :-)
Volker
(This used to be commit 0e953884a15873b0962ab1ab064d6b3a436726c0)
|
|
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)
|
|
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)
|
|
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)
|
|
together.
Jeremy, I'm 100% sure you watch me closely here, I count on you :-)
Volker
(This used to be commit 02f85265f21607c950639da33bc8fe5d5ffd3cf9)
|
|
name-based (for
directory opens) routines.
Volker
(This used to be commit 4ca921d9aa90bc68d21d40ccf4b1ca0b1d2cbcb1)
|
|
open_directory
we want to follow symlinks.
Volker
(This used to be commit c20bdd219d16abcc60d67f4a21b4fcd661473835)
|
|
(This used to be commit cce911780fc52ea56dccde1879b0891cdf9ea320)
|
|
(This used to be commit 6dd0886b49969d0edfe16861f19d35275217b2af)
|
|
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)
|
|
(This used to be commit 4090bc4bca77edafcafa52ecb7dc75ead2779cb5)
|
|
change_owner_to_parent
a bit closer together: Move the lp_inherit_perms() check into the callers.
Volker
(This used to be commit 0874093e5fff480d8ec442072318525079add633)
|
|
on write-only files. Jim please check. Should not affect
Windows clients - I ensured all the relevent Samba4
torture tests still pass.
Jeremy.
(This used to be commit 6df3cac44fb1eafa84f9fc0ce4485242b4cce111)
|
|
the vfs layer, since gpfs supports it. Thanks to Volker, Christian,
Mathias, Chetan, and Peter.
(This used to be commit 0620658890fa9c68a9848538728023192319c81a)
|
|
(This used to be commit 6bc2cce645af94274a5959312c52799c221b0899)
|
|
and server code.
This has had some basic testing. I'll do more during the next couple of days and hopefully also
make RPC-SRVSVC from Samba4 pass against it.
(This used to be commit ef10672399c4b82700dc431b4d93431ffdd42d98)
|
|
value into an auto on the stack that gets removed when
we return from the frame :-).
Jeremy.
(This used to be commit 85bf8a16116e5eb9d4400e809531737d45890abb)
|
|
fix the messaging code to call the efficient calls :
save_re_uid()
set_effective_uid(0);
messaging_op
restore_re_uid();
instead of using heavyweight become_root()/unbecome_root()
pairs around all messaging code. Fixup the messaging
code to ensure sec_init() is called (only once) so that non-root
processes still work when sending messages.
This is a lighter weight solution to become_root()/unbecome_root()
(which swaps all the supplemental groups) and should be more
efficient. I will migrate all server code over to using this
(a similar technique should be used in the passdb backend
where needed).
Jeremy.
(This used to be commit 4ace291278d9a44f5c577bdd3b282c1231e543df)
|
|
Jeremy, I'm sure you will look at this nevertheless :-)
Volker
(This used to be commit 3ef34468b55771b6f6b54454fa6c9decc183c565)
|
|
in one place.
Jeremy.
(This used to be commit f326bae3e269046b6f087626240cddbb5dafb0e4)
|