]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Remove a few "extern userdom_struct current_user_info"
authorVolker Lendecke <vl@samba.org>
Wed, 30 Nov 2022 17:47:21 +0000 (18:47 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 12 Dec 2022 22:14:20 +0000 (22:14 +0000)
get_current_username() returns current_user_info.smb_name

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Dec 12 22:14:20 UTC 2022 on sn-devel-184

source3/modules/vfs_virusfilter_common.h
source3/param/loadparm.c
source3/rpc_server/netlogon/srv_netlog_nt.c
source3/smbd/smb1_message.c

index 463a9d74e9cf784e3a2ee38172cc6bb4ca6f4ff7..24359bf5a3a0b53e113c835269552c0498dc18fd 100644 (file)
@@ -39,9 +39,6 @@
 #define DBGC_CLASS virusfilter_debug_class
 extern int virusfilter_debug_class;
 
-/* Samba's global variable */
-extern userdom_struct current_user_info;
-
 #define VIRUSFILTER_VERSION "0.1.5"
 
 /* ====================================================================== */
index f5ff1989998267371db4e5b6c4d8c654eb0c2b1e..3429ecbe5e48b5071b58a6f4cb22f98f2e9e82a1 100644 (file)
@@ -85,8 +85,6 @@
 
 bool bLoaded = false;
 
-extern userdom_struct current_user_info;
-
 /* the special value for the include parameter
  * to be interpreted not as a file name but to
  * trigger loading of the global smb.conf options
index cc92c84cc0795d15dd1b3c1c581bd295b5d7173c..ba169fbbe52684582a18d827e5808e475747f4bb 100644 (file)
@@ -52,8 +52,6 @@
 #include "lib/util/util_str_escape.h"
 #include "source3/lib/substitute.h"
 
-extern userdom_struct current_user_info;
-
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_RPC_SRV
 
index 7d89cc45158552264b40a1eaa2d3765e0e8c8aa8..928be77f8542c9c25a134be87ac61daa7eeac4c0 100644 (file)
@@ -29,8 +29,6 @@
 #include "smbprofile.h"
 #include "source3/lib/substitute.h"
 
-extern userdom_struct current_user_info;
-
 struct msg_state {
        char *from;
        char *to;
@@ -122,7 +120,7 @@ static void msg_deliver(struct msg_state *state)
                goto done;
        }
 
-       s = talloc_sub_basic(talloc_tos(), current_user_info.smb_name,
+       s = talloc_sub_basic(talloc_tos(), get_current_username(),
                             get_current_user_info_domain(), s);
        if (s == NULL) {
                goto done;