diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/printing/nt_printing.c | 10 | ||||
-rw-r--r-- | source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 12 | ||||
-rw-r--r-- | source3/smbd/msdfs.c | 17 | ||||
-rw-r--r-- | source3/smbd/proto.h | 1 |
4 files changed, 23 insertions, 17 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 2ceb540e35..fc00f6ab5d 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -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)) { diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c index b155d2959d..d7bec0360e 100644 --- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c +++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c @@ -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))); diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index 7d0b78256e..a197f33f11 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -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", diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 3d0665deaf..ab7d0a8013 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -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, |