summaryrefslogtreecommitdiff
path: root/source3/rpc_server/spoolss
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-07-26 10:40:40 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-07-27 10:38:34 +0200
commit133fb0ebcc070bd3ae4aebcc3a759eca98101495 (patch)
tree6a2eeafd97cefc43bf2b3431f411ae62e507230c /source3/rpc_server/spoolss
parentb77f626def8cd4bf20eb15b98bc8655aab22c32a (diff)
downloadsamba-133fb0ebcc070bd3ae4aebcc3a759eca98101495.tar.gz
samba-133fb0ebcc070bd3ae4aebcc3a759eca98101495.tar.bz2
samba-133fb0ebcc070bd3ae4aebcc3a759eca98101495.zip
s3-spoolss: Use get_session_info_system().
Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Wed Jul 27 10:38:34 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/rpc_server/spoolss')
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index 34ad67aaa6..afd78f1f59 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -1536,9 +1536,8 @@ void do_drv_upgrade_printer(struct messaging_context *msg,
DATA_BLOB *data)
{
TALLOC_CTX *tmp_ctx;
- struct auth_session_info *session_info = NULL;
+ const struct auth_session_info *session_info = get_session_info_system();
struct spoolss_PrinterInfo2 *pinfo2;
- NTSTATUS status;
WERROR result;
const char *drivername;
int snum;
@@ -1548,13 +1547,6 @@ void do_drv_upgrade_printer(struct messaging_context *msg,
tmp_ctx = talloc_new(NULL);
if (!tmp_ctx) return;
- status = make_session_info_system(tmp_ctx, &session_info);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("do_drv_upgrade_printer: "
- "Could not create system session_info\n"));
- goto done;
- }
-
drivername = talloc_strndup(tmp_ctx, (const char *)data->data, data->length);
if (!drivername) {
DEBUG(0, ("do_drv_upgrade_printer: Out of memoery ?!\n"));
@@ -4244,16 +4236,8 @@ static WERROR construct_printer_info7(TALLOC_CTX *mem_ctx,
struct spoolss_PrinterInfo7 *r,
int snum)
{
- struct auth_session_info *session_info;
+ const struct auth_session_info *session_info = get_session_info_system();
struct GUID guid;
- NTSTATUS status;
-
- status = make_session_info_system(mem_ctx, &session_info);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("construct_printer_info7: "
- "Could not create system session_info\n"));
- return WERR_NOMEM;
- }
if (is_printer_published(mem_ctx, session_info, msg_ctx,
servername,
@@ -4266,7 +4250,6 @@ static WERROR construct_printer_info7(TALLOC_CTX *mem_ctx,
}
W_ERROR_HAVE_NO_MEMORY(r->guid);
- TALLOC_FREE(session_info);
return WERR_OK;
}