1
0
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:
Jeremy Allison 2016-03-15 11:43:32 -07:00
parent feb297ca73
commit 09325a0ea6
4 changed files with 7 additions and 8 deletions

View File

@ -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;

View File

@ -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. */

View File

@ -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);
}

View File

@ -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 ) {