mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
smbd: pass get_dosmode to mode_fn in smbd_dirptr_get_entry()
This finally uses "get_dosmode" as passed in from the SMB2 layer, but all callers still pass true, so no change in behaviour. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
2a2294bbdf
commit
8954085ad7
@ -1096,6 +1096,7 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
|
||||
bool (*mode_fn)(TALLOC_CTX *ctx,
|
||||
void *private_data,
|
||||
struct smb_filename *smb_fname,
|
||||
bool get_dosmode,
|
||||
uint32_t *_mode),
|
||||
void *private_data,
|
||||
char **_fname,
|
||||
@ -1190,7 +1191,7 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
|
||||
.base_name = pathreal, .st = sbuf
|
||||
};
|
||||
|
||||
ok = mode_fn(ctx, private_data, &smb_fname, &mode);
|
||||
ok = mode_fn(ctx, private_data, &smb_fname, get_dosmode, &mode);
|
||||
if (!ok) {
|
||||
TALLOC_FREE(dname);
|
||||
TALLOC_FREE(fname);
|
||||
@ -1319,6 +1320,7 @@ static bool smbd_dirptr_8_3_match_fn(TALLOC_CTX *ctx,
|
||||
static bool smbd_dirptr_8_3_mode_fn(TALLOC_CTX *ctx,
|
||||
void *private_data,
|
||||
struct smb_filename *smb_fname,
|
||||
bool get_dosmode,
|
||||
uint32_t *_mode)
|
||||
{
|
||||
connection_struct *conn = (connection_struct *)private_data;
|
||||
|
@ -185,6 +185,7 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
|
||||
bool (*mode_fn)(TALLOC_CTX *ctx,
|
||||
void *private_data,
|
||||
struct smb_filename *smb_fname,
|
||||
bool get_dosmode,
|
||||
uint32_t *_mode),
|
||||
void *private_data,
|
||||
char **_fname,
|
||||
|
@ -1708,6 +1708,7 @@ static bool smbd_dirptr_lanman2_match_fn(TALLOC_CTX *ctx,
|
||||
static bool smbd_dirptr_lanman2_mode_fn(TALLOC_CTX *ctx,
|
||||
void *private_data,
|
||||
struct smb_filename *smb_fname,
|
||||
bool get_dosmode,
|
||||
uint32_t *_mode)
|
||||
{
|
||||
struct smbd_dirptr_lanman2_state *state =
|
||||
@ -1741,7 +1742,7 @@ static bool smbd_dirptr_lanman2_mode_fn(TALLOC_CTX *ctx,
|
||||
|
||||
if (ms_dfs_link) {
|
||||
mode = dos_mode_msdfs(state->conn, smb_fname);
|
||||
} else {
|
||||
} else if (get_dosmode) {
|
||||
mode = dos_mode(state->conn, smb_fname);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user