ada-mode_3.6-3_i386.changes ACCEPTED

2009-01-22 Thread Debian Installer

Accepted:
ada-mode_3.6-3.diff.gz
  to pool/main/a/ada-mode/ada-mode_3.6-3.diff.gz
ada-mode_3.6-3.dsc
  to pool/main/a/ada-mode/ada-mode_3.6-3.dsc
ada-mode_3.6-3_all.deb
  to pool/main/a/ada-mode/ada-mode_3.6-3_all.deb


Override entries for your package:
ada-mode_3.6-3.dsc - source editors
ada-mode_3.6-3_all.deb - optional editors

Announcing to debian-devel-chan...@lists.debian.org


Thank you for your contribution to Debian.


-- 
To UNSUBSCRIBE, email to debian-qa-packages-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Processing of ada-mode_3.6-3_i386.changes

2009-01-22 Thread Archive Administrator
ada-mode_3.6-3_i386.changes uploaded successfully to localhost
along with the files:
  ada-mode_3.6-3.dsc
  ada-mode_3.6-3.diff.gz
  ada-mode_3.6-3_all.deb

Greetings,

Your Debian queue daemon


-- 
To UNSUBSCRIBE, email to debian-qa-packages-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#512657: bogl: mark internal-use file descriptors close-on-exec

2009-01-22 Thread Colin Watson
Package: bogl
Version: 0.1.18-2
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch jaunty

bterm leaks several of the file descriptors it uses internally to its
child process. This is messy and could potentially lead to some
interesting bugs. How does the attached patch look, which marks internal
file descriptors as close-on-exec? I think I've hit the right set of fds
here.

Thanks,

-- 
Colin Watson   [cjwat...@ubuntu.com]
  * Set many internal file descriptors close-on-exec, to avoid leaking them
to the program called by bterm.

diff -Nru bogl-0.1.18/bogl-bgf.c bogl-0.1.18/bogl-bgf.c
--- bogl-0.1.18/bogl-bgf.c	2001-12-01 17:04:42.0 +
+++ bogl-0.1.18/bogl-bgf.c	2009-01-22 13:38:58.0 +
@@ -20,6 +20,9 @@
   if (fd == -1)
 return 0;
 
+  if (bogl_cloexec(fd) < 0)
+return 0;
+
   if (fstat(fd, &buf))
 return 0;
 
diff -Nru bogl-0.1.18/bogl.c bogl-0.1.18/bogl.c
--- bogl-0.1.18/bogl.c	2006-10-20 21:11:19.0 +0100
+++ bogl-0.1.18/bogl.c	2009-01-22 13:40:39.0 +
@@ -124,12 +124,16 @@
 fb = open ("/dev/fb/0", O_RDWR);
   if (fb < 0)
 return bogl_fail ("opening /dev/fb0: %s", strerror (errno));
+  if (bogl_cloexec (fb) < 0)
+return bogl_fail ("setting /dev/fb0 close-on-exec: %s", strerror (errno));
 
   tty = open ("/dev/tty0", O_RDWR);
   if (tty < 0)
 tty = open ("/dev/vc/0", O_RDWR);
   if (tty < 0)
 return bogl_fail ("opening /dev/tty0: %s", strerror (errno));
+  if (bogl_cloexec (tty) < 0)
+return bogl_fail ("setting /dev/tty0 close-on-exec: %s", strerror (errno));
 
   if (-1 == ioctl (tty, VT_GETSTATE, &vts))
 return bogl_fail ("can't get VT state: %s", strerror (errno));
@@ -630,3 +634,19 @@
 
   return 0;
 }
+
+/* Set a file descriptor to close-on-exec. */
+int
+bogl_cloexec(int fd)
+{
+  int flags;
+
+  flags = fcntl (fd, F_GETFD);
+  if (flags < 0)
+return flags;
+
+  if (fcntl (fd, F_SETFD, flags | FD_CLOEXEC) < 0)
+return -1;
+
+  return 0;
+}
diff -Nru bogl-0.1.18/boglP.h bogl-0.1.18/boglP.h
--- bogl-0.1.18/boglP.h	2001-12-01 17:04:42.0 +
+++ bogl-0.1.18/boglP.h	2009-01-22 13:38:26.0 +
@@ -25,4 +25,6 @@
 
 int bogl_fail (const char *, ...);
 
+int bogl_cloexec (int fd);
+
 #endif /* boglP_h */
diff -Nru bogl-0.1.18/boml.c bogl-0.1.18/boml.c
--- bogl-0.1.18/boml.c	2005-09-21 18:15:33.0 +0100
+++ bogl-0.1.18/boml.c	2009-01-22 13:43:23.0 +
@@ -614,6 +614,10 @@
   fd = open ("/dev/gpmdata", O_RDONLY | O_NONBLOCK);
   if (fd < 0)
 return 0;
+  if (bogl_cloexec (fd) < 0) {
+close (fd);
+return 0;
+  }
   
   /* Poll the mouse whether or not we could find gpm, in
  case it starts up later; but keep searching in that case. */
@@ -640,6 +644,10 @@
   fd = open("/dev/input/mice", O_RDONLY | O_NONBLOCK);
   if(fd < 0)
 return;
+  if (bogl_cloexec(fd) < 0) {
+close(fd);
+return;
+  }
 
   add_mouse(T_PS2, fd);
 }
@@ -659,6 +667,10 @@
   fd = open ("/dev/psaux", O_RDWR | O_NONBLOCK);
   if (fd < 0)
 return;
+  if (bogl_cloexec (fd) < 0) {
+close (fd);
+return;
+  }
 
   write (fd, s2, sizeof s2);
   usleep (3);
@@ -695,6 +707,10 @@
   int fd = open ("/dev/inportbm", O_RDONLY | O_NONBLOCK);
   if (fd < 0)
 return;
+  if (bogl_cloexec (fd) < 0) {
+close (fd);
+return;
+  }
 
   add_mouse (T_MS_BUS, fd);
 }
@@ -707,6 +723,10 @@
   int fd = open ("/dev/adbmouse", O_RDONLY | O_NONBLOCK);
   if (fd < 0)
 return;
+  if (bogl_cloexec (fd) < 0) {
+close (fd);
+return;
+  }
 
   add_mouse (T_ADB, fd);
 }
@@ -721,6 +741,10 @@
   int fd = open ("/dev/sunmouse", O_RDONLY | O_NONBLOCK);
   if (fd < 0)
 return;
+  if (bogl_cloexec (fd) < 0) {
+close (fd);
+return;
+  }
 
   add_mouse (T_SUN, fd);
 }
@@ -978,6 +1002,11 @@
   fd = open (port, O_RDWR | O_NONBLOCK);
   if (fd < 0)
 return fd;
+  if (bogl_cloexec (fd) < 0)
+{
+  close (fd);
+  return -1;
+}
 
   /* Reset file so it is no longer in non-blocking mode. */
   if (fcntl (fd, F_SETFL, 0) < 0)