[Python-modules-commits] r33115 - in packages/pyudev/trunk/debian (4 files)

fgeyer at users.alioth.debian.org fgeyer at users.alioth.debian.org
Fri Jun 26 16:25:04 UTC 2015


    Date: Friday, June 26, 2015 @ 16:25:03
  Author: fgeyer
Revision: 33115

* Fix unsafe library loading. (Closes: #722573)
  - Add libudev_loading.diff

Added:
  packages/pyudev/trunk/debian/patches/
  packages/pyudev/trunk/debian/patches/libudev_loading.diff
  packages/pyudev/trunk/debian/patches/series
Modified:
  packages/pyudev/trunk/debian/changelog

Modified: packages/pyudev/trunk/debian/changelog
===================================================================
--- packages/pyudev/trunk/debian/changelog	2015-06-26 13:14:01 UTC (rev 33114)
+++ packages/pyudev/trunk/debian/changelog	2015-06-26 16:25:03 UTC (rev 33115)
@@ -1,6 +1,8 @@
 pyudev (0.16.1-3) UNRELEASED; urgency=medium
 
   * Update the watch file.
+  * Fix unsafe library loading. (Closes: #722573)
+    - Add libudev_loading.diff
 
  -- Felix Geyer <fgeyer at debian.org>  Sun, 22 Mar 2015 13:24:34 +0100
 

Added: packages/pyudev/trunk/debian/patches/libudev_loading.diff
===================================================================
--- packages/pyudev/trunk/debian/patches/libudev_loading.diff	                        (rev 0)
+++ packages/pyudev/trunk/debian/patches/libudev_loading.diff	2015-06-26 16:25:03 UTC (rev 33115)
@@ -0,0 +1,18 @@
+Description: Hardcode the libudev SONAME that the package depends on.
+ This makes sure that we don't load an untested ABI.
+Bu-Debian: https://bugs.debian.org/722573
+
+--- a/pyudev/_libudev.py
++++ b/pyudev/_libudev.py
+@@ -267,10 +267,7 @@
+ 
+     Raise :exc:`~exceptions.ImportError`, if the udev library was not found.
+     """
+-    udev_library_name = find_library('udev')
+-    if not udev_library_name:
+-        raise ImportError('No library named udev')
+-    libudev = CDLL(udev_library_name, use_errno=True)
++    libudev = CDLL('libudev.so.1', use_errno=True)
+     # context function signature
+     for namespace, members in SIGNATURES.items():
+         for funcname in members:

Added: packages/pyudev/trunk/debian/patches/series
===================================================================
--- packages/pyudev/trunk/debian/patches/series	                        (rev 0)
+++ packages/pyudev/trunk/debian/patches/series	2015-06-26 16:25:03 UTC (rev 33115)
@@ -0,0 +1 @@
+libudev_loading.diff




More information about the Python-modules-commits mailing list