Samba
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives Mailing Lists Samba

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old July 2nd, 2008, 07:11 AM
Alexander Bokovoy
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
enumprinterdrivers 2|3 is broken

It appears that we are never protecting ourselves from \\ slashes in
the incoming server name in spoolss requests. While doing
enumprinterdrivers 2 and 3 levels we call
() which formats
returned strings as "\\\\%s\%s" where first parameter is server name.
Therefore, our response is sending \\\\ slashes.

In particular, this is different to what Windows does: it looks they
simply normalize slashes everywhere.

This difference actually has a harm effect: Windows client thinks that
a driver is changed on the server and reloads it from the Samba server
on each opening of the printer properties. This is quite noticeable
for large drivers as network consumption increases.

We could normalize name in
()
(reffering to 3-0-stable source) or could strip/normalize in
enumprinterdrivers_level2(). Not sure which way is better and safer.

This logical error exists in rpc code in 3-0 and upwards.
--
/ Alexander Bokovoy

Reply With Quote
  #2  
Old July 2nd, 2008, 05:31 PM
Jeremy Allison
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
enumprinterdrivers 2|3 is broken

Wed, Jul 02, 2008 at 02:59:10PM +0400, Alexander Bokovoy wrote:
It appears that we are never protecting ourselves from \\ slashes in
the incoming server name in spoolss requests. While doing
enumprinterdrivers 2 and 3 levels we call
() which formats
returned strings as "\\\\%s\%s" where first parameter is server name.
Therefore, our response is sending \\\\ slashes.

In particular, this is different to what Windows does: it looks they
simply normalize slashes everywhere.

This difference actually has a harm effect: Windows client thinks that
a driver is changed on the server and reloads it from the Samba server
on each opening of the printer properties. This is quite noticeable
for large drivers as network consumption increases.

We could normalize name in
()
(reffering to 3-0-stable source) or could strip/normalize in
enumprinterdrivers_level2(). Not sure which way is better and safer.

This logical error exists in rpc code in 3-0 and upwards.

Alexander, can you test this patch for me please ?

Should fix all uses of \\[\\]servername to be
a canonical \\servername.

Jeremy.

Reply With Quote
  #3  
Old July 2nd, 2008, 05:31 PM
Jeremy Allison
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
enumprinterdrivers 2|3 is broken

Wed, Jul 02, 2008 at 02:59:10PM +0400, Alexander Bokovoy wrote:
It appears that we are never protecting ourselves from \\ slashes in
the incoming server name in spoolss requests. While doing
enumprinterdrivers 2 and 3 levels we call
() which formats
returned strings as "\\\\%s\%s" where first parameter is server name.
Therefore, our response is sending \\\\ slashes.

In particular, this is different to what Windows does: it looks they
simply normalize slashes everywhere.

This difference actually has a harm effect: Windows client thinks that
a driver is changed on the server and reloads it from the Samba server
on each opening of the printer properties. This is quite noticeable
for large drivers as network consumption increases.

We could normalize name in
()
(reffering to 3-0-stable source) or could strip/normalize in
enumprinterdrivers_level2(). Not sure which way is better and safer.

What does Windows do to normalize the servername ? Do they send
it as '\\servername' or just 'servername' ?

Jeremy.

Reply With Quote
Reply

Viewing: Web Development Archives Mailing Lists Samba > enumprinterdrivers 2|3 is broken


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT