Ethereal-dev: [ethereal-dev] Three small patches

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Peter Kjellerstedt <peter.kjellerstedt@xxxxxxxx>
Date: Thu, 10 Feb 2000 17:53:10 +0100
Hello.

Here are three small patches I would like to see applied.

The first patch just adds a line in the manuf file for the
company I work for (there is one already, but that one is for
our token ring products).

The second patch adds the configure option --enable-setuid-install
which installs ethereal and tethereal (and possibly ethereal_static)
setuid root. An option that at least I find very useful, though
definitely nothing that should be done by default ;)

The third patch modifies autogen.sh to run libtoolize so that
libtool works for people like me who still use version 1.3.3 of
libtool. It should be combined with the removal of config.guess
and ltconfig from the repository (as these are created by
libtoolize). Also, I would suggest removing libltdl/.cvsignore
from the repository so that the libltdl directory is removed
when one does a 'cvs up -Pd'.

//Peter
--- ./manuf.bak	Thu Feb 10 17:05:31 2000
+++ ./manuf	Thu Feb 10 12:05:56 2000
@@ -112,6 +112,7 @@
 00:20:35	IBM
 00:20:85	3Com
 00:20:af	3Com
+00:40:8c	Axis
 00:40:a6 	Cray
 00:40:c8	Milan
 00:50:56	VMware
--- ./configure.in.bak	Thu Feb 10 17:05:31 2000
+++ ./configure.in	Tue Feb  8 14:13:13 2000
@@ -15,6 +15,8 @@
 
 AM_INIT_AUTOMAKE(ethereal, 0.8.3)
 
+AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes)
+
 dnl Check for CPU / vendor / OS
 AC_CANONICAL_HOST
 
@@ -173,6 +175,17 @@
 	AC_ETHEREAL_IPV6_STACK
 fi
 
+
+dnl Check if ethereal should be installed setuid
+AC_ARG_ENABLE(setuid-install,
+[  --enable-setuid-install install ethereal as setuid.  [default=no]],,enable_setuid_install=no)
+
+AC_MSG_CHECKING(whether to install ethereal setuid)
+if test "x$enable_setuid_install" = "xno" ; then
+	AC_MSG_RESULT(no)
+else
+	AC_MSG_RESULT(yes)
+fi
 
 dnl Checks for header files.
 AC_HEADER_STDC
--- ./Makefile.am.bak	Thu Feb 10 17:05:30 2000
+++ ./Makefile.am	Thu Feb 10 17:22:27 2000
@@ -428,6 +428,13 @@
 	rdps.c			\
 	TODO
 
+if SETUID_INSTALL
+install-exec-hook:
+	-chmod +s $(DESTDIR)$(bindir)/ethereal
+	-chmod +s $(DESTDIR)$(bindir)/tethereal
+	-chmod +s $(DESTDIR)$(bindir)/ethereal_static
+endif
+
 #
 # Currently register.c can be included in the distribution because
 # we always build all protocol dissectors. We used to have to check
--- ./.cvsignore.bak	Thu Feb 10 17:05:30 2000
+++ ./.cvsignore	Thu Feb 10 16:56:16 2000
@@ -4,6 +4,7 @@
 Makefile.in
 aclocal.m4
 config.cache
+config.guess
 config.h
 config.h.in
 config.log
@@ -21,6 +22,8 @@
 ethereal.spec
 install-sh
 libtool
+ltconfig
+ltmain.sh
 missing
 mkinstalldirs
 ps.c
--- ./autogen.sh.bak	Thu Feb 10 17:05:30 2000
+++ ./autogen.sh	Thu Feb 10 16:52:42 2000
@@ -43,6 +43,8 @@
 	exit 1
 fi
 
+libtoolize --copy --force
+
 if test -z "$*"; then
 	echo "Running ./configure with no arguments. If you wish to pass any,"
 	echo "please specify them on the $0 command line."