diff --git a/debian/build/drivers/staging/usbip/Makefile b/debian/build/drivers/staging/usbip/Makefile index ef35f0737..e895461b7 100644 --- a/debian/build/drivers/staging/usbip/Makefile +++ b/debian/build/drivers/staging/usbip/Makefile @@ -10,7 +10,7 @@ all: mkdir -p userspace cd userspace && $(srcdir)/configure \ --prefix=/usr \ - --with-tcp-wrappers=no \ + --with-tcp-wrappers \ --with-usbids-dir=/usr/share/misc \ --disable-shared $(MAKE) -C userspace diff --git a/debian/changelog b/debian/changelog index 4252096bf..35488b755 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ linux-tools (3.2.17-1) UNRELEASED; urgency=low * Build usbip userland packages (Closes: #568362) - Do not build a shared library package; the API and ABI have changed from libusbip0 but there has been no upstream soversion change + * usbipd: Enable TCP wrappers for access control -- Ben Hutchings Sat, 09 Jun 2012 19:56:44 +0100 diff --git a/debian/patches/series b/debian/patches/series index cc090d7df..f2b52bb65 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,5 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch usbip-update-man-pages.patch +usbip-fix-explicit-configure-with-tcp-wrappers.patch +usbip-document-tcp-wrappers.patch diff --git a/debian/patches/usbip-document-tcp-wrappers.patch b/debian/patches/usbip-document-tcp-wrappers.patch new file mode 100644 index 000000000..617ddd86f --- /dev/null +++ b/debian/patches/usbip-document-tcp-wrappers.patch @@ -0,0 +1,27 @@ +From: Ben Hutchings +Subject: usbip: Document TCP wrappers + +Add references to TCP wrappers configuration in the manual page. + +--- a/drivers/staging/usbip/userspace/doc/usbipd.8 ++++ b/drivers/staging/usbip/userspace/doc/usbipd.8 +@@ -14,7 +14,8 @@ + before usbipd makes them available to other hosts. + + The daemon accepts connections from USB/IP clients +-on TCP port 3240. ++on TCP port 3240. The clients authorised to connect may be ++configured as documented in hosts_access(5). + + .SH OPTIONS + .HP +@@ -39,7 +40,8 @@ + + .B usbipd + offers no authentication or authorization for USB/IP. Any +-USB/IP client can connect and use exported devices. ++USB/IP client running on an authorised host can connect and ++use exported devices. + + .SH EXAMPLES + diff --git a/debian/patches/usbip-fix-explicit-configure-with-tcp-wrappers.patch b/debian/patches/usbip-fix-explicit-configure-with-tcp-wrappers.patch new file mode 100644 index 000000000..20d7e9c18 --- /dev/null +++ b/debian/patches/usbip-fix-explicit-configure-with-tcp-wrappers.patch @@ -0,0 +1,37 @@ +From: Ben Hutchings +Subject: usbip: Fix explicit configure --with-tcp-wrappers + +If the --with-tcp-wrappers[=yes] option is given and the wrap library +checks out, we currently add '-lwrap' to $LIBS but then reset it to +$saved_LIBS. In fact there is no need to save and restore $LIBS here +because failure is fatal. $wrap_LIB is also unused, so don't set that +either. + +--- a/drivers/staging/usbip/userspace/configure.ac ++++ b/drivers/staging/usbip/userspace/configure.ac +@@ -56,8 +56,7 @@ + [AS_HELP_STRING([--with-tcp-wrappers], + [use the libwrap (TCP wrappers) library])], + dnl [ACTION-IF-GIVEN] +- [saved_LIBS="$LIBS" +- if test "$withval" = "yes"; then ++ [if test "$withval" = "yes"; then + AC_MSG_RESULT([yes]) + AC_MSG_CHECKING([for hosts_access in -lwrap]) + LIBS="-lwrap $LIBS" +@@ -65,13 +64,11 @@ + [int hosts_access(); int allow_severity, deny_severity;], + [hosts_access()], + [AC_MSG_RESULT([yes]); +- AC_DEFINE([HAVE_LIBWRAP], [1], +- [use tcp wrapper]) wrap_LIB="-lwrap"], ++ AC_DEFINE([HAVE_LIBWRAP], [1], [use tcp wrapper])], + [AC_MSG_RESULT([not found]); exit 1]) + else + AC_MSG_RESULT([no]) +- fi +- LIBS="$saved_LIBS"], ++ fi], + dnl [ACTION-IF-NOT-GIVEN] + [AC_MSG_RESULT([(default)]) + AC_MSG_CHECKING([for hosts_access in -lwrap]) diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 38ea5e236..6fe36dcaa 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -7,6 +7,6 @@ Standards-Version: 3.9.2 Build-Depends: debhelper (>> 7), python, asciidoc, binutils-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, python-dev, xmlto, - autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev + autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/