summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-06-24 16:58:29 +0200
committerVolker Lendecke <vl@samba.org>2008-06-26 13:13:23 +0200
commitc885ae01ebbf2b2f5c75799c4e8b1b0c68b2d34e (patch)
treebd72fddd6ec2722ed57bae94298ab2c5bf04adf2
parente2585b73e975e8a434533019fbab1b8bd045ca70 (diff)
downloadsamba-c885ae01ebbf2b2f5c75799c4e8b1b0c68b2d34e.tar.gz
samba-c885ae01ebbf2b2f5c75799c4e8b1b0c68b2d34e.tar.bz2
samba-c885ae01ebbf2b2f5c75799c4e8b1b0c68b2d34e.zip
Remove current_user reference from printfsp.c
(This used to be commit 510f45d01a19ce1c226755ac42a328241098b2e0)
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/printing/printfsp.c6
-rw-r--r--source3/smbd/open.c2
-rw-r--r--source3/smbd/reply.c2
4 files changed, 5 insertions, 7 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 602e2646fd..6cef348893 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6727,7 +6727,7 @@ bool sysv_cache_reload(void);
/* The following definitions come from printing/printfsp.c */
NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
- files_struct **result);
+ uint16_t current_vuid, files_struct **result);
void print_fsp_end(files_struct *fsp, enum file_close_type close_type);
/* The following definitions come from printing/printing.c */
diff --git a/source3/printing/printfsp.c b/source3/printing/printfsp.c
index 4a2b26d2cd..c6749226fd 100644
--- a/source3/printing/printfsp.c
+++ b/source3/printing/printfsp.c
@@ -20,15 +20,13 @@
#include "includes.h"
-extern struct current_user current_user;
-
/***************************************************************************
open a print file and setup a fsp for it. This is a wrapper around
print_job_start().
***************************************************************************/
NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
- files_struct **result)
+ uint16_t current_vuid, files_struct **result)
{
int jobid;
SMB_STRUCT_STAT sbuf;
@@ -70,7 +68,7 @@ NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
/* setup a full fsp */
fsp->fh->fd = print_job_fd(lp_const_servicename(SNUM(conn)),jobid);
GetTimeOfDay(&fsp->open_time);
- fsp->vuid = current_user.vuid;
+ fsp->vuid = current_vuid;
fsp->fh->pos = -1;
fsp->can_lock = True;
fsp->can_read = False;
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 3cec80c6df..aa3bbdf685 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1178,7 +1178,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
DEBUG(10, ("open_file_ntcreate: printer open fname=%s\n", fname));
- return print_fsp_open(conn, fname, result);
+ return print_fsp_open(conn, fname, req->vuid, result);
}
if (!parent_dirname_talloc(talloc_tos(), fname, &parent_dir,
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index aaa284dc39..ee646aa7c3 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -4642,7 +4642,7 @@ void reply_printopen(struct smb_request *req)
}
/* Open for exclusive use, write only. */
- status = print_fsp_open(conn, NULL, &fsp);
+ status = print_fsp_open(conn, NULL, req->vuid, &fsp);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);