]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Remove "token" parameter from set_namearray
authorVolker Lendecke <vl@samba.org>
Tue, 30 Jul 2024 11:55:57 +0000 (13:55 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 31 Jul 2024 08:39:29 +0000 (08:39 +0000)
Not needed anymore

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/include/proto.h
source3/lib/util_namearray.c
source3/modules/vfs_virusfilter.c
source3/smbd/smb2_service.c
source3/smbd/uid.c
source3/torture/test_matching.c

index d7e074b7899c44a25102311c3178ae78df8c1589..f398106e5a2f4eb24a2a588b5105b0c020505772 100644 (file)
@@ -328,11 +328,9 @@ bool token_contains_name(TALLOC_CTX *mem_ctx,
                         bool *match);
 bool append_to_namearray(TALLOC_CTX *mem_ctx,
                         const char *namelist_in,
-                        const struct security_token *token,
                         struct name_compare_entry **_name_array);
 bool set_namearray(TALLOC_CTX *mem_ctx,
                   const char *namelist,
-                  const struct security_token *token,
                   struct name_compare_entry **_name_array);
 bool fcntl_lock(int fd, int op, off_t offset, off_t count, int type);
 bool fcntl_getlock(int fd, int op, off_t *poffset, off_t *pcount, int *ptype, pid_t *ppid);
index 4bd82b6c6261bf8feca3792e4858c7a6a1273179..1c5b4ac6a0eb495046660739358825dd0ee7a9a2 100644 (file)
@@ -203,7 +203,6 @@ static size_t namearray_len(const struct name_compare_entry *array)
 
 bool append_to_namearray(TALLOC_CTX *mem_ctx,
                         const char *namelist_in,
-                        const struct security_token *token,
                         struct name_compare_entry **_name_array)
 {
        struct name_compare_entry *name_array = *_name_array;
@@ -260,13 +259,12 @@ bool append_to_namearray(TALLOC_CTX *mem_ctx,
 
 bool set_namearray(TALLOC_CTX *mem_ctx,
                   const char *namelist_in,
-                  const struct security_token *token,
                   struct name_compare_entry **_name_array)
 {
        bool ret;
 
        *_name_array = NULL;
 
-       ret = append_to_namearray(mem_ctx, namelist_in, token, _name_array);
+       ret = append_to_namearray(mem_ctx, namelist_in, _name_array);
        return ret;
 }
index 6d4a6fdb98c1e8f23ae6780b84f29b0b679407a0..b566b628ed2fe4e5be90077a4dd7575b77a4bc69 100644 (file)
@@ -258,7 +258,6 @@ static int virusfilter_vfs_connect(
        if (exclude_files != NULL) {
                ok = set_namearray(config,
                                   exclude_files,
-                                  NULL,
                                   &config->exclude_files);
                if (!ok) {
                        DBG_ERR("set_namearray failed\n");
@@ -271,7 +270,6 @@ static int virusfilter_vfs_connect(
        if (infected_files != NULL) {
                ok = set_namearray(config,
                                   infected_files,
-                                  NULL,
                                   &config->infected_files);
                if (!ok) {
                        DBG_ERR("set_namearray failed\n");
index 06c20c167498d20f6d4673d11978eae9e22ec545..b6e8ca54e8598440082e0d522c58b7c179fc3fd9 100644 (file)
@@ -755,7 +755,6 @@ NTSTATUS make_connection_snum(struct smbXsrv_connection *xconn,
        if (!IS_IPC(conn) && !IS_PRINT(conn)) {
                ok = set_namearray(conn,
                                   lp_veto_oplock_files(talloc_tos(), lp_sub, snum),
-                                  NULL,
                                   &conn->veto_oplock_list);
                if (!ok) {
                        status = NT_STATUS_NO_MEMORY;
@@ -763,7 +762,6 @@ NTSTATUS make_connection_snum(struct smbXsrv_connection *xconn,
                }
                ok = set_namearray(conn,
                                   lp_aio_write_behind(talloc_tos(), lp_sub, snum),
-                                  NULL,
                                   &conn->aio_write_behind_list);
                if (!ok) {
                        status = NT_STATUS_NO_MEMORY;
index e0e448e3bea9ed6c78c109f4c7dee8fde7975ca5..2f390651a0ef5fe5ff8569dd81a182c374e87822 100644 (file)
@@ -241,7 +241,6 @@ static bool scan_file_list_cb(const char *string,
 
                ok = append_to_namearray(state->mem_ctx,
                                         files,
-                                        NULL,
                                         state->list);
                if (!ok) {
                        goto fail;
@@ -371,7 +370,6 @@ static bool check_user_ok(connection_struct *conn,
 
                ok = set_namearray(conn,
                                   lp_veto_files(talloc_tos(), lp_sub, snum),
-                                  session_info->security_token,
                                   &ent->veto_list);
                if (!ok) {
                        return false;
@@ -405,7 +403,6 @@ static bool check_user_ok(connection_struct *conn,
 
                ok = set_namearray(conn,
                                   lp_hide_files(talloc_tos(), lp_sub, snum),
-                                  session_info->security_token,
                                   &ent->hide_list);
                if (!ok) {
                        return false;
index 8ee06e858770f694b0ff15cc9c701fe77fe96076..78ecadef2980995cbb884c32f4e0343e83150178 100644 (file)
@@ -66,7 +66,7 @@ bool run_str_match_mswild(int dummy)
 
        d_fprintf(stderr, "namelist: %s\n", namelist);
 
-       ret = set_namearray(talloc_tos(), namelist, NULL, &name_entries);
+       ret = set_namearray(talloc_tos(), namelist, &name_entries);
        SMB_ASSERT(ret && name_entries != NULL);
 
        status = samba_path_matching_mswild_create(talloc_tos(),