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?
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
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 Disposition: inline Transfer- Encoding: quoted-printable
Content-Type: text/plain; charset=us-ascii
Content-
Content-
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
| jabber:<email address hidden>
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>
OpenPGP fingerprint: A46B 9BB5 3148 7BEA 1F05 5BD5 8530 03AE DE89 C75C
--hOcCNbCCxyk/YU74 pgp-signature; name="signature .asc" Description: Digital signature Disposition: inline
Content-Type: application/
Content-
Content-
-----BEGIN PGP SIGNATURE-----
Drt6Jx1wRArzQAJ 4upfeYg59luD2vT nWYkPHUsfuzKQCf WNRo knTxufkw=
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFDIpuyhTA
01ReAlmPUjTpnR0
=ann2
-----END PGP SIGNATURE-----
--hOcCNbCCxyk/ YU74--