Age | Commit message (Collapse) | Author | Files | Lines |
|
domain when krb5 auth is enabled
Signed-off-by: Bo Yang <boyang@samba.org>
|
|
Signed-off-by: Bo Yang <boyang@samba.org>
|
|
Jeremy.
|
|
This is the first of a series of patches that change path based
operations to operate on a struct smb_filename instead of a char *.
This same concept already exists in source4.
My goals for this series of patches are to eventually:
1) Solve the stream vs. posix filename that contains a colon ambiguity
that currently exists.
2) Make unix_convert the only function that parses the stream name.
3) Clean up the unix_convert API.
4) Change all path based vfs operation to take a struct smb_filename.
5) Make is_ntfs_stream_name() a constant operation that can simply
check the state of struct smb_filename rather than re-parse the
filename.
6) Eliminate the need for split_ntfs_stream_name() to exist.
My strategy is to start from the inside at unix_convert() and work my
way out through the vfs layer, call by call. This first patch does
just that, by changing unix_convert and all of its callers to operate
on struct smb_filename. Since this is such a large change, I plan on
pushing the patches in phases, where each phase keeps full
compatibility and passes make test.
The API of unix_convert has been simplified from:
NTSTATUS unix_convert(TALLOC_CTX *ctx,
connection_struct *conn,
const char *orig_path,
bool allow_wcard_last_component,
char **pp_conv_path,
char **pp_saved_last_component,
SMB_STRUCT_STAT *pst)
to:
NTSTATUS unix_convert(TALLOC_CTX *ctx,
connection_struct *conn,
const char *orig_path,
struct smb_filename *smb_fname,
uint32_t ucf_flags)
Currently the smb_filename struct looks like:
struct smb_filename {
char *base_name;
char *stream_name;
char *original_lcomp;
SMB_STRUCT_STAT st;
};
One key point here is the decision to break up the base_name and
stream_name. I have introduced a helper function called
get_full_smb_filename() that takes an smb_filename struct and
allocates the full_name. I changed the callers of unix_convert() to
subsequently call get_full_smb_filename() for the time being, but I
plan to eventually eliminate get_full_smb_filename().
|
|
metze
|
|
metze
|
|
metze
|
|
metze
|
|
Some times we have to return a non-error response
with status != NT_STATUS_OK.
metze
|
|
MESSAGE_ID and SESSION_ID are both 64bit.
metze
|
|
the MS-LSA docs.
Jeremy.
|
|
metze
|
|
metze
|
|
metze
|
|
Thanks Michael to provide some transparency :-)
|
|
metze
|
|
We create a dummy SMB2 Negotiate inbuf and pass the
connection to the SMB2 engine.
metze
|
|
This is not complete, but a start that makes the
samba4 smb2 client happy.
metze
|
|
metze
|
|
This is disabled by default and activated by
"max protocol = SMB2".
metze
|
|
metze
|
|
metze
|
|
We have to drop the gpfs level share modes, regardless of whether we put
the file into the pending close queue.
|
|
Another one of those where you stare at logfiles for hours, and when you found
it, it's absolutely obvious what is happening...
|
|
RPC-SAMR-USERS-PRIVILEGES test.
Guenther
|
|
This change brings ntvfs_connect into compliance with other ntvfs functions
which take an ntvfs module, an ntvfs request and an smb io union.
It now becomes the responsibility of ntvfs modules to examine
tcon->generic.level themselves and derive the share name and any other
options
directly; e.g.
const char *sharename;
switch (tcon->generic.level) {
case RAW_TCON_TCON:
sharename = tcon->tcon.in.service;
break;
case RAW_TCON_TCONX:
sharename = tcon->tconx.in.path;
break;
case RAW_TCON_SMB2:
default:
return NT_STATUS_INVALID_LEVEL;
}
if (strncmp(sharename, "\\\\", 2) == 0) {
char *p = strchr(sharename+2, '\\');
if (p) {
sharename = p + 1;
}
}
service.c smbsrv_tcon_backend() is called before ntvfs_connect and fills in
some of the tcon->..out values.
For the case of RAW_TCON_TCONX, it filles out tcon->tconx.out.tid and
tcon->tconx.out.options
For the case of RAW_TCON_TCON it fills out tcon->tcon.out.tid and
tcon->tcon.out.max_xmit
Thus the ntvfs_connect function for vfs modules may override these values
if desired, but are not required to.
ntvfs_connect functions are required to fill in the tcon->tconx.out.*_type
fields, for RAW_TCON_TCONX, perhaps something like:
if (tcon->generic.level == RAW_TCON_TCONX) {
tcon->tconx.out.fs_type = ntvfs->ctx->fs_type;
tcon->tconx.out.dev_type = ntvfs->ctx->dev_type;
}
Signed-off-by: Sam Liddicott <sam@liddicott.com>
(I fixed the ntvfs_connect() in the smb_server/smb2/
and the RAW_TCON_SMB2 switch case in the modules)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
Guenther
|
|
Guenther
|
|
Guenther
|
|
Stop packet_recv getting greedy and reading the whole socket
and then dispatching te extra packets in a timer loop
Signed-off-by: Sam Liddicott <sam@liddicott.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
metze
|
|
Jelmer, you might want to take a look at Andrew B's problem with
--enable-developer --disable-shared --disable-shared-libs
|
|
|
|
tevent_add_fd does not properly set that. At least in epoll and select this is
the only error condition.
Metze, please check!
|
|
Jeremy.
|
|
Remove two indentation levels by returning early on error.
Metze, please check!
|
|
targets
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Tim Prouty <tprouty@samba.org>
|
|
|
|
This fixes bug #5897. Thanks to TAKAHASHI Motonobu
<monyo [at] samba.gr.jp> for reporting and providing the example!
Karolin
|
|
This is a follow up to 69d61453df6019caef4e7960fa78c6a3c51f3d2a to
adjust the API to allow the lower layers allocate memory. Now the
memory can explicitly be freed rather than relying on talloc_tos().
Signed-off-by: Tim Prouty <tprouty@samba.org>
|
|
|
|
These were found interally via code inspection.
1) fake_sendfile was incorrectly writing zeros over real data on a
short read.
2) sendfile_short_send was doing 4 byte writes instead of 1024 byte
writes due to an incorrect sizeof usage.
Jermey, Vl please check
|
|
Guenther
|
|
Guenther
|