s3:smbd: move more session specific globals to struct smbd_server_connection
[samba.git] / source3 / smbd / share_access.c
index c72251b5a7761367b4f1cf8a726ca5741b2ca6cc..5d779b9c8115878382f13cb57586fc3d2db5e71f 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include "includes.h"
+#include "smbd/globals.h"
 
 /*
  * No prefix means direct username
@@ -72,6 +73,7 @@ static bool token_contains_name(TALLOC_CTX *mem_ctx,
        const char *prefix;
        DOM_SID sid;
        enum lsa_SidType type;
+       struct smbd_server_connection *sconn = smbd_server_conn;
 
        if (username != NULL) {
                name = talloc_sub_basic(mem_ctx, username, domain, name);
@@ -128,7 +130,7 @@ static bool token_contains_name(TALLOC_CTX *mem_ctx,
                        continue;
                }
                if (*prefix == '&') {
-                       if (user_in_netgroup(username, name)) {
+                       if (user_in_netgroup(sconn, username, name)) {
                                return True;
                        }
                        continue;