mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3:smbd: Move lp_posix_pathnames() out of ea_list_has_invalid_name().
External uses will be replaced by checks on struct smb_filename flags. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
This commit is contained in:
parent
feb297ca73
commit
09325a0ea6
@ -267,10 +267,6 @@ bool is_invalid_windows_ea_name(const char *name)
|
||||
|
||||
bool ea_list_has_invalid_name(struct ea_list *ea_list)
|
||||
{
|
||||
if (lp_posix_pathnames()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (;ea_list; ea_list = ea_list->next) {
|
||||
if (is_invalid_windows_ea_name(ea_list->ea.name)) {
|
||||
return true;
|
||||
|
@ -1178,7 +1178,8 @@ static void call_nt_transact_create(connection_struct *conn,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (ea_list_has_invalid_name(ea_list)) {
|
||||
if (!lp_posix_pathnames() &&
|
||||
ea_list_has_invalid_name(ea_list)) {
|
||||
/* Realloc the size of parameters and data we will return */
|
||||
if (flags & EXTENDED_RESPONSE_REQUIRED) {
|
||||
/* Extended response is 32 more byyes. */
|
||||
|
@ -716,7 +716,8 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
|
||||
return tevent_req_post(req, ev);
|
||||
}
|
||||
|
||||
if (ea_list_has_invalid_name(ea_list)) {
|
||||
if (!lp_posix_pathnames() &&
|
||||
ea_list_has_invalid_name(ea_list)) {
|
||||
tevent_req_nterror(req, STATUS_INVALID_EA_NAME);
|
||||
return tevent_req_post(req, ev);
|
||||
}
|
||||
|
@ -717,7 +717,7 @@ NTSTATUS set_ea(connection_struct *conn, files_struct *fsp,
|
||||
* we set *any* of them.
|
||||
*/
|
||||
|
||||
if (ea_list_has_invalid_name(ea_list)) {
|
||||
if (!lp_posix_pathnames() && ea_list_has_invalid_name(ea_list)) {
|
||||
return STATUS_INVALID_EA_NAME;
|
||||
}
|
||||
|
||||
@ -1297,7 +1297,8 @@ static void call_trans2open(connection_struct *conn,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (ea_list_has_invalid_name(ea_list)) {
|
||||
if (!lp_posix_pathnames() &&
|
||||
ea_list_has_invalid_name(ea_list)) {
|
||||
int param_len = 30;
|
||||
*pparams = (char *)SMB_REALLOC(*pparams, param_len);
|
||||
if(*pparams == NULL ) {
|
||||
|
Loading…
Reference in New Issue
Block a user