From c61c9c3a4cda79fb82adf59bcb563d85797b9b76 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 5 Mar 2010 15:10:30 -0800 Subject: Fix for bug #7189 - Open txt files with notepad on samba shares creates problem. Ensure we don't use any of the create_options for Samba private use. Add a new parameter to the VFS_CREATE call (private_flags) which is only used internally. Renumber NTCREATEX_OPTIONS_PRIVATE_DENY_DOS and NTCREATEX_OPTIONS_PRIVATE_DENY_FCB to match the S4 code). Rev. the VFS interface to version 28. Jeremy. --- source3/printing/nt_printing.c | 3 +++ source3/printing/printfsp.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'source3/printing') diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 7aef424961..d7fe272ea7 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -1315,6 +1315,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr FILE_ATTRIBUTE_NORMAL, /* file_attributes */ INTERNAL_OPEN_ONLY, /* oplock_request */ 0, /* allocation_size */ + 0, /* private_flags */ NULL, /* sd */ NULL, /* ea_list */ &fsp, /* result */ @@ -1367,6 +1368,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr FILE_ATTRIBUTE_NORMAL, /* file_attributes */ INTERNAL_OPEN_ONLY, /* oplock_request */ 0, /* allocation_size */ + 0, /* private_flags */ NULL, /* sd */ NULL, /* ea_list */ &fsp, /* result */ @@ -1524,6 +1526,7 @@ static uint32 get_correct_cversion(struct pipes_struct *p, 0, /* create_options */ FILE_ATTRIBUTE_NORMAL, /* file_attributes */ INTERNAL_OPEN_ONLY, /* oplock_request */ + 0, /* private_flags */ 0, /* allocation_size */ NULL, /* sd */ NULL, /* ea_list */ diff --git a/source3/printing/printfsp.c b/source3/printing/printfsp.c index b9fe49226e..756a314dd7 100644 --- a/source3/printing/printfsp.c +++ b/source3/printing/printfsp.c @@ -94,7 +94,7 @@ void print_fsp_end(files_struct *fsp, enum file_close_type close_type) { uint32 jobid; - if (fsp->fh->private_options & FILE_DELETE_ON_CLOSE) { + if (fsp->fh->private_options & NTCREATEX_OPTIONS_PRIVATE_DELETE_ON_CLOSE) { /* * Truncate the job. print_job_end will take * care of deleting it for us. JRA. -- cgit