summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-04-30 00:09:09 +0200
committerGünther Deschner <gd@samba.org>2011-05-02 15:03:43 +0200
commitcd5b2b242b39437081592d41d297bce0668b40ab (patch)
tree5c5e8399be25f25191c974a6de0774a5993545b3 /source3/printing
parent89ceb489784358f9476bb6be0ad3ab9ea4d1b9c2 (diff)
downloadsamba-cd5b2b242b39437081592d41d297bce0668b40ab.tar.gz
samba-cd5b2b242b39437081592d41d297bce0668b40ab.tar.bz2
samba-cd5b2b242b39437081592d41d297bce0668b40ab.zip
s3-printing: avoid using pipes_struct when only session_info is needed.
Guenther
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index d74003a708..552e1ba076 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -36,7 +36,6 @@
#include "smbd/smbd.h"
#include "auth.h"
#include "messages.h"
-#include "ntdomain.h"
#include "rpc_server/spoolss/srv_spoolss_nt.h"
/* Map generic permissions to printer object specific permissions */
@@ -579,7 +578,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
/****************************************************************************
Determine the correct cVersion associated with an architecture and driver
****************************************************************************/
-static uint32 get_correct_cversion(struct pipes_struct *p,
+static uint32 get_correct_cversion(struct auth_serversupplied_info *session_info,
const char *architecture,
const char *driverpath_in,
WERROR *perr)
@@ -622,7 +621,7 @@ static uint32 get_correct_cversion(struct pipes_struct *p,
nt_status = create_conn_struct(talloc_tos(), &conn, printdollar_snum,
lp_pathname(printdollar_snum),
- p->session_info, &oldcwd);
+ session_info, &oldcwd);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0,("get_correct_cversion: create_conn_struct "
"returned %s\n", nt_errstr(nt_status)));
@@ -637,7 +636,7 @@ static uint32 get_correct_cversion(struct pipes_struct *p,
goto error_free_conn;
}
- if (!become_user_by_session(conn, p->session_info)) {
+ if (!become_user_by_session(conn, session_info)) {
DEBUG(0, ("failed to become user\n"));
*perr = WERR_ACCESS_DENIED;
goto error_free_conn;
@@ -767,7 +766,7 @@ static uint32 get_correct_cversion(struct pipes_struct *p,
} while (0);
static WERROR clean_up_driver_struct_level(TALLOC_CTX *mem_ctx,
- struct pipes_struct *rpc_pipe,
+ struct auth_serversupplied_info *session_info,
const char *architecture,
const char **driver_path,
const char **data_file,
@@ -827,7 +826,7 @@ static WERROR clean_up_driver_struct_level(TALLOC_CTX *mem_ctx,
* NT2K: cversion=3
*/
- *version = get_correct_cversion(rpc_pipe, short_architecture,
+ *version = get_correct_cversion(session_info, short_architecture,
*driver_path, &err);
if (*version == -1) {
return err;
@@ -840,12 +839,12 @@ static WERROR clean_up_driver_struct_level(TALLOC_CTX *mem_ctx,
****************************************************************************/
WERROR clean_up_driver_struct(TALLOC_CTX *mem_ctx,
- struct pipes_struct *rpc_pipe,
+ struct auth_serversupplied_info *session_info,
struct spoolss_AddDriverInfoCtr *r)
{
switch (r->level) {
case 3:
- return clean_up_driver_struct_level(mem_ctx, rpc_pipe,
+ return clean_up_driver_struct_level(mem_ctx, session_info,
r->info.info3->architecture,
&r->info.info3->driver_path,
&r->info.info3->data_file,
@@ -854,7 +853,7 @@ WERROR clean_up_driver_struct(TALLOC_CTX *mem_ctx,
r->info.info3->dependent_files,
&r->info.info3->version);
case 6:
- return clean_up_driver_struct_level(mem_ctx, rpc_pipe,
+ return clean_up_driver_struct_level(mem_ctx, session_info,
r->info.info6->architecture,
&r->info.info6->driver_path,
&r->info.info6->data_file,
@@ -959,7 +958,7 @@ static WERROR move_driver_file_to_download_area(TALLOC_CTX *mem_ctx,
return ret;
}
-WERROR move_driver_to_download_area(struct pipes_struct *p,
+WERROR move_driver_to_download_area(struct auth_serversupplied_info *session_info,
struct spoolss_AddDriverInfoCtr *r)
{
struct spoolss_AddDriverInfo3 *driver;
@@ -1005,7 +1004,7 @@ WERROR move_driver_to_download_area(struct pipes_struct *p,
nt_status = create_conn_struct(talloc_tos(), &conn, printdollar_snum,
lp_pathname(printdollar_snum),
- p->session_info, &oldcwd);
+ session_info, &oldcwd);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0,("move_driver_to_download_area: create_conn_struct "
"returned %s\n", nt_errstr(nt_status)));
@@ -1020,7 +1019,7 @@ WERROR move_driver_to_download_area(struct pipes_struct *p,
goto err_free_conn;
}
- if (!become_user_by_session(conn, p->session_info)) {
+ if (!become_user_by_session(conn, session_info)) {
DEBUG(0, ("failed to become user\n"));
err = WERR_ACCESS_DENIED;
goto err_free_conn;