[Samba] 3.0.6 & "string overflow by 1" revisited

Alex de Vaal a.vaal at nh-hotels.com
Mon Sep 6 13:55:47 GMT 2004


Gerald Carter wrote:
 
>| every time I access a printer my logs flood with messages
>| like to those below.  It seems I can set printer
>| properites, etc...  but when I print the jobs seem to go
>| to never-never land (still researching where the jobs go).
>|
>| [2004/08/20 08:46:27, 0] lib/util_str.c:safe_strcpy_fn(600)
>|   ERROR: string overflow by 1 (32 - 31) in safe_strcpy
>| [\\192.168.1.12\HP Business Inkjet 2250 PS]
 
> This is a warning a shouldn't impact the print jobs in any way.
 
Gerald Carter wrote:
 
>| This messages are side-effects of setting the printername
>| To "\\servername\drivername", when assigning drivers to
>| printers.
 
>| AFAIK the message is caused by the safe_strcpy call in
>| printing/nt_printing.c : construct_nt_devicemode ()
>| or get_a_printer2 ().
>|
>| The MAXDEVICENAME macro is set to 32 whereas printername plus
>| servername is usually longer than that.
> 
> This is the size defined by MS.  (see MSDN and one the
> wire traces).
 
Hello Jerry,
 
After the upgrade from 3.0.4 to 3.0.6 I also get the
lib/util_str.c:safe_strcpy_fn(600)
ERROR: string overflow by 1 (32 - 31) in safe_strcpy
[\\192.168.100.151\DUSSEL_LASER01]
messages in my logs. 
 
I use Samba on a RHL9 server with CUPS and the Samba server is a domain
member in a W2k3 ADS environment.
>From the ADS login script my workstations get their printers installed via
DNS name(e.g \\DUSSEL.XX-XXXXXXX.COM\DUSSEL_LASER01) and this obvious longer
than 32 characters. My workstatations get with 3.0.6 besides the
"DUSSEL_LASER01 on dussel" printer (installed by 3.0.4) also the
"DUSSEL_LASER01 on 192.168.100.151" printer (which is the same) installed. 
When I remove the profile of the user on the workstation and put in the
login script \\DUSSEL\DUSSEL_LASER01 as printer (the old NETBIOS name, which
is less than 32 characters) I still get the "string overflow by 1 (32 - 31)
in safe_strcpy" error messages. This new profile gets the "DUSSEL_LASER01 on
192.168.100.151" printer installed and after a reboot also the
"DUSSEL_LASER01 on dussel" printer (which is the same).
 
Even when I login as administrator on the workstation, browse via "My
Network Places" to the printer (\\DUSSEL\DUSSEL_LASER01) and use "Connect"
then I also get the "string overflow by 1 (32 - 31) in safe_strcpy" error
messages.
 
Whatever I do with 3.0.6 I always get these error messages, while printing
seems to be Ok. Only a new profile on a workstation doesn't get the default
printer installed (first printer in the ADS login script) and that's quite
annoying (this works fine with 3.0.4).
Besides that my (samba) log files are flooded with these messages and, not
nice, also my /var/log/messages file.
 
Downgrading to 3.0.4 resolves all of the above. I'd like to upgrade my samba
sites to 3.0.6, but if I encounter these kind of problems with printers I'm
really considering to wait with the upgrade on real production sites (I've
upgraded an experimental production site so far).
 
Can you tell me what can be expected in future versions of samba concerning
this and how to act on this current issue?
 
Thanx,
 
Alex.

(sorry for the stupid disclaimer).





Visit our Web site: http://www.nh-hotels.com
This message is from NH HOTELES and it is private and confidential.
Its content may be legally protected.Reception by a non-intended person does not waive legal protection rights.
If you receive this message by mistake, please delete it from your system and report the sender.
Although this message has been cleared for viruses using currently available virus definitions before sending,
it is the responsibility of the receiver to ensure it is virus-free.Thank you.

 


More information about the samba mailing list