Comment 12 for bug 12337

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

Message-ID: <email address hidden>
Date: Sat, 5 Feb 2005 03:35:24 -0800
From: Steve Langasek <email address hidden>
To: <email address hidden>
Subject: Re: wvdial: doesn't initialize serial port correctly since last update

--C7Ke/meiCZutM6I/
Content-Type: multipart/mixed; boundary="SBT+cnFS/G3NVgv4"
Content-Disposition: inline

--SBT+cnFS/G3NVgv4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

tags 292618 +patch
thanks

The attached patch fixes WvModem::setup_modem to not treat it as a fatal
error when non-root users are unable to use the TIOCSSERIAL ioctl.

Incidentally, the other use of HAVE_LINUX_SERIAL_H in streams/wvmodem.cc
looks quite broken: there is no reason that declaration of the cfmakeraw()
function should be correlated with the presence of the linux/serial.h
header. Please add a proper autoconf check to detect cfmakeraw() support
separately instead of tacking it onto the check for a completely unrelated
header.

--=20
Steve Langasek
postmodern programmer

--SBT+cnFS/G3NVgv4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="wvstreams-292618.diff"
Content-Transfer-Encoding: quoted-printable

diff -u wvstreams-4.0.1/debian/changelog wvstreams-4.0.1/debian/changelog
--- wvstreams-4.0.1/debian/changelog
+++ wvstreams-4.0.1/debian/changelog
@@ -1,3 +1,12 @@
+wvstreams (4.0.1-1.3) unstable; urgency=3Dhigh
+
+ * Non-maintainer upload.
+ * High-urgency upload for sarge-targetted RC bugfix
+ * Fix WvModem::setup_modem to not expect TIOCSSERIAL to work if we're not
+ root. (Closes: #292618)
+
+ -- Steve Langasek <email address hidden> Sat, 5 Feb 2005 02:45:25 -0800
+
 wvstreams (4.0.1-1.2) unstable; urgency=3Dhigh
=20
   * NMU with maintainer's permission
only in patch2:
unchanged:
--- wvstreams-4.0.1.orig/streams/wvmodem.cc
+++ wvstreams-4.0.1/streams/wvmodem.cc
@@ -204,7 +204,7 @@
     sinfo.closing_wait =3D ASYNC_CLOSING_WAIT_NONE;
     sinfo.closing_wait2 =3D ASYNC_CLOSING_WAIT_NONE;
=20
- if (ioctl(getrfd(), TIOCSSERIAL, &sinfo) < 0)=20
+ if (ioctl(getrfd(), TIOCSSERIAL, &sinfo) < 0 && getuid() =3D=3D 0)=20
     {
  seterr("Cannot set information for serial port.");
  return;

--SBT+cnFS/G3NVgv4--

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

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

iD8DBQFCBK95KN6ufymYLloRAh4bAJ0c2qiw0aHkEcKr2saRwDbj4uJvaQCeIzgL
CydteLyj39pfG2LpSDYY+L8=
=1ctl
-----END PGP SIGNATURE-----

--C7Ke/meiCZutM6I/--