install_printer_drivers.pl fails to install a printer
driver if the printer drivers's helpfile is missing.
The reason is a segmentation fault in rpcclient which
uses the strtok() function to parse its arguments. When
the argument contains a "::", it should be replaced by
":NULL:". A patch for install_printer_drivers.pl
follows.
By the way: If I make Win95/98 Driver packets only,
install_printer_drivers.pl complains about "ERROR!
Package doesn't include a "Windows NT x86" driver
set.".
*** install_printer_drivers.pl.orig Mon Aug 27
22:51:30 2001
--- install_printer_drivers.pl Tue Aug 28 13:22:08
2001
***************
*** 943,948 ****
--- 943,951 ----
"\\\"$printer_model_name:$driver_file_name:$data_file_name:"
.
"$config_file_name:$help_file_name:NULL:RAW:" .
(join (',', @args)) . "\\\"";
+ # avoid "::" (e.g. an empty $help_file_name).
Otherwise rpcclient may
+ # crash with a segmentation fault (samba
version 2.2.1b)
+ $cmd_string =~ s/::/:NULL:/g;
$cmd = "$path_rpcclient $servername -d 1 -A
$authfile -c \"$cmd_string\"";
if ($DEBUG) { print STDERR "$cmd\n"; }
if (!open (RPC_IN, "$cmd|")) {
Yours sincerely,
Klaus
klaus.reimann@itap.physik.uni-stuttgart.de