]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Remove per-user support from append_to_namearray
authorVolker Lendecke <vl@samba.org>
Tue, 30 Jul 2024 11:30:21 +0000 (13:30 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 31 Jul 2024 08:39:29 +0000 (08:39 +0000)
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>
source3/lib/util_namearray.c

index 707ab235b85e7e23281f54e6c7916f8fdb4c056e..4bd82b6c6261bf8feca3792e4858c7a6a1273179 100644 (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,