Your message dated Tue, 04 Sep 2007 14:02:03 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#440804: fixed in expect 5.43.0-12
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: expect
Version: 5.43.0-8build1

I tried to use in a chroot without /proc mounted and it dumped core.
Debugging it revealed that it uses the `ttyname' library call without
checking whether it worked.

The attached patch arranges that in this situation expect will print
an error message to stderr and exit nonzero, rather than coredumping.

This is not ideal but the code structure didn't seem to permit another
easy answer (the error handling in this area is generally not very
good I think) and this situation is (I think) supposed only to happen
in very pathological situations so I think bombing out is less
unacceptable.

Regards,
Ian.

--- expect-5.43.0/pty_termios.c~        2004-05-07 17:46:03.000000000 +0100
+++ expect-5.43.0/pty_termios.c 2007-09-04 11:14:09.000000000 +0100
@@ -366,6 +366,17 @@
 #define W_OK 02
 #endif
 
+static int ttyname_checked(int fd) {
+       const char *result;
+       result= ttyname(fd);
+       if (!result) {
+               perror("expect: pty_termios: system configuration problem:"
+                      " ttyname() failed");
+               exit(-1);
+       }
+       return result;
+}
+
 int
 exp_getptymaster()
 {
@@ -451,7 +462,7 @@
        master = open("/dev/ptc",O_RDWR);
        if (master >= 0) {
                /* never fails */
-               slave_name = ttyname(master);
+               slave_name = ttyname_checked(master);
        }
        exp_pty_slave_name = slave_name;
        return(master);
@@ -472,7 +483,7 @@
                close(slave);
                return -1;
        }
-       strcpy(slave_name, ttyname(slave));
+       strcpy(slave_name, ttyname_checked(slave));
        exp_pty_slave_name = slave_name;
        close(slave);
        return master;


--- End Message ---
--- Begin Message ---
Source: expect
Source-Version: 5.43.0-12

We believe that the bug you reported is fixed in the latest version of
expect, which is due to be installed in the Debian FTP archive:

expect-dev_5.43.0-12_i386.deb
  to pool/main/e/expect/expect-dev_5.43.0-12_i386.deb
expect_5.43.0-12.diff.gz
  to pool/main/e/expect/expect_5.43.0-12.diff.gz
expect_5.43.0-12.dsc
  to pool/main/e/expect/expect_5.43.0-12.dsc
expect_5.43.0-12_i386.deb
  to pool/main/e/expect/expect_5.43.0-12_i386.deb
expectk_5.43.0-12_i386.deb
  to pool/main/e/expect/expectk_5.43.0-12_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <[EMAIL PROTECTED]> (supplier of updated expect package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue,  4 Sep 2007 15:47:00 +0200
Source: expect
Binary: expect expectk expect-dev
Architecture: source i386
Version: 5.43.0-12
Distribution: unstable
Urgency: low
Maintainer: Daniel Baumann <[EMAIL PROTECTED]>
Changed-By: Daniel Baumann <[EMAIL PROTECTED]>
Description: 
 expect     - A program that can automate interactive applications
 expect-dev - A program that can automate interactive applications (development
 expectk    - A program that can automate interactive applications (Tk hooks)
Closes: 440804
Changes: 
 expect (5.43.0-12) unstable; urgency=low
 .
   * Applied patch from Ian Jackson <[EMAIL PROTECTED]> to check before call
     ttyname, so don't coredump in chroots without /proc (Closes: #440804).
Files: 
 db0e6543cb75f4541eb6b2f2feaa4879 641 interpreters optional expect_5.43.0-12.dsc
 bb4260636e19469152351bc02ba304ec 40072 interpreters optional 
expect_5.43.0-12.diff.gz
 e44888acd526063d16593d29b2d8fe69 315078 interpreters optional 
expect_5.43.0-12_i386.deb
 5a8356b41111b3a7cae0af3a04819bc4 90254 interpreters optional 
expectk_5.43.0-12_i386.deb
 d0943c6d258b034725907dfc46743884 276948 interpreters optional 
expect-dev_5.43.0-12_i386.deb

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

iD8DBQFG3WQs+C5cwEsrK54RAs9sAJ9nuZf5/8RHxmyPAOcfd0+s9EK00QCdGCo+
j1nTD4qoUF4oN8a2AYSo7zI=
=SNNB
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to