aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2017-09-26 22:54:24 +0100
committerJoão Valverde <j@v6e.pt>2017-10-17 18:48:46 +0000
commit1d238ec636ff051635a7ed194df5c49752788d69 (patch)
treefc39200f1661b3064eaeb9ec92859c0c87b1d3f7
parentca7f204576d43e36275dad02cbf6e414447df03d (diff)
autotools: Remove setuid-root.pl
It seems to be some sort of development helper, and since CMake doesn't use it presumably it is not useful anymore. Change-Id: I23e4ab24199f21310ebd09064c3ae53e48673e4d Reviewed-on: https://code.wireshark.org/review/23945 Petri-Dish: Gerald Combs <gerald@wireshark.org> Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: João Valverde <j@v6e.pt>
-rw-r--r--.gitignore1
-rw-r--r--tools/Makefile.am14
-rw-r--r--tools/setuid-root.pl.in78
3 files changed, 0 insertions, 93 deletions
diff --git a/.gitignore b/.gitignore
index 2d2b6e4d29..49e13c9027 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,7 +54,6 @@ plugin.c
plugins/mate/mate_parser.c
version.h
tools/lemon/lemon
-tools/setuid-root.pl
tshark-tap-register.c
wiretap/ascend.c
wiretap/ascend.h
diff --git a/tools/Makefile.am b/tools/Makefile.am
index cff8ab3641..782f4b0113 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -85,7 +85,6 @@ EXTRA_DIST = \
rdps.py \
rpm_setup.sh \
runa2x.sh \
- setuid-root.pl.in \
test-common.sh \
test-captures.sh \
textify.ps1 \
@@ -101,18 +100,5 @@ EXTRA_DIST = \
ws-coding-style.cfg \
yacc.py
-noinst_SCRIPTS = setuid-root.pl
-
-setuid-root.pl: setuid-root.pl.in Makefile
- $(AM_V_SED)$(SED) \
- -e 's,@BIN_PREFIX\@,$(bindir),' \
- -e 's,@TSHARK_BIN\@,$(tshark_bin)$(EEXT),' \
- -e 's,@DUMPCAP_BIN\@,$(dumpcap_bin)$(EEXT),' \
- < $(srcdir)/setuid-root.pl.in > setuid-root.pl; \
- chmod +x setuid-root.pl
-
CLEANFILES = \
*.pyc
-
-DISTCLEANFILES = \
- setuid-root.pl
diff --git a/tools/setuid-root.pl.in b/tools/setuid-root.pl.in
deleted file mode 100644
index e9d06e0eba..0000000000
--- a/tools/setuid-root.pl.in
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/perl -w
-#
-# setuid-root - Enable/disable setuid for tshark and dumpcap.
-#
-# Copyright 2007, Luis Ontanon and Gerald Combs
-#
-# Wireshark - Network traffic analyzer
-# By Gerald Combs <gerald@wireshark.org>
-# Copyright 1998 Gerald Combs
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-sub usage() {
- die <<FIN
-Usage: $0 {enable|disable} [revert owner]
-
-Examples:
- $0 enable # Changes owner to root and enables setuid
- $0 disable # Changes owner to \$SUDO_USER and disables setuid
- $0 disable kurtv # Changes owner to kurtv and disables setuid
-FIN
-}
-
-$< == 0 or die "only root can run this script";
-
-$bin_prefix = "@BIN_PREFIX@";
-
-if ($#ARGV < 0) { usage(); }
-
-$command = shift;
-$command =~ tr/A-Z/a-z/;
-
-$tshark_bin = "@TSHARK_BIN@";
-$dumpcap_bin = "@DUMPCAP_BIN@";
-
-die "Don't know prefix path" if length($bin_prefix) < 1;
-die "Don't know tshark binary name" if length($tshark_bin) < 1;
-die "Don't know dumpcap binary name" if length($dumpcap_bin) < 1;
-
-$revert_owner = "";
-if ($#ARGV >= 0) {
- $revert_owner = shift;
-}
-
-if (length($revert_owner) < 1 && length($ENV{SUDO_USER}) > 0) {
- $revert_owner = $ENV{SUDO_USER};
-}
-
-if ($command eq "enable") {
- system("chown root $bin_prefix/$tshark_bin");
- system("chown root $bin_prefix/$dumpcap_bin");
- system("chmod ug+s $bin_prefix/$tshark_bin");
- system("chmod ug+s $bin_prefix/$dumpcap_bin");
- exit 0;
-}
-
-if ($command eq "disable"){
- system("chmod ug-s $bin_prefix/$tshark_bin");
- system("chmod ug-s $bin_prefix/$dumpcap_bin");
- die "Can't revert owner" if length($revert_owner) < 1;
- system("chown $revert_owner $bin_prefix/$tshark_bin");
- system("chown $revert_owner $bin_prefix/$dumpcap_bin");
- exit(0);
-}
-
-usage();