summaryrefslogtreecommitdiffstats
path: root/source/smbd/open.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/smbd/open.c')
-rw-r--r--source/smbd/open.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/smbd/open.c b/source/smbd/open.c
index 9cefcc9b45e..4b659305473 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -637,8 +637,10 @@ files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_S
if (conn->printer) {
/* printers are handled completely differently. Most
of the passed parameters are ignored */
- *Access = DOS_OPEN_WRONLY;
- *action = FILE_WAS_CREATED;
+ if (Access)
+ *Access = DOS_OPEN_WRONLY;
+ if (action)
+ *action = FILE_WAS_CREATED;
return print_fsp_open(conn, fname);
}