| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Jeremy, please check ;-)
|
| |
|
|
|
|
|
| |
This was broken when I changed reply_mv to wrap in a open_file_ntcreate
call, unix_convert on the destination was called twice
|
|
|
|
| |
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
| |
to DOS error ERRDOS, ERRfilexists on open calls.
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
| |
to DOS error ERRDOS, ERRfilexists on open calls.
Jeremy.
|
|
|
|
|
|
|
|
|
| |
add a file_id_create() hook into the VFS layer
it's needed for some cluster filesystems to
overload this function.
metze
|
|
|
|
|
|
| |
invalid names sent as a resume name were incorrectly mapped into
. and .. Ensure they really *are . and ..
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
checker.
|
|
|
|
|
| |
as a write does. Fix bug #4779.
Jeremy.
|
| |
|
|
|
|
| |
Jeremy.
|
|
|
|
|
| |
The function name reduce_name is misleading, making the user believe it
changes an argument.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
With the target being open we have to return NT_STATUS_ACCESS_DENIED and
root_fid != 0 leads to NT_STATUS_INVALID_PARAMETER
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
| |
in Samba4 smbtorture. Fix rename on an open file handle.
Needed for 3.0.25a.
Jeremy.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
with the Apple guys and Linux kernel guys. Still looking
at how to do writeX as there's no recvfile().
Jeremy.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
calls. No functional changes. Looks bigger than it is :-).
Jeremy.
|
|
|
|
|
| |
Found by SteveF + valgrind :-). Jerry - essential for rc3.
Jeremy.
|
|
|
|
|
|
|
| |
Ensure we correctly NULL out allocation size fields. Allow
QFILEINFO on pipes (Vista bug ?). Jerry - don't automatically
merge for 3.0.25.
Jeremy.
|
|
|
|
|
| |
32 unicode chars. Windows XP doesn't like that :-).
Jeremy
|
|
|
|
|
|
|
|
| |
"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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Missing break statements meant that no info
levels would ever be returned correctly from
POSIX open/mkdir.
Jeremy.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Bad cut-n-paste on rewrite of timestamps.
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
SAMBA_3_0 revisions:
r21756:21757
r21761:21762
r21762:21763
r21764:21767
|
|
|
|
|
|
|
| |
mode_t in posix_open/posix_mkdir -> 8 bytes to match
the SET_UNIX_INFO_BASIC call. Steve is updating the
Wikki.
Jeremy.
|
|
|
|
|
|
|
| |
the RESOLVE_DFSPATH macros and their varients
any more. Fix reporting profile bug with all
error returns.
Jeremy.
|
|
|
|
| |
info level on QueryFsInfo.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
| |
Add proper debug to all possible setfilepathinfo
functions.
Jeremy.
|