summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-17 09:34:27 +0200
committerVolker Lendecke <vl@samba.org>2010-08-18 11:18:24 +0200
commita847f13d7b0c8606471792a50e9c64d1f6bd430c (patch)
tree15239689d536998566c955ab3f4d20599947f687 /source3
parent29093bc0009bbcd5f9a98a2f4611fc3eb65f2539 (diff)
downloadsamba-a847f13d7b0c8606471792a50e9c64d1f6bd430c.tar.gz
samba-a847f13d7b0c8606471792a50e9c64d1f6bd430c.tar.bz2
samba-a847f13d7b0c8606471792a50e9c64d1f6bd430c.zip
s3: Use pipe_struct->client_id->name for pjob.clientmachine
Diffstat (limited to 'source3')
-rw-r--r--source3/include/printing.h1
-rw-r--r--source3/printing/printing.c9
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c3
3 files changed, 5 insertions, 8 deletions
diff --git a/source3/include/printing.h b/source3/include/printing.h
index b5fd98dd85..a16917fe32 100644
--- a/source3/include/printing.h
+++ b/source3/include/printing.h
@@ -142,6 +142,7 @@ int print_queue_length(struct messaging_context *msg_ctx, int snum,
print_status_struct *pstatus);
WERROR print_job_start(struct auth_serversupplied_info *server_info,
struct messaging_context *msg_ctx,
+ const char *clientmachine,
int snum, const char *docname, const char *filename,
struct spoolss_DeviceMode *devmode, uint32_t *_jobid);
void print_job_endpage(struct messaging_context *msg_ctx,
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 297fdd1d28..4240ddf330 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -2685,6 +2685,7 @@ static WERROR print_job_spool_file(int snum, uint32_t jobid,
WERROR print_job_start(struct auth_serversupplied_info *server_info,
struct messaging_context *msg_ctx,
+ const char *clientmachine,
int snum, const char *docname, const char *filename,
struct spoolss_DeviceMode *devmode, uint32_t *_jobid)
{
@@ -2695,8 +2696,6 @@ WERROR print_job_start(struct auth_serversupplied_info *server_info,
struct tdb_print_db *pdb = get_print_db_byname(sharename);
int njobs;
WERROR werr;
- const char *clientname;
- char addr[INET6_ADDRSTRLEN];
if (!pdb) {
return WERR_INTERNAL_DB_CORRUPTION;
@@ -2735,11 +2734,7 @@ WERROR print_job_start(struct auth_serversupplied_info *server_info,
fstrcpy(pjob.jobname, docname);
- clientname = client_name(smbd_server_fd());
- if (strcmp(clientname, "UNKNOWN") == 0) {
- clientname = client_addr(smbd_server_fd(),addr,sizeof(addr));
- }
- fstrcpy(pjob.clientmachine, clientname);
+ fstrcpy(pjob.clientmachine, clientmachine);
fstrcpy(pjob.user, lp_printjob_username(snum));
standard_sub_advanced(sharename, server_info->sanitized_username,
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index cdb03ff897..46e47f595f 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -5291,7 +5291,8 @@ WERROR _spoolss_StartDocPrinter(struct pipes_struct *p,
return WERR_BADFID;
}
- werr = print_job_start(p->server_info, p->msg_ctx, snum,
+ werr = print_job_start(p->server_info, p->msg_ctx,
+ p->client_id->name, snum,
info_1->document_name, info_1->output_file,
Printer->devmode, &Printer->jobid);