hpoj: can't talk to printer

Bug #19907 reported by Debian Bug Importer
4
Affects Status Importance Assigned to Milestone
hpoj (Debian)
Fix Released
Unknown
hpoj (Ubuntu)
Invalid
High
Martin Pitt

Bug Description

Automatically imported from Debian bug report #321666 http://bugs.debian.org/321666

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Sat, 06 Aug 2005 15:05:54 -0400
From: Mark Horn <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: hpoj: can't talk to printer

Package: hpoj
Version: 0.91-5
Severity: grave
Justification: renders package unusable

This version of hpoj fails when trying to setup. I get the following error
when running 'ptal-init setup':

    *** ptal-mlcd failed to start! Check syslog file for error messages.

The syslog entry says:

Aug 6 14:49:11 home ptal-mlcd: FATAL ERROR at ParPort.cpp:48, dev=<mlc:par:PSC_500>, pid=12419, e=1, t=1123354151 Access denied to parallel port!

I downgraded to 0.91-4 (the version in testing) and running
'ptal-init setup' allows the package to work properly.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.4.26-1-386
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages hpoj depends on:
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii libgcc1 1:4.0.1-3 GCC support library
ii libsnmp5 5.2.1.2-1 NET SNMP (Simple Network Managemen
ii libstdc++5 1:3.3.6-7 The GNU Standard C++ Library v3
ii libusb-0.1-4 2:0.1.10a-18 userspace USB programming library

Versions of packages hpoj recommends:
ii cupsys 1.1.23-11 Common UNIX Printing System(tm) -
ii cupsys-bsd [lpr] 1.1.23-11 Common UNIX Printing System(tm) -
ii hpijs 2.1.4+0.9.4-2 HP Linux Printing and Imaging - gs
ii libsane 1.0.15-10 API library for scanners

-- no debconf information

Revision history for this message
Matt Zimmerman (mdz) wrote :

we'll only need to fix this if we keep hpoj; it can be NOTWARTY if we move it to
universe and replace it with hplip-base

Revision history for this message
Martin Pitt (pitti) wrote :

This suspiciously looks like #11821. Can you please upgrade to version 0.91-6
and check again?

Thanks,

Martin

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #3)
> This suspiciously looks like #11821. Can you please upgrade to version 0.91-6
> and check again?

Oops, no actual reporter. I just close it as a dup then.

Matt, Matthias Klose will do the hpoj->hplip change soon anyway.

This bug has been marked as a duplicate of bug 18103.

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 01 Sep 2005 17:49:23 +0100
From: Mark Purcell <email address hidden>
To: <email address hidden>
Subject: fixed in hpoj-0.91-6

This bug was fixed with the upload of hpoj-0.91-6.

If not, please reply and reopen.

Mark

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sat, 10 Sep 2005 12:25:13 +1000
From: Sam Couter <email address hidden>
To: <email address hidden>
Cc: <email address hidden>
Subject: Found bug #321666 again

--pvezYHf7grwyp3Bc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

found 321666 0.91-7
found 321666 0.91-8
stop

Without details on the bug, I can't be 100% sure, but I'm seeing this
same error message with both 0.91-8 and 0.91-7. Device permissions look
fine, ptal-printd is running as the hpojlp user, and hpojlp is in the lp
group.
--=20
Sam "Eddie" Couter | mailto:<email address hidden>
Debian Developer | mailto:<email address hidden>
                    | jabber:<email address hidden>
OpenPGP fingerprint: A46B 9BB5 3148 7BEA 1F05 5BD5 8530 03AE DE89 C75C

--pvezYHf7grwyp3Bc
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

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

iD8DBQFDIkQJhTADrt6Jx1wRAkt2AJ9UNnxnb7znXCMVk9Ll1FK7+VSztgCgzmA2
trvSiKBSUmE4q38Tt2ftxNQ=
=5zaq
-----END PGP SIGNATURE-----

--pvezYHf7grwyp3Bc--

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sat, 10 Sep 2005 18:39:14 +1000
From: Sam Couter <email address hidden>
To: <email address hidden>
Subject: iopl() returns EPERM because ptal-mlcd isn't root!

--hOcCNbCCxyk/YU74
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

The problem is that ptal-mlcd is running as a non-root user and is
trying to use iopl() to grant itself permission to directly mess with
the parallel IO port. iopl() only works for root.

Looks like this bug only affects parallel printers.

The iopl() man page says "Permissions are inherited by fork and exec.",
so one solution may be to make the iopl() call from the init script.
Which, BTW, needs a dose of "use English;". What the hell is this mess?

$( =3D $) =3D "$gpw[2] $gpw[2] $agpw[2]";
$< =3D $> =3D $upw[2];

That's just line noise!

One other solution is to run ptal-mlcd as root, then get it to drop
privileges itself after calling iopl(). This is probably the
best/neatest solution but also the more difficult one to implement.
--=20
Sam "Eddie" Couter | mailto:<email address hidden>
Debian Developer | mailto:<email address hidden>
                    | jabber:<email address hidden>
OpenPGP fingerprint: A46B 9BB5 3148 7BEA 1F05 5BD5 8530 03AE DE89 C75C

--hOcCNbCCxyk/YU74
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

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

iD8DBQFDIpuyhTADrt6Jx1wRArzQAJ4upfeYg59luD2vTnWYkPHUsfuzKQCfWNRo
01ReAlmPUjTpnR0knTxufkw=
=ann2
-----END PGP SIGNATURE-----

--hOcCNbCCxyk/YU74--

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 22 Sep 2005 08:51:55 -0400
From: Mark Horn <email address hidden>
To: <email address hidden>
Subject: Re: Bug#321666 acknowledged by developer (fixed in hpoj-0.91-6)

reopen 321666
stop

This bug recurred for me in hpoj-0.91-8. I have (again) reverted
back to hpoj/testing (0.91-4) and printing is again working.

On Thu, Sep 01, 2005 at 10:03:15AM -0700, Debian Bug Tracking System wrote:
> This bug was fixed with the upload of hpoj-0.91-6.
>
> If not, please reply and reopen.
>
> Mark

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sat, 10 Dec 2005 08:57:29 -0500
From: Mark Horn <email address hidden>
To: <email address hidden>
Subject: Bug still exists. Is not fixed.

found 321666 0.91-9
stop

This bug still exists in 0.91-9. Again, reverting to 0.91-4 allows
the printer to work.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.