[Samba] string overflow in rpcclient add "printer" driver command

Emanuel Moura dos Santos emanuelsan at terra.com.br
Tue Jun 12 19:38:22 GMT 2007


Ok, I make mistake, the tbdump command return correct drivers files now. 

But other input formats for rpcclient still in error:

     rpcclient  ...  -c 'adddriver   "arch" "verylongstring"'    
OK Printer Driver MyDriver001 successfully installed.

    echo 'adddriver "arch" "verylongstring"'   |    rpcclient ... 
result was WERR_UNKNOWN_PRINTER_DRIVER

    rpcclient ...  <<  --EOC
        adddriver  "arch"  "verylongstring"
   --EOC
result was WERR_UNKNOWN_PRINTER_DRIVER


    echo 'adddriver "arch" "truncated_verylongstring"'   |    rpcclient ... 
Printer Driver MyDriver001 successfully installed.

    rpcclient ... << --EOC
       adddriver  "arch"  "truncated_verylongstring"
   --EOC
Printer Driver MyDriver001 successfully installed.

---------- Cabeçalho original -----------
> De: "Jeremy Allison" jra at samba.org
> Para: "Emanuel Moura dos Santos" emanuelsan at terra.com.br
> Cópia: samba at lists.samba.org
> Data: Wed, 6 Jun 2007 17:33:19 -0700
> Assunto: Re: [Samba] string overflow in rpcclient add "printer" driver command
> 
> > On Wed, Jun 06, 2007 at 06:36:28PM -0300, Emanuel Moura dos Santos wrote:
> 
> > > I get the folowing error msg in rpcclient -c 'adddriver' command:
> > > 
> > > ERROR: string overflow by 1 (1024 - 1023) in safe_strcpy [adddriver "Windows NT x86" "My Driver Name 001:aaa]
> 
> > > My command is like this:
> > > 
> > > rpcclient MYSRV -s /etc/samba/smb.conf -A auth.txt -c 'adddriver "Windows NT x86" "My Driver Name 001:
> > >       aaaaaa.001:aaaaaa.002:aaaaaa.003:aaaaaa.004::NULL:aaaaaa.001,
> > >       ..... bla bla bla ... bbbbbbb.022, ... bla bla bla ...
> > >       aaaaaaa.077,ccccccc.078"'

 
> Thanks. The your patch is Ok. But, second part of my initial report stay loosing files. The ntdrivers.tdb file
> cut my file list.




More information about the samba mailing list