| 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.
|
|
|
|
|
| |
to ERRDOS, ERRfilexists for NTCreateX and NTTransCreate.
Jeremy.
|
|
|
|
|
| |
max_param or return NT_STATUS_OK.
Jeremy.
|
| |
|
| |
|
|
|
|
|
|
|
| |
"Get rid of the three global variables for the case semantics. I think
this is really not worth globals."
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.
|
|
|
|
|
| |
we'll check it.
Jeremy.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
|
|
|
|
|
|
| |
request. Ignore it. Should fix bug #4689 but more tests and
valgrinding will follow.
Jeremy.
|
|
|
|
|
|
| |
in storing the access mask. I shouldn't have made this
mistake. Damn. Fixes bug #4673.
Jeremy
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
calls. No functional changes. Looks bigger than it is :-).
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
| |
and files (tested with Win32 code). Bug #4404 should
now be dead :-).
Jeremy.
|
|
|
|
|
| |
set. Only the NTTrans create left to fix for csc.
Jeremy.
|
|
|
|
|
|
| |
the wire. Strange.... But now we're returning Windows compatible
extended info. Next to fix the pipe returns and NTTrans Creates.
Jeremy.
|
|
|
|
|
|
|
| |
response to NTCreateX - need to fix this also for
pipe open and NTTransCreate as well so this isn't
finished.
Jeremy.
|
|
|
|
|
|
|
|
|
| |
and then not merging PIDL to SAMBA_3_0_25.
* Rework parsing for NetFileEnum() and NetSessionEnum()
* Add server stub for NetFileClose()
* Return correct information for sessions and open files
including session duration, number of open files, and open pipes.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
the RESOLVE_DFSPATH macros and their varients
any more. Fix reporting profile bug with all
error returns.
Jeremy.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
of SEC_DESC over from grp_owner -> group_owner,
ace -> aces and info.mask -> mask. Makes it *much*
easier to move code within branches as they're now
referring to the same names for the same things
(which is what the NDR code also uses).
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
| |
It does not matter if I screw up 3.0.25 or 3.0.26 with this, so do it rather
sooner than later.
Add the notify support that already exists in 3_0 to 3_0_25. If you want to
see this patch dissected into digestable parts, look at 3_0, revisions at
about 20800 and following.
Volker
|
|
|
|
| |
Jeremy.
|
| |
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
correctly handling deferred opens.
Jeremy.
|
|
|
|
|
|
| |
create disposition of FILE_CREATE then there's no need
to check can_delete_file_in_directory().
Jeremy.
|
|
|
|
|
| |
copy now returns NTSTATUS, part of close does the same.
Jeremy.
|
|
|
|
|
| |
modified gentest to 1000 iterations.
Jeremy.
|
|
|
|
|
|
|
|
|
|
| |
handling. Gets rid of more code than it adds.
I will port this to SAMBA_3_0 next. There are
still some wrinkles with wildcard delete I am
working on - for example a dirtype pattern of
0x8aa4 isn't handled correctly yet.... still
looking at this.
Jeremy.
|