/[smeserver]/rpms/e-smith-packetfilter/sme10/e-smith-packetfilter-2.6.0bz11426-ulogd.patch
ViewVC logotype

Annotation of /rpms/e-smith-packetfilter/sme10/e-smith-packetfilter-2.6.0bz11426-ulogd.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Thu Mar 4 21:43:34 2021 UTC (3 years, 3 months ago) by jpp
Branch: MAIN
* Thu Mar 04 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-6.sme
- move ulogd to systemd [SME: 11426]
- require ulogd 2 [SME: 11426]

1 jpp 1.1 diff -Nur e-smith-packetfilter-2.6.0.old/createlinks e-smith-packetfilter-2.6.0/createlinks
2     --- e-smith-packetfilter-2.6.0.old/createlinks 2021-03-04 16:01:39.921000000 -0500
3     +++ e-smith-packetfilter-2.6.0/createlinks 2021-03-04 16:41:51.234000000 -0500
4     @@ -21,18 +21,8 @@
5     safe_symlink("reload", "root/etc/e-smith/events/$_/services2adjust/masq");
6     }
7    
8     -my %service2order =
9     -(
10     - # Set up the packet filter rules before bringing up networks.
11     - # But, after the bootstrap-console has had a chance to configure masq
12     - masq => "36",
13     -);
14     + safe_symlink("restart", "root/etc/e-smith/events/e-smith-packetfilter-update/services2adjust/ulogd");
15    
16     -foreach my $service (keys %service2order)
17     -{
18     -# removed for systemd
19     -# service_link_enhanced($service, $service2order{$service}, 7);
20     -}
21    
22     #systemd
23     foreach my $target (qw(multi-user sme-server))
24     @@ -41,6 +31,7 @@
25    
26     foreach my $unit (qw(
27     masq.service
28     + ulogd.service
29     ))
30     {
31     symlink("../$unit",
32     diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/db/configuration/defaults/ulogd/status e-smith-packetfilter-2.6.0/root/etc/e-smith/db/configuration/defaults/ulogd/status
33     --- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/db/configuration/defaults/ulogd/status 1969-12-31 19:00:00.000000000 -0500
34     +++ e-smith-packetfilter-2.6.0/root/etc/e-smith/db/configuration/defaults/ulogd/status 2021-03-04 16:38:38.292000000 -0500
35     @@ -0,0 +1 @@
36     +enabled
37     diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/db/configuration/defaults/ulogd/type e-smith-packetfilter-2.6.0/root/etc/e-smith/db/configuration/defaults/ulogd/type
38     --- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/db/configuration/defaults/ulogd/type 1969-12-31 19:00:00.000000000 -0500
39     +++ e-smith-packetfilter-2.6.0/root/etc/e-smith/db/configuration/defaults/ulogd/type 2021-03-04 16:38:26.949000000 -0500
40     @@ -0,0 +1 @@
41     +service
42     diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/db/configuration/force/ulogd/status e-smith-packetfilter-2.6.0/root/etc/e-smith/db/configuration/force/ulogd/status
43     --- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/db/configuration/force/ulogd/status 1969-12-31 19:00:00.000000000 -0500
44     +++ e-smith-packetfilter-2.6.0/root/etc/e-smith/db/configuration/force/ulogd/status 2021-03-04 16:39:04.280000000 -0500
45     @@ -0,0 +1 @@
46     +enabled
47     diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/basic e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/basic
48     --- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/basic 2008-10-07 13:36:41.000000000 -0400
49     +++ e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/basic 2021-03-04 16:34:43.379000000 -0500
50     @@ -1,12 +1,125 @@
51     [global]
52     nlgroup=1
53     -logfile=/dev/stdout
54     +logfile=/var/log/ulogd/ulogd.log
55     loglevel=5
56     rmem=131071
57     bufsize=150000
58     +
59     +######################################################################
60     +# PLUGIN OPTIONS
61     +######################################################################
62     +# We have to configure and load all the plugins we want to use
63     +# general rules:
64     +#
65     +# 0. don't specify any plugin for ulogd to load them all
66     +# 1. load the plugins _first_ from the global section
67     +# 2. options for each plugin in seperate section below
68     plugin={ -f "/usr/lib64/ulogd/ulogd_BASE.so" ? "/usr/lib64/ulogd/ulogd_BASE.so" : "/usr/lib/ulogd/ulogd_BASE.so" }
69     plugin={ -f "/usr/lib64/ulogd/ulogd_LOGEMU.so" ? "/usr/lib64/ulogd/ulogd_LOGEMU.so" : "/usr/lib/ulogd/ulogd_LOGEMU.so" }
70    
71     +{
72     +#plugin="/usr/lib64/ulogd/ulogd_inppkt_NFLOG.so"
73     +#plugin="/usr/lib64/ulogd/ulogd_inppkt_ULOG.so"
74     +#plugin="/usr/lib64/ulogd/ulogd_inppkt_UNIXSOCK.so"
75     +#plugin="/usr/lib64/ulogd/ulogd_inpflow_NFCT.so"
76     +#plugin="/usr/lib64/ulogd/ulogd_filter_IFINDEX.so"
77     +#plugin="/usr/lib64/ulogd/ulogd_filter_IP2STR.so"
78     +#plugin="/usr/lib64/ulogd/ulogd_filter_IP2BIN.so"
79     +#plugin="/usr/lib64/ulogd/ulogd_filter_IP2HBIN.so"
80     +#plugin="/usr/lib64/ulogd/ulogd_filter_PRINTPKT.so"
81     +#plugin="/usr/lib64/ulogd/ulogd_filter_HWHDR.so"
82     +#plugin="/usr/lib64/ulogd/ulogd_filter_PRINTFLOW.so"
83     +#plugin="/usr/lib64/ulogd/ulogd_filter_MARK.so"
84     +#plugin="/usr/lib64/ulogd/ulogd_output_LOGEMU.so"
85     +#plugin="/usr/lib64/ulogd/ulogd_output_SYSLOG.so"
86     +#plugin="/usr/lib64/ulogd/ulogd_output_XML.so"
87     +#plugin="/usr/lib64/ulogd/ulogd_output_SQLITE3.so"
88     +#plugin="/usr/lib64/ulogd/ulogd_output_GPRINT.so"
89     +#plugin="/usr/lib64/ulogd/ulogd_output_NACCT.so"
90     +#plugin="/usr/lib64/ulogd/ulogd_output_PCAP.so"
91     +#plugin="/usr/lib64/ulogd/ulogd_output_PGSQL.so"
92     +#plugin="/usr/lib64/ulogd/ulogd_output_MYSQL.so"
93     +#plugin="/usr/lib64/ulogd/ulogd_output_DBI.so"
94     +#plugin="/usr/lib64/ulogd/ulogd_raw2packet_BASE.so"
95     +#plugin="/usr/lib64/ulogd/ulogd_inpflow_NFACCT.so"
96     +#plugin="/usr/lib64/ulogd/ulogd_output_GRAPHITE.so"
97     +#plugin="/usr/lib64/ulogd/ulogd_output_JSON.so"
98     +
99     +# this is a stack for logging packet send by system via LOGEMU
100     +#stack=log1:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU
101     +
102     +# this is a stack for packet-based logging via LOGEMU
103     +#stack=log2:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU
104     +
105     +# this is a stack for ULOG packet-based logging via LOGEMU
106     +#stack=ulog1:ULOG,base1:BASE,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU
107     +
108     +# this is a stack for packet-based logging via LOGEMU with filtering on MARK
109     +#stack=log2:NFLOG,base1:BASE,mark1:MARK,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU
110     +
111     +# this is a stack for packet-based logging via GPRINT
112     +#stack=log1:NFLOG,gp1:GPRINT
113     +
114     +# this is a stack for flow-based logging via LOGEMU
115     +#stack=ct1:NFCT,ip2str1:IP2STR,print1:PRINTFLOW,emu1:LOGEMU
116     +
117     +# this is a stack for flow-based logging via GPRINT
118     +#stack=ct1:NFCT,gp1:GPRINT
119     +
120     +# this is a stack for flow-based logging via XML
121     +#stack=ct1:NFCT,xml1:XML
122     +
123     +# this is a stack for logging in XML
124     +#stack=log1:NFLOG,xml1:XML
125     +
126     +# this is a stack for accounting-based logging via XML
127     +#stack=acct1:NFACCT,xml1:XML
128     +
129     +# this is a stack for accounting-based logging to a Graphite server
130     +#stack=acct1:NFACCT,graphite1:GRAPHITE
131     +
132     +# this is a stack for NFLOG packet-based logging to PCAP
133     +#stack=log2:NFLOG,base1:BASE,pcap1:PCAP
134     +
135     +# this is a stack for logging packet to MySQL
136     +#stack=log2:NFLOG,base1:BASE,ifi1:IFINDEX,ip2bin1:IP2BIN,mac2str1:HWHDR,mysql1:MYSQL
137     +
138     +# this is a stack for logging packet to PGsql after a collect via NFLOG
139     +#stack=log2:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,mac2str1:HWHDR,pgsql1:PGSQL
140     +
141     +# this is a stack for logging packet to JSON formatted file after a collect via NFLOG
142     +#stack=log2:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,mac2str1:HWHDR,json1:JSON
143     +
144     +# this is a stack for logging packets to syslog after a collect via NFLOG
145     +#stack=log3:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,sys1:SYSLOG
146     +
147     +# this is a stack for logging packets to syslog after a collect via NuFW
148     +#stack=nuauth1:UNIXSOCK,base1:BASE,ip2str1:IP2STR,print1:PRINTPKT,sys1:SYSLOG
149     +
150     +# this is a stack for flow-based logging to MySQL
151     +#stack=ct1:NFCT,ip2bin1:IP2BIN,mysql2:MYSQL
152     +
153     +# this is a stack for flow-based logging to PGSQL
154     +#stack=ct1:NFCT,ip2str1:IP2STR,pgsql2:PGSQL
155     +
156     +# this is a stack for flow-based logging to PGSQL without local hash
157     +#stack=ct1:NFCT,ip2str1:IP2STR,pgsql3:PGSQL
158     +
159     +# this is a stack for flow-based logging to SQLITE3
160     +#stack=ct1:NFCT,sqlite3_ct:SQLITE3
161     +
162     +# this is a stack for logging packet to SQLITE3
163     +#stack=log1:NFLOG,sqlite3_pkt:SQLITE3
164     +
165     +# this is a stack for flow-based logging in NACCT compatible format
166     +#stack=ct1:NFCT,ip2str1:IP2STR,nacct1:NACCT
167     +
168     +# this is a stack for accounting-based logging via GPRINT
169     +#stack=acct1:NFACCT,gp1:GPRINT
170     +
171     + $OUT="";
172     +
173     +}
174     [LOGEMU]
175     -file="/dev/stdout"
176     +file="/var/log/ulogd/ulogd.syslogemu"
177     sync=1
178     diff -Nur e-smith-packetfilter-2.6.0.old/root/usr/lib/systemd/system/sme-server.target.d/53koozali.conf e-smith-packetfilter-2.6.0/root/usr/lib/systemd/system/sme-server.target.d/53koozali.conf
179     --- e-smith-packetfilter-2.6.0.old/root/usr/lib/systemd/system/sme-server.target.d/53koozali.conf 1969-12-31 19:00:00.000000000 -0500
180     +++ e-smith-packetfilter-2.6.0/root/usr/lib/systemd/system/sme-server.target.d/53koozali.conf 2021-03-04 16:36:47.274000000 -0500
181     @@ -0,0 +1,3 @@
182     +[Unit]
183     +Wants=ulogd.service
184     +
185     diff -Nur e-smith-packetfilter-2.6.0.old/root/usr/lib/systemd/system/ulogd.service e-smith-packetfilter-2.6.0/root/usr/lib/systemd/system/ulogd.service
186     --- e-smith-packetfilter-2.6.0.old/root/usr/lib/systemd/system/ulogd.service 1969-12-31 19:00:00.000000000 -0500
187     +++ e-smith-packetfilter-2.6.0/root/usr/lib/systemd/system/ulogd.service 2021-03-04 16:14:51.769000000 -0500
188     @@ -0,0 +1,11 @@
189     +[Unit]
190     +Description=Netfilter Userspace Logging Daemon
191     +Before=masq.service
192     +
193     +[Service]
194     +Type=forking
195     +PIDFile=/run/ulog/ulogd.pid
196     +ExecStart=/usr/sbin/ulogd --daemon --uid ulog --pidfile /run/ulog/ulogd.pid
197     +
198     +[Install]
199     +WantedBy=sme-server.target multi-user.target

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed