1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

lib: Remove per-user support from append_to_namearray

This is done in check_user_ok now

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15688
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Volker Lendecke 2024-07-30 13:30:21 +02:00 committed by Stefan Metzmacher
parent b5a128685e
commit b5169dd717

View File

@ -210,7 +210,6 @@ bool append_to_namearray(TALLOC_CTX *mem_ctx,
size_t len;
char *namelist = NULL;
const char *p = NULL;
bool ok;
if ((namelist_in == NULL) || (namelist_in[0] == '\0')) {
return true;
@ -238,44 +237,6 @@ bool append_to_namearray(TALLOC_CTX *mem_ctx,
continue;
}
if (ISDOTDOT(p) && token != NULL) {
const char *username = NULL;
bool match;
/* Get the username */
p = strv_next(namelist, p);
if (p == NULL) {
DBG_ERR("Missing username\n");
TALLOC_FREE(namelist);
return false;
}
username = p;
/* Get the filename */
p = strv_next(namelist, p);
if (p == NULL) {
DBG_ERR("Missing filename after username '%s'\n",
username);
TALLOC_FREE(namelist);
return false;
}
ok = token_contains_name(talloc_tos(),
NULL,
NULL,
NULL,
token,
username,
&match);
if (!ok) {
TALLOC_FREE(namelist);
return false;
}
if (!match) {
continue;
}
}
tmp = talloc_realloc(mem_ctx,
name_array,
struct name_compare_entry,