mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
s3: Remove the smbd_server_conn ref from create_conn_struct
This commit is contained in:
parent
649437af3d
commit
425b93ef69
@ -29,6 +29,7 @@
|
||||
#include "../libcli/security/security.h"
|
||||
#include "passdb/machine_sid.h"
|
||||
#include "smbd/smbd.h"
|
||||
#include "smbd/globals.h"
|
||||
#include "auth.h"
|
||||
#include "messages.h"
|
||||
#include "rpc_server/spoolss/srv_spoolss_nt.h"
|
||||
@ -615,7 +616,8 @@ static uint32 get_correct_cversion(struct auth_session_info *session_info,
|
||||
return -1;
|
||||
}
|
||||
|
||||
nt_status = create_conn_struct(talloc_tos(), &conn, printdollar_snum,
|
||||
nt_status = create_conn_struct(talloc_tos(), smbd_server_conn, &conn,
|
||||
printdollar_snum,
|
||||
lp_pathname(printdollar_snum),
|
||||
session_info, &oldcwd);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
@ -998,7 +1000,8 @@ WERROR move_driver_to_download_area(struct auth_session_info *session_info,
|
||||
return WERR_NO_SUCH_SHARE;
|
||||
}
|
||||
|
||||
nt_status = create_conn_struct(talloc_tos(), &conn, printdollar_snum,
|
||||
nt_status = create_conn_struct(talloc_tos(), smbd_server_conn, &conn,
|
||||
printdollar_snum,
|
||||
lp_pathname(printdollar_snum),
|
||||
session_info, &oldcwd);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
@ -1522,7 +1525,8 @@ bool delete_driver_files(const struct auth_session_info *session_info,
|
||||
return false;
|
||||
}
|
||||
|
||||
nt_status = create_conn_struct(talloc_tos(), &conn, printdollar_snum,
|
||||
nt_status = create_conn_struct(talloc_tos(), smbd_server_conn, &conn,
|
||||
printdollar_snum,
|
||||
lp_pathname(printdollar_snum),
|
||||
session_info, &oldcwd);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
|
@ -2129,9 +2129,9 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p,
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
nt_status = create_conn_struct(talloc_tos(), &conn, snum,
|
||||
lp_pathname(snum), p->session_info,
|
||||
&oldcwd);
|
||||
nt_status = create_conn_struct(talloc_tos(), smbd_server_conn, &conn,
|
||||
snum, lp_pathname(snum),
|
||||
p->session_info, &oldcwd);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
DEBUG(10, ("create_conn_struct failed: %s\n",
|
||||
nt_errstr(nt_status)));
|
||||
@ -2270,9 +2270,9 @@ WERROR _srvsvc_NetSetFileSecurity(struct pipes_struct *p,
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
nt_status = create_conn_struct(talloc_tos(), &conn, snum,
|
||||
lp_pathname(snum), p->session_info,
|
||||
&oldcwd);
|
||||
nt_status = create_conn_struct(talloc_tos(), smbd_server_conn, &conn,
|
||||
snum, lp_pathname(snum),
|
||||
p->session_info, &oldcwd);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
DEBUG(10, ("create_conn_struct failed: %s\n",
|
||||
nt_errstr(nt_status)));
|
||||
|
@ -222,6 +222,7 @@ static NTSTATUS parse_dfs_path(connection_struct *conn,
|
||||
*********************************************************/
|
||||
|
||||
NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
|
||||
struct smbd_server_connection *sconn,
|
||||
connection_struct **pconn,
|
||||
int snum,
|
||||
const char *path,
|
||||
@ -262,7 +263,7 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
|
||||
|
||||
conn->params->service = snum;
|
||||
|
||||
conn->sconn = smbd_server_conn;
|
||||
conn->sconn = sconn;
|
||||
conn->sconn->num_tcons_open++;
|
||||
|
||||
if (session_info != NULL) {
|
||||
@ -970,8 +971,8 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
status = create_conn_struct(ctx, &conn, snum, lp_pathname(snum),
|
||||
NULL, &oldpath);
|
||||
status = create_conn_struct(ctx, smbd_server_conn, &conn, snum,
|
||||
lp_pathname(snum), NULL, &oldpath);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
TALLOC_FREE(pdp);
|
||||
return status;
|
||||
@ -1409,8 +1410,8 @@ static bool junction_to_local_path(const struct junction_map *jucn,
|
||||
if(snum < 0) {
|
||||
return False;
|
||||
}
|
||||
status = create_conn_struct(talloc_tos(), conn_out, snum,
|
||||
lp_pathname(snum), NULL, oldpath);
|
||||
status = create_conn_struct(talloc_tos(), smbd_server_conn, conn_out,
|
||||
snum, lp_pathname(snum), NULL, oldpath);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return False;
|
||||
}
|
||||
@ -1571,8 +1572,8 @@ static int count_dfs_links(TALLOC_CTX *ctx, int snum)
|
||||
* Fake up a connection struct for the VFS layer.
|
||||
*/
|
||||
|
||||
status = create_conn_struct(talloc_tos(), &conn, snum, connect_path,
|
||||
NULL, &cwd);
|
||||
status = create_conn_struct(talloc_tos(), smbd_server_conn, &conn,
|
||||
snum, connect_path, NULL, &cwd);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(3, ("create_conn_struct failed: %s\n",
|
||||
nt_errstr(status)));
|
||||
@ -1644,7 +1645,7 @@ static int form_junctions(TALLOC_CTX *ctx,
|
||||
* Fake up a connection struct for the VFS layer.
|
||||
*/
|
||||
|
||||
status = create_conn_struct(ctx, &conn, snum, connect_path, NULL,
|
||||
status = create_conn_struct(ctx, smbd_server_conn, &conn, snum, connect_path, NULL,
|
||||
&cwd);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(3, ("create_conn_struct failed: %s\n",
|
||||
|
@ -475,6 +475,7 @@ NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx,
|
||||
char **pp_name_out,
|
||||
bool *ppath_contains_wcard);
|
||||
NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
|
||||
struct smbd_server_connection *sconn,
|
||||
connection_struct **pconn,
|
||||
int snum,
|
||||
const char *path,
|
||||
|
Loading…
x
Reference in New Issue
Block a user