Bug 1907 - APW based driver upload broken
Summary: APW based driver upload broken
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Printing (show other bugs)
Version: 3.0.8
Hardware: x86 Linux
: P3 normal
Target Milestone: none
Assignee: Gerald (Jerry) Carter (dead mail address)
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks: 1519
  Show dependency treegraph
 
Reported: 2004-10-10 23:58 UTC by Thomas M Steenholdt
Modified: 2005-08-24 10:19 UTC (History)
0 users

See Also:


Attachments
gzipped level 10 log of the problem happening (49.75 KB, application/octet-stream)
2004-10-11 00:26 UTC, Thomas M Steenholdt
no flags Details
smb.conf as output from 'testparm -s' (895 bytes, text/plain)
2004-10-11 00:29 UTC, Thomas M Steenholdt
no flags Details
test patch to prove a problem in rpc_server/srv_spoolss_nt.c (835 bytes, patch)
2004-10-11 01:40 UTC, Thomas M Steenholdt
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas M Steenholdt 2004-10-10 23:58:21 UTC
Having configured samba for serving printer drivers to XP clients, i'm using the
properties dialog from an XP client (as the printer admin user) to install the
needed driver in the samba print$ share.

This doesn't work however;

Windows errors out with :

   Unable to install Lexmark Optra R Series PS, Windows 2000 or XP, Intel
driver. Operation could not be completed.

Samba log the following message in the client log :

   [2004/10/11 07:46:48, 0] smbd/service.c:make_connection(800)
      client_pc (192.168.1.12) couldn't find service
::{2227a280-3aea-1069-a2de-08002b30309d}

Searching for the problem on google yields quite a few hits but no real solution
(that i have come across). Searching om samba bugzilla yields nothing, so here
we are :-)

I'm running 3.0.8pre1 with the #1519 patch applied
Comment 1 Thomas M Steenholdt 2004-10-11 00:26:58 UTC
Created attachment 713 [details]
gzipped level 10 log of the problem happening
Comment 2 Thomas M Steenholdt 2004-10-11 00:29:56 UTC
Created attachment 714 [details]
smb.conf as output from 'testparm -s'
Comment 3 Thomas M Steenholdt 2004-10-11 01:40:19 UTC
Created attachment 715 [details]
test patch to prove a problem in rpc_server/srv_spoolss_nt.c

The srv_spoolss_nt, getprinterdriverdir_level_1 function adds heading \\'s to
the URI string, resulting in an URL that looks like \\\\server\print$\W32X86
which doesnt work...

The patch simply removes those leading \\'s in order to make the string look
okay and after that, the driver gets uploaded successfully.

While i realize that this is proably not the right way to fix this issue, it
points to the problem we're facing.
Comment 4 Thomas M Steenholdt 2004-10-11 01:45:14 UTC
i noticed after applying the test patch, when i have the driver successfully
uploaded, the printer object under "Printers and Faxes" on the samba server,
changed it's name to that of the driver! This may or may not be because of the
test patch or perhaps because of a typo in the #1519 patch. I'll create a new
bug for this, but please let me know what you make of it first, okay?
Comment 5 Gerald (Jerry) Carter (dead mail address) 2004-10-11 05:35:41 UTC
Thomas, can you try the latest SAMBA_3_0 svn tree ?  There is 
no instance of get_called_name() in the current code.  This might 
indicate a bug in the original patch.  

wrt to changing the printer name when uploading a new driver, this is 
default Windows behavior.  The Windows client is sending the SetPrinter()
call with the new name.  You can simply rename the printer after 
uploading the new driver.  You will see the same behavior on a local 
Windows printer when the original name matches the assigned driver.
Comment 6 Gerald (Jerry) Carter (dead mail address) 2004-10-11 12:59:38 UTC
new variant of patch based on thmos' original idea checked 
into the 3.0 svn tree.  Thanks for pointing this out
Comment 7 Thomas M Steenholdt 2004-10-11 14:29:53 UTC
tested and works, thanks!
Comment 8 Gerald (Jerry) Carter (dead mail address) 2004-10-15 12:59:29 UTC
this fix has been incorporated into the second draft of the patch
for BUG 1519 (already checked in to the 3.0 source tree).
Comment 9 Gerald (Jerry) Carter (dead mail address) 2005-02-07 09:18:57 UTC
originally reported against 3.0.8pre1.  Cleaning up 
non-production versions.
Comment 10 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:19:31 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.