summarylogtreecommitdiffstats
path: root/install_pl.patch
blob: 394c0c029891214167170d8a8566ad6e69af5c82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
Common subdirectories: fwsnort-1.6.8/deps and fwsnort-1.6.8-2/deps
diff -u fwsnort-1.6.8/fwsnort.conf fwsnort-1.6.8-2/fwsnort.conf
--- fwsnort-1.6.8/fwsnort.conf	2018-07-31 20:45:56.000000000 -0400
+++ fwsnort-1.6.8-2/fwsnort.conf	2021-08-05 15:26:33.058823615 -0400
@@ -59,10 +59,10 @@
 ### variables, one per line). Note that by default the update IP's for
 ### Emerging Threats ruleset downloads are whitelisted:
 ## Name:   rules.emergingthreats.net
-## Address: 96.43.137.99
+## Address: 52.5.252.216
 ## Name:   rules.emergingthreats.net
-## Address: 204.12.217.19
-WHITELIST               96.43.137.99, 204.12.217.19;
+## Address: 52.1.74.181
+WHITELIST               52.5.252.216, 52.1.74.181;
 
 ### Use the BLACKLIST variable to define a list of hosts/networks
 ### that for which fwsnort should DROP or REJECT all traffic.  For
@@ -106,18 +106,18 @@
 IPT_BACKUP_SAVE_FILE    $STATE_DIR/iptables.save; ### iptables policy backup
 
 ### system binaries
-shCmd                   /bin/sh;
-catCmd                  /bin/cat;
-grepCmd                 /bin/grep;
-echoCmd                 /bin/echo;
-tarCmd                  /bin/tar;
+shCmd                   /usr/bin/sh;
+catCmd                  /usr/bin/cat;
+grepCmd                 /usr/bin/grep;
+echoCmd                 /usr/bin/echo;
+tarCmd                  /usr/bin/tar;
 wgetCmd                 /usr/bin/wget;
 unameCmd                /usr/bin/uname;
-ifconfigCmd             /sbin/ifconfig;
-ipCmd                   /sbin/ip;
-iptablesCmd             /sbin/iptables;
-iptables-saveCmd        /sbin/iptables-save;
-iptables-restoreCmd     /sbin/iptables-restore;
-ip6tablesCmd            /sbin/ip6tables;
-ip6tables-saveCmd       /sbin/ip6tables-save;
-ip6tables-restoreCmd    /sbin/ip6tables-restore;
+ifconfigCmd             /usr/bin/ifconfig;
+ipCmd                   /usr/bin/ip;
+iptablesCmd             /usr/bin/iptables;
+iptables-saveCmd        /usr/bin/iptables-save;
+iptables-restoreCmd     /usr/bin/iptables-restore;
+ip6tablesCmd            /usr/bin/ip6tables;
+ip6tables-saveCmd       /usr/bin/ip6tables-save;
+ip6tables-restoreCmd    /usr/bin/ip6tables-restore;
diff -u fwsnort-1.6.8/install.pl fwsnort-1.6.8-2/install.pl
--- fwsnort-1.6.8/install.pl	2018-07-31 20:45:56.000000000 -0400
+++ fwsnort-1.6.8-2/install.pl	2021-08-05 15:31:20.845968975 -0400
@@ -36,7 +36,7 @@
 #========================= config ========================
 my $fwsnort_conf_file = 'fwsnort.conf';
 
-my $sbin_dir     = '/usr/sbin';
+my $sbin_dir     = '/usr/bin';
 my $install_root = '/';
 
 my $update_website = 'www.emergingthreats.net';
@@ -45,19 +45,15 @@
 my $perlCmd = '/usr/bin/perl';
 my $makeCmd = '/usr/bin/make';
 my $wgetCmd = '/usr/bin/wget';
-my $gzipCmd = '/bin/gzip';
-my $tarCmd  = '/bin/tar';
+my $gzipCmd = '/usr/bin/gzip';
+my $tarCmd  = '/usr/bin/tar';
 #======================= end config ======================
 
 my %config = ();
 
 my @cmd_search_paths = qw(
-    /bin
-    /sbin
     /usr/bin
-    /usr/sbin
     /usr/local/bin
-    /usr/local/sbin
 );
 
 my %exclude_cmds = (
@@ -143,10 +139,6 @@
 ### make sure the system binaries are where we think they are.
 &check_commands();
 
-### check to make sure we are running as root
- die "You need to be root (or equivalent UID 0",
-    " account) to install/uninstall fwsnort!\n" unless &is_root();
-
 if ($uninstall) {
     &uninstall();
 } else {
@@ -168,10 +160,10 @@
         "sources directory." unless -e 'fwsnort' and -e 'fwsnort.conf';
 
     unless (-d $config{'CONF_DIR'}) {
-        &full_mkdir($config{'CONF_DIR'}, 0500);
+        &full_mkdir($config{'CONF_DIR'}, 0700);
     }
     unless (-d $config{'RULES_DIR'}) {
-        &full_mkdir($config{'RULES_DIR'}, 0500);
+        &full_mkdir($config{'RULES_DIR'}, 0700);
     }
 
     ### install perl modules
@@ -350,52 +342,11 @@
 
 sub install_manpage() {
     my $manpage = 'fwsnort.8';
-    ### remove old man page
-    unlink "/usr/local/man/man8/${manpage}" if
-        (-e "/usr/local/man/man8/${manpage}");
 
     ### default location to put the fwsnort man page, but check with
     ### /etc/man.config
-    my $mpath = '/usr/share/man/man8';
-    if (-e '/etc/man.config') {
-        ### prefer to install $manpage in /usr/local/man/man8 if
-        ### this directory is configured in /etc/man.config
-        open M, '< /etc/man.config' or
-            die "[*] Could not open /etc/man.config: $!";
-        my @lines = <M>;
-        close M;
-        ### prefer the path "/usr/share/man"
-        my $found = 0;
-        for my $line (@lines) {
-            chomp $line;
-            if ($line =~ m|^MANPATH\s+/usr/share/man|) {
-                $found = 1;
-                last;
-            }
-        }
-        ### try to find "/usr/local/man" if we didn't find /usr/share/man
-        unless ($found) {
-            for my $line (@lines) {
-                chomp $line;
-                if ($line =~ m|^MANPATH\s+/usr/local/man|) {
-                    $mpath = '/usr/local/man/man8';
-                    $found = 1;
-                    last;
-                }
-            }
-        }
-        ### if we still have not found one of the above man paths,
-        ### just select the first one out of /etc/man.config
-        unless ($found) {
-            for my $line (@lines) {
-                chomp $line;
-                if ($line =~ m|^MANPATH\s+(\S+)|) {
-                    $mpath = $1;
-                    last;
-                }
-            }
-        }
-    }
+    my $mpath = $config{'INSTALL_ROOT'}.'/usr/share/man/man8';
+
     &full_mkdir($mpath, 0755);
     my $mfile = "${mpath}/${manpage}";
     print "[+] Installing $manpage man page as $mfile\n";
Common subdirectories: fwsnort-1.6.8/lib and fwsnort-1.6.8-2/lib
Common subdirectories: fwsnort-1.6.8/packaging and fwsnort-1.6.8-2/packaging
Common subdirectories: fwsnort-1.6.8/patches and fwsnort-1.6.8-2/patches
Common subdirectories: fwsnort-1.6.8/test and fwsnort-1.6.8-2/test