| Ilya Martynov on Tue, 12 Dec 2000 15:51:39 +0100 (CET) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Fixes for apsfilter-current-09.12.2000 (printing via smbclient) |
Hi,
I've just installed apsfilter-current-09.12.2000 and have found several bugs
in code that prints via Windows remote printers with smbclient.
1) incompability with smbclient Version 2.0.7 on FreeBSD 4.2. This version
expect password in environment variable PASSWD. I dont know if it same for
other versions but man page for 2.0.5a installed on one of PC's I've remote
access on also mention only PASSWD (I've not checked it there). Patch that
fixes problems for me:
diff -r -u apsfilter.orig/SETUP apsfilter/SETUP
--- apsfilter.orig/SETUP Tue Dec 12 17:39:27 2000
+++ apsfilter/SETUP Tue Dec 12 17:41:45 2000
@@ -1107,7 +1107,7 @@
echo "Time for printer:" >> perf.log
if [ "$INTERFACE" = samba ]; then
if [ -n "$SMB_USER" ]; then
- export PASSWORD="$SMB_PASSWD"
+ export PASSWD="$SMB_PASSWD"
SMB_LOGIN="-U ${SMB_USER}"
else
SMB_LOGIN=""
diff -r -u apsfilter.orig/bin/apsfilter apsfilter/bin/apsfilter
--- apsfilter.orig/bin/apsfilter Tue Dec 12 17:39:26 2000
+++ apsfilter/bin/apsfilter Tue Dec 12 17:40:09 2000
@@ -478,7 +478,7 @@
if [ -f "/etc/apsfilter/$QUEUE/smbclient.conf" ]; then
find_filter smbclient || fatal_filter smbclient
. "/etc/apsfilter/$QUEUE/smbclient.conf"
- [ "$SMB_PASSWD"] && export PASSWD="$SMB_PASSWD"
+ [ "$SMB_PASSWD"] && export PASSWD="$SMB_PASSWD"
eval "$@" | smbclient "//$SMB_SERVER/$SMB_PRINTER" \
${SMP_IP:+-I"$SMB_IP"} ${SMB_USER:+-U"$SMB_USER"} \
${SMB_WORKGROUP:+-W"$SMB_WORKGROUP"} \
2) Missing white space in bin/apsfilter. Patch (note that affects one line
that was changed by previous patch so you have to apply first patch before
applying this):
diff -r -u apsfilter.orig/bin/apsfilter apsfilter/bin/apsfilter
--- apsfilter.orig/bin/apsfilter Tue Dec 12 17:45:26 2000
+++ apsfilter/bin/apsfilter Tue Dec 12 17:45:38 2000
@@ -478,7 +478,7 @@
if [ -f "/etc/apsfilter/$QUEUE/smbclient.conf" ]; then
find_filter smbclient || fatal_filter smbclient
. "/etc/apsfilter/$QUEUE/smbclient.conf"
- [ "$SMB_PASSWD"] && export PASSWD="$SMB_PASSWD"
+ [ "$SMB_PASSWD" ] && export PASSWD="$SMB_PASSWD"
eval "$@" | smbclient "//$SMB_SERVER/$SMB_PRINTER" \
${SMP_IP:+-I"$SMB_IP"} ${SMB_USER:+-U"$SMB_USER"} \
${SMB_WORKGROUP:+-W"$SMB_WORKGROUP"} \
--
Ilya Martynov
AGAVA Software Company, http://www.agava.com