Excel Print to file problem with Samba shares.

Jeremy Allison jeremy at valinux.com
Mon Jul 24 17:40:16 GMT 2000


P Ranjit Kumar wrote:
> 
> Hello,
> 
> Here is an observed problem with Microsoft Excel when using files on SAMBA
> shares.
> 
> When a Excel's working directory is changed to the drive to which SAMBA
> share is mapped (To do this, just open excel, File->New, Type something,
> Click on save, in the save as window change the directory to samba share,
> then click on cancel.)
> 
> Now, if you try to print to a file, Excel doesn't prompt you for a file name
> and prints the file to a file named "file:" on the samba share.
> 
> The reason is Excel sends NTCreate message with filename "file:", Since
> "file:" is a valid name on Unix Samba just accepts it. If the same operation
> is tryed on a NT share, the NT server rejects the "file:" as an invalid file
> name (error code is NT_STATUS_OBJECT_NAME_INVALID), then excel prompts for a
> new filename to be entered by the user. I have tested this behavior.
> 
> Samba "open file" needs to work around this defect. Along with the charater
> ":" there are a bunch of other characters in NT that make a file name
> invalid. They are \/*?<>|
> 
> I changed  open_file_shared function in smbd/open.c to return an error if
> the file contains a ":",  it then works fine. So may be Samba should be
> checking for the filename sufficiency. I like to know what the Samba
> developers out there think about it.

This should prbably be done in the smbd/nttrans.c as I'm
we currently mangle ':' characters I think in the ordinary
open calls.

Can you post your patch to the list as a starting point ?

Thanks,

	Jeremy Allison,
	Samba Team.

-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------




More information about the samba-technical mailing list