• Bug#265137: /etc/ppp/ip-up.d/clamav-freshclam-ifupdown: /etc/ppp/ip-up.

    From Leopold BAILLY@1:229/2 to All on Wed Aug 11 23:40:12 2004
    From: [email protected]

    Package: clamav-freshclam
    Version: 0.74-1
    Severity: normal
    File: /etc/ppp/ip-up.d/clamav-freshclam-ifupdown



    -- System Information:
    Debian Release: testing/unstable
    APT prefers testing
    APT policy: (500, 'testing')
    Architecture: i386 (i586)
    Kernel: Linux 2.4.26-1-k6
    Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro

    Versions of packages clamav-freshclam depends on:
    ii clamav-base 0.74-1 Base package for clamav, an anti-v ii debconf [debconf-2.0] 1.4.29 Debian configuration management sy ii debianutils 2.8.3 Miscellaneous utilities specific t ii libbz2-1.0 1.0.2-1 A high-quality block-sorting file ii libc6 2.3.2.ds1-13 GNU C Library: Shared libraries an ii libclamav1 0.74-1 Virus scanner library
    ii libgmp3 4.1.3-1 Multiprecision arithmetic library ii logrotate 3.6.5-2 Log rotation utility
    ii ucf 1.07 Update Configuration File: preserv ii zlib1g 1:1.2.1.1-3 compression library - runtime

    -- debconf information:
    * clamav-freshclam/autoupdate_freshclam: ifup.d
    clamav-freshclam/mirrors.txt-note:
    * clamav-freshclam/internet_interface: ppp0
    * clamav-freshclam/mirrors: clamav.inet6.fr
    * clamav-freshclam/proxy_user:
    * clamav-freshclam/NotifyClamd: false
    * clamav-freshclam/http_proxy: localhost:8080
    * clamav-freshclam/update_interval: 12

    On line 27 of this script, there's a test that is always false because /etc/ppp/ip-up script gives 6 arguments to any script in ip-up.d.
    This test seems useless, I removed it and it's ok.

    Moreover, the message describing usage is wrong because the script works
    only with no argument at all.


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Stephen Gran@1:229/2 to Leopold BAILLY on Thu Aug 12 00:30:08 2004
    From: [email protected]

    This one time, at band camp, Leopold BAILLY said:
    On line 27 of this script, there's a test that is always false because /etc/ppp/ip-up script gives 6 arguments to any script in ip-up.d.
    This test seems useless, I removed it and it's ok.

    Moreover, the message describing usage is wrong because the script works
    only with no argument at all.

    Hmm. It was an attempt to translate no arguments into a start/stop/etc
    based on $0. I don't use ppp much here, so debugging will not be easy
    for me. Can you send me the output of a script that just echo's each
    argument given to it? /etc/ppp/ip-{up,down}.d/echo or some such?

    Thanks,
    --
    -----------------------------------------------------------------
    | ,''`. Stephen Gran |
    | : :' : [email protected] |
    | `. `' Debian user, admin, and developer |
    | `- http://www.debian.org |
    -----------------------------------------------------------------

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (GNU/Linux)

    iD8DBQFBGpRDSYIMHOpZA44RAg0bAJsEnTn/2pIEZYC2Pow8RbX8EQfhFgCghxWa o9gisDmnGLlQtVv5m51t3q8=
    =y8Rp
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Stephen Gran@1:229/2 to Leopold BAILLY on Fri Aug 13 01:30:13 2004
    From: [email protected]

    On Thu, Aug 12, 2004 at 11:57:47PM +0200, Leopold BAILLY said:
    Stephen Gran <[email protected]> writes:

    This one time, at band camp, Leopold BAILLY said:
    On line 27 of this script, there's a test that is always false because
    /etc/ppp/ip-up script gives 6 arguments to any script in ip-up.d.
    This test seems useless, I removed it and it's ok.

    Moreover, the message describing usage is wrong because the script works >> only with no argument at all.

    Hmm. It was an attempt to translate no arguments into a start/stop/etc based on $0. I don't use ppp much here, so debugging will not be easy
    for me. Can you send me the output of a script that just echo's each argument given to it? /etc/ppp/ip-{up,down}.d/echo or some such?

    Here is a part of the pppd man page :

    Thank you for the pointers. Sorry to have missed it. I have some time
    to work on this in the next 2 days - do you mind if I send you samples
    to test?

    Thanks again,
    --
    --------------------------------------------------------------------------
    | Stephen Gran | Sho' they got to have it against the |
    | [email protected] | law. Shoot, ever'body git high, they |
    | http://www.lobefin.net/~steve | wouldn't be nobody git up and feed the |
    | | chickens. Hee-hee. -- Terry Southern |
    --------------------------------------------------------------------------

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (GNU/Linux)

    iD8DBQFBG/jmSYIMHOpZA44RApr6AKDUKAacMmsJZUMx5xRtDBOSgAbjYQCguDlS x8bpH3wgHCAmc7jXYKQv4KY=
    =/DRF
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Stephen Gran@1:229/2 to Leopold BAILLY on Fri Aug 13 08:30:09 2004
    From: [email protected]

    On Thu, Aug 12, 2004 at 11:57:47PM +0200, Leopold BAILLY said:
    After pppd has established the connection, it runs the /etc/ppp/ip-up script, giving it these six arguments.
    In ip-up, you have the following command :

    run-parts /etc/ppp/ip-up.d \
    --arg="$1" --arg="$2" --arg="$3" --arg="$4" --arg="$5" --arg="$6"

    that finally runs the clamav-freshclam-ifupdown script, forwarding the six arguments to it.

    With ppp, clamav-freshclam-ifupdown will *never* be called whith start or stop
    as first argument, so you do always have to guess.

    Ah, I found the original bug in my thinking. The only ppp box I have
    access to is a woody one, and it _doesn't_ do this. This is the relevant
    part:
    steve@firewall:~$ grep ^run-parts /etc/ppp/ip-up
    run-parts /etc/ppp/ip-up.d

    It instead exports variables, like so:
    # These variables are for the use of the scripts run by run-parts PPP_IFACE="$1"
    PPP_TTY="$2"
    PPP_SPEED="$3"
    PPP_LOCAL="$4"
    PPP_REMOTE="$5"
    PPP_IPPARAM="$6"
    export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM

    Does the sid pppd behave similarly - I mean in addition to passing them
    as arguments, does it also export these variables?

    Thanks again,
    --
    --------------------------------------------------------------------------
    | Stephen Gran | Hire the morally handicapped. |
    | [email protected] | |
    | http://www.lobefin.net/~steve | |
    --------------------------------------------------------------------------

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (GNU/Linux)

    iD8DBQFBHCTlSYIMHOpZA44RAs+CAKCi9J5waUANtMRBK03hYJ4mHdgn7gCcDtp4 pchY5GAOx5wMt7eIbzD460c=
    =bAji
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Stephen Gran@1:229/2 to All on Fri Aug 13 10:40:08 2004
    From: [email protected]

    Try this patch - I think it fixes it.

    -----------------------------------------------------------------
    --- /etc/network/if-up.d/clamav-freshclam-ifupdown.old 2004-05-14 20:41:08.000000000 -0400
    +++ /etc/network/if-up.d/clamav-freshclam-ifupdown 2004-08-12 22:34:29.000000000 -0400
    @@ -4,9 +4,7 @@

    set -e

    -if [ ! -e /var/lib/clamav/interface ]; then
    - exit 0
    -fi
    +[ -e /var/lib/clamav/interface ] || exit 0

    INIT=/etc/init.d/clamav-freshclam
    CLAMAV_CONF_FILE=/etc/clamav/clamav.conf
    @@ -20,17 +18,21 @@
    IS_RUNNING=false
    fi

    -if [ -n "$PPP_IFACE" ]; then
    - IFACE=$PPP_IFACE
    -fi
    +# $IFACE is set by ifup/down, $PPP_IFACE by pppd
    +[ -n "$PPP_IFACE" ] && IFACE=$PPP_IFACE
    +
    +# This is sloppy - woody's pppd exports variables, while sid's passes them as +# arguments and exports them.
    +
    +if [ "$1" = "$IFACE" ]; then # We're called by sid's pppd
    + shift 6 # and we already know the interface
    +fi # Dump the arguments passed.

    if [ -z "$1" ]; then
    case $(dirname "$0") in
    */if-up.d|*/ip-up.d)
    # Short circuit and exit earl
  • From Stephen Gran@1:229/2 to Leopold BAILLY on Sat Aug 14 07:00:09 2004
    From: [email protected]

    This one time, at band camp, Leopold BAILLY said:
    Stephen Gran <[email protected]> writes:

    Try this patch - I think it fixes it.

    -----------------------------------------------------------------
    --- /etc/network/if-up.d/clamav-freshclam-ifupdown.old 2004-05-14 20:41:08.000000000 -0400
    +++ /etc/network/if-up.d/clamav-freshclam-ifupdown 2004-08-12 22:34:29.000000000 -0400

    [...]

    -----------------------------------------------------------------

    It works, the bug can be closed.
    Thanks a lot for your impressive reactivity.

    Great - thanks. I will probably upload tomorrow, although itmay have to
    wait. I am waiting on some translations, and trying not to upload too
    often since the buildd's are swamped right now.

    Thanks for your quick feedback and help debugging,
    --
    -----------------------------------------------------------------
    | ,''`. Stephen Gran |
    | : :' : [email protected] |
    | `. `' Debian user, admin, and developer |
    | `- http://www.debian.org |
    -----------------------------------------------------------------

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (GNU/Linux)

    iD8DBQFBHZfQSYIMHOpZA44RAip4AKDj/L2xtUpz+UkjC3Switrq4a6UFACgmaMe lF+wTG/r9lvorPnpN+3ubos=
    =p3m4
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)