Comment 7 for bug 19907

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--