Package: dsniff
Version: 2.4b1+debian-29
Severity: minor

The Debian patch 35_Add_CPPFLAGS.patch, here for reference:

  
https://salsa.debian.org/pkg-security-team/dsniff/blob/debian/master/debian/patches/35_Add_CPPFLAGS.patch

with this as the original, it seems:

  
https://salsa.debian.org/pkg-security-team/dsniff/blob/51bae4fcbaec532409e0c8a1bed7c450cca57d2b/debian/patches/34_Add_CPPFLAGS.patch

...changes Makefile.in's libdir from $(prefix)/share/dsniff to @libdir@,
among other things.

That 'libdir' does not do what one would expect: it is the destination
path for some config files, specifically dnsspoof.hosts, dsniff.magic,
and dsniff.services, _not_ for shared libraries.  So currently those
config files get put into /usr/lib/x86_64-linux-gnu/ or similar.

Ironically, patch 20_debian_dirs.patch sets libdir to
$(prefix)/share/dsniff, so this particular hunk of 35 undoes that.

I'd suggest changing back to $(prefix)/share/dsniff, and renaming libdir
to avoid confusion; perhaps use 'sharedir' so that it doesn't get
accidentally fixed again in the future.  Below is a patch that does
that.

Note, I'm not actually a Debian user; I encountered this when working to
borrow Debian's patches to dsniff for OpenSSL 1.1.x compatibility for
Gentoo (thanks!), and found the config files had moved.  There may be
some line number fuzz in the below as a result.


diff -urP dsniff-2.4.orig/Makefile.in dsniff-2.4/Makefile.in
--- dsniff-2.4.orig/Makefile.in 2019-01-17 16:11:25.546048937 -0700
+++ dsniff-2.4/Makefile.in      2019-01-17 16:56:37.218243360 -0700
@@ -11,12 +11,12 @@
 install_prefix  =
 prefix          = @prefix@
 exec_prefix    = @exec_prefix@
-libdir         = @libdir@
+sharedir       = $(prefix)/share/dsniff
 sbindir         = @sbindir@
 mandir         = @mandir@
 
 CC     = @CC@
-CFLAGS = @CFLAGS@ -DDSNIFF_LIBDIR=\"$(libdir)/\"
+CFLAGS = @CFLAGS@ -DDSNIFF_LIBDIR=\"$(sharedir)/\"
 CPPFLAGS = @CPPFLAGS@
 LDFLAGS        = @LDFLAGS@
 
@@ -157,10 +157,10 @@
        for file in $(PROGS); do \
           $(INSTALL_PROGRAM) -m 755 $$file $(install_prefix)$(sbindir); \
        done
-       test -d $(install_prefix)$(libdir) || \
-          $(INSTALL) -d $(install_prefix)$(libdir)
+       test -d $(install_prefix)$(sharedir) || \
+          $(INSTALL) -d $(install_prefix)$(sharedir)
        for file in $(CONFIGS); do \
-          $(INSTALL_DATA) $$file $(install_prefix)$(libdir); \
+          $(INSTALL_DATA) $$file $(install_prefix)$(sharedir); \
        done
        test -d $(install_prefix)$(mandir)/man8 || \
           $(INSTALL) -d $(install_prefix)$(mandir)/man8

Attachment: signature.asc
Description: Digital signature

Reply via email to