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

Diff 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 | View Patch Patch

Revision 1.4 by jpp, Fri Mar 5 05:12:32 2021 UTC Revision 1.5 by jpp, Fri Mar 5 06:28:44 2021 UTC
# Line 1  Line 1 
1  diff -Nur e-smith-packetfilter-2.6.0.old/createlinks e-smith-packetfilter-2.6.0/createlinks  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  --- 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:52:55.378000000 -0500  +++ e-smith-packetfilter-2.6.0/createlinks      2021-03-05 01:25:40.537000000 -0500
4  @@ -21,18 +21,10 @@  @@ -21,18 +21,12 @@
5       safe_symlink("reload", "root/etc/e-smith/events/$_/services2adjust/masq");       safe_symlink("reload", "root/etc/e-smith/events/$_/services2adjust/masq");
6   }   }
7    
# Line 11  diff -Nur e-smith-packetfilter-2.6.0.old Line 11  diff -Nur e-smith-packetfilter-2.6.0.old
11  -    # But, after the bootstrap-console has had a chance to configure masq  -    # But, after the bootstrap-console has had a chance to configure masq
12  -    masq       => "36",  -    masq       => "36",
13  -);  -);
14  -  +my $event ="e-smith-packetfilter-update";
15    +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ulogd");
16    +event_link("systemd-reload", $event, "89");
17    +event_link("systemd-default", $event, "88");
18    +templates2events("/etc/logrotate.d/ulogd", $event);
19    
20  -foreach my $service (keys %service2order)  -foreach my $service (keys %service2order)
21  -{  -{
22  -# removed for systemd  -# removed for systemd
23  -#    service_link_enhanced($service, $service2order{$service}, 7);  -#    service_link_enhanced($service, $service2order{$service}, 7);
24  -}  -}
 +my $event ="e-smith-packetfilter-update";  
 +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ulogd");  
 +event_link("systemd-reload", $event, "89");  
 +event_link("systemd-default", $event, "88");  
25    
26   #systemd   #systemd
27   foreach my $target (qw(multi-user sme-server))   foreach my $target (qw(multi-user sme-server))
28  @@ -41,6 +33,7 @@  @@ -41,6 +35,7 @@
29    
30   foreach my $unit (qw(   foreach my $unit (qw(
31           masq.service           masq.service
# Line 47  diff -Nur e-smith-packetfilter-2.6.0.old Line 48  diff -Nur e-smith-packetfilter-2.6.0.old
48  +++ e-smith-packetfilter-2.6.0/root/etc/e-smith/db/configuration/force/ulogd/status     2021-03-04 16:39:04.280000000 -0500  +++ e-smith-packetfilter-2.6.0/root/etc/e-smith/db/configuration/force/ulogd/status     2021-03-04 16:39:04.280000000 -0500
49  @@ -0,0 +1 @@  @@ -0,0 +1 @@
50  +enabled  +enabled
51  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  diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/logrotate.d/ulogd/50log e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/logrotate.d/ulogd/50log
52  --- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/basic      2008-10-07 13:36:41.000000000 -0400  --- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/logrotate.d/ulogd/50log       1969-12-31 19:00:00.000000000 -0500
53  +++ e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/basic  2021-03-05 00:12:05.938000000 -0500  +++ e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/logrotate.d/ulogd/50log   2021-03-05 01:22:20.009000000 -0500
54  @@ -1,12 +1,125 @@  @@ -0,0 +1,23 @@
55   [global]  +/var/log/ulogd/ulogd.log  {
56   nlgroup=1  +    missingok
57  -logfile=/dev/stdout  +    notifempty
58    +    weekly
59    +    compress
60    +    sharedscripts
61    +    postrotate
62    +        /usr/bin/systemctl reload ulogd  > /dev/null 2>&1
63    +    endscript
64    +}
65    +
66    +/var/log/iptables/*.log {
67    +    missingok
68    +    notifempty
69    +    daily
70    +    compress
71    +    sharedscripts
72    +    postrotate
73    +        /usr/bin/systemctl reload ulogd  > /dev/null 2>&1
74    +    endscript
75    +}
76    +
77    +
78    diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/10global e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/10global
79    --- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/10global   1969-12-31 19:00:00.000000000 -0500
80    +++ e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/10global       2021-03-05 00:42:31.135000000 -0500
81    @@ -0,0 +1,7 @@
82    +[global]
83    +nlgroup=1
84  +logfile=/var/log/ulogd/ulogd.log  +logfile=/var/log/ulogd/ulogd.log
85   loglevel=5  +loglevel=5
86   rmem=131071  +rmem=131071
87   bufsize=150000  +bufsize=150000
88    +
89    diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/20plugins e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/20plugins
90    --- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/20plugins  1969-12-31 19:00:00.000000000 -0500
91    +++ e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/20plugins      2021-03-05 00:46:44.053000000 -0500
92    @@ -0,0 +1,38 @@
93  +  +
94  +######################################################################  +######################################################################
95  +# PLUGIN OPTIONS  +# PLUGIN OPTIONS
# Line 68  diff -Nur e-smith-packetfilter-2.6.0.old Line 100  diff -Nur e-smith-packetfilter-2.6.0.old
100  +# 0. don't specify any plugin for ulogd to load them all  +# 0. don't specify any plugin for ulogd to load them all
101  +# 1. load the plugins _first_ from the global section  +# 1. load the plugins _first_ from the global section
102  +# 2. options for each plugin in seperate section below  +# 2. options for each plugin in seperate section below
103   plugin={ -f "/usr/lib64/ulogd/ulogd_BASE.so" ? "/usr/lib64/ulogd/ulogd_BASE.so" : "/usr/lib/ulogd/ulogd_BASE.so" }  +
  plugin={ -f "/usr/lib64/ulogd/ulogd_LOGEMU.so" ? "/usr/lib64/ulogd/ulogd_LOGEMU.so" : "/usr/lib/ulogd/ulogd_LOGEMU.so" }  
   
 +{  
104  +#plugin="/usr/lib64/ulogd/ulogd_inppkt_NFLOG.so"  +#plugin="/usr/lib64/ulogd/ulogd_inppkt_NFLOG.so"
105  +#plugin="/usr/lib64/ulogd/ulogd_inppkt_ULOG.so"  +plugin="/usr/lib64/ulogd/ulogd_inppkt_ULOG.so"
106  +#plugin="/usr/lib64/ulogd/ulogd_inppkt_UNIXSOCK.so"  +#plugin="/usr/lib64/ulogd/ulogd_inppkt_UNIXSOCK.so"
107  +#plugin="/usr/lib64/ulogd/ulogd_inpflow_NFCT.so"  +#plugin="/usr/lib64/ulogd/ulogd_inpflow_NFCT.so"
108  +#plugin="/usr/lib64/ulogd/ulogd_filter_IFINDEX.so"  +#plugin="/usr/lib64/ulogd/ulogd_filter_IFINDEX.so"
109  +#plugin="/usr/lib64/ulogd/ulogd_filter_IP2STR.so"  +plugin="/usr/lib64/ulogd/ulogd_filter_IP2STR.so"
110  +#plugin="/usr/lib64/ulogd/ulogd_filter_IP2BIN.so"  +#plugin="/usr/lib64/ulogd/ulogd_filter_IP2BIN.so"
111  +#plugin="/usr/lib64/ulogd/ulogd_filter_IP2HBIN.so"  +#plugin="/usr/lib64/ulogd/ulogd_filter_IP2HBIN.so"
112  +#plugin="/usr/lib64/ulogd/ulogd_filter_PRINTPKT.so"  +plugin="/usr/lib64/ulogd/ulogd_filter_PRINTPKT.so"
113  +#plugin="/usr/lib64/ulogd/ulogd_filter_HWHDR.so"  +#plugin="/usr/lib64/ulogd/ulogd_filter_HWHDR.so"
114  +#plugin="/usr/lib64/ulogd/ulogd_filter_PRINTFLOW.so"  +#plugin="/usr/lib64/ulogd/ulogd_filter_PRINTFLOW.so"
115  +#plugin="/usr/lib64/ulogd/ulogd_filter_MARK.so"  +#plugin="/usr/lib64/ulogd/ulogd_filter_MARK.so"
116  +#plugin="/usr/lib64/ulogd/ulogd_output_LOGEMU.so"  +plugin="/usr/lib64/ulogd/ulogd_output_LOGEMU.so"
117  +#plugin="/usr/lib64/ulogd/ulogd_output_SYSLOG.so"  +#plugin="/usr/lib64/ulogd/ulogd_output_SYSLOG.so"
118  +#plugin="/usr/lib64/ulogd/ulogd_output_XML.so"  +#plugin="/usr/lib64/ulogd/ulogd_output_XML.so"
119  +#plugin="/usr/lib64/ulogd/ulogd_output_SQLITE3.so"  +#plugin="/usr/lib64/ulogd/ulogd_output_SQLITE3.so"
# Line 94  diff -Nur e-smith-packetfilter-2.6.0.old Line 123  diff -Nur e-smith-packetfilter-2.6.0.old
123  +#plugin="/usr/lib64/ulogd/ulogd_output_PGSQL.so"  +#plugin="/usr/lib64/ulogd/ulogd_output_PGSQL.so"
124  +#plugin="/usr/lib64/ulogd/ulogd_output_MYSQL.so"  +#plugin="/usr/lib64/ulogd/ulogd_output_MYSQL.so"
125  +#plugin="/usr/lib64/ulogd/ulogd_output_DBI.so"  +#plugin="/usr/lib64/ulogd/ulogd_output_DBI.so"
126  +#plugin="/usr/lib64/ulogd/ulogd_raw2packet_BASE.so"  +plugin="/usr/lib64/ulogd/ulogd_raw2packet_BASE.so"
127  +#plugin="/usr/lib64/ulogd/ulogd_inpflow_NFACCT.so"  +#plugin="/usr/lib64/ulogd/ulogd_inpflow_NFACCT.so"
128  +#plugin="/usr/lib64/ulogd/ulogd_output_GRAPHITE.so"  +#plugin="/usr/lib64/ulogd/ulogd_output_GRAPHITE.so"
129  +#plugin="/usr/lib64/ulogd/ulogd_output_JSON.so"  +#plugin="/usr/lib64/ulogd/ulogd_output_JSON.so"
130  +  +
131  +# this is a stack for logging packet send by system via LOGEMU  diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/30stacks e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/30stacks
132  +#stack=log1:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU  --- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/30stacks   1969-12-31 19:00:00.000000000 -0500
133  +  +++ e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/30stacks       2021-03-05 00:47:14.410000000 -0500
134  +# this is a stack for packet-based logging via LOGEMU  @@ -0,0 +1,4 @@
135  +#stack=log2:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU  +
136  +  +#our base stack ULOG to LOGEMU
137  +# this is a stack for ULOG packet-based logging via LOGEMU  +stack=ulog1:ULOG,base1:BASE,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU
138  +#stack=ulog1:ULOG,base1:BASE,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU  +
139  +  diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/40configs e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/40configs
140  +# this is a stack for packet-based logging via LOGEMU with filtering on MARK  --- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/40configs  1969-12-31 19:00:00.000000000 -0500
141  +#stack=log2:NFLOG,base1:BASE,mark1:MARK,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU  +++ e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/40configs      2021-03-05 00:58:54.684000000 -0500
142  +  @@ -0,0 +1,10 @@
143  +# this is a stack for packet-based logging via GPRINT  +[ulog1]
144  +#stack=log1:NFLOG,gp1:GPRINT  +# denylog:
145  +  +# netlink multicast group (the same as the iptables --ulog-nlgroup param)
146  +# this is a stack for flow-based logging via LOGEMU  +nlgroup=1
 +#stack=ct1:NFCT,ip2str1:IP2STR,print1:PRINTFLOW,emu1:LOGEMU  
147  +  +
 +# this is a stack for flow-based logging via GPRINT  
 +#stack=ct1:NFCT,gp1:GPRINT  
148  +  +
149  +# this is a stack for flow-based logging via XML  +[emu1]
150  +#stack=ct1:NFCT,xml1:XML  +file="/var/log/iptables/ulogd.syslogemu"
151  +  +sync=1
 +# this is a stack for logging in XML  
 +#stack=log1:NFLOG,xml1:XML  
 +  
 +# this is a stack for accounting-based logging via XML  
 +#stack=acct1:NFACCT,xml1:XML  
 +  
 +# this is a stack for accounting-based logging to a Graphite server  
 +#stack=acct1:NFACCT,graphite1:GRAPHITE  
 +  
 +# this is a stack for NFLOG packet-based logging to PCAP  
 +#stack=log2:NFLOG,base1:BASE,pcap1:PCAP  
 +  
 +# this is a stack for logging packet to MySQL  
 +#stack=log2:NFLOG,base1:BASE,ifi1:IFINDEX,ip2bin1:IP2BIN,mac2str1:HWHDR,mysql1:MYSQL  
 +  
 +# this is a stack for logging packet to PGsql after a collect via NFLOG  
 +#stack=log2:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,mac2str1:HWHDR,pgsql1:PGSQL  
 +  
 +# this is a stack for logging packet to JSON formatted file after a collect via NFLOG  
 +#stack=log2:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,mac2str1:HWHDR,json1:JSON  
 +  
 +# this is a stack for logging packets to syslog after a collect via NFLOG  
 +#stack=log3:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,sys1:SYSLOG  
 +  
 +# this is a stack for logging packets to syslog after a collect via NuFW  
 +#stack=nuauth1:UNIXSOCK,base1:BASE,ip2str1:IP2STR,print1:PRINTPKT,sys1:SYSLOG  
 +  
 +# this is a stack for flow-based logging to MySQL  
 +#stack=ct1:NFCT,ip2bin1:IP2BIN,mysql2:MYSQL  
 +  
 +# this is a stack for flow-based logging to PGSQL  
 +#stack=ct1:NFCT,ip2str1:IP2STR,pgsql2:PGSQL  
 +  
 +# this is a stack for flow-based logging to PGSQL without local hash  
 +#stack=ct1:NFCT,ip2str1:IP2STR,pgsql3:PGSQL  
 +  
 +# this is a stack for flow-based logging to SQLITE3  
 +#stack=ct1:NFCT,sqlite3_ct:SQLITE3  
 +  
 +# this is a stack for logging packet to SQLITE3  
 +#stack=log1:NFLOG,sqlite3_pkt:SQLITE3  
 +  
 +# this is a stack for flow-based logging in NACCT compatible format  
 +#stack=ct1:NFCT,ip2str1:IP2STR,nacct1:NACCT  
 +  
 +# this is a stack for accounting-based logging via GPRINT  
 +#stack=acct1:NFACCT,gp1:GPRINT  
 +  
 + $OUT="";  
152  +  +
153  +}  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
154   [LOGEMU]  --- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/basic      2008-10-07 13:36:41.000000000 -0400
155    +++ e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/basic  1969-12-31 19:00:00.000000000 -0500
156    @@ -1,12 +0,0 @@
157    -[global]
158    -nlgroup=1
159    -logfile=/dev/stdout
160    -loglevel=5
161    -rmem=131071
162    -bufsize=150000
163    -plugin={ -f "/usr/lib64/ulogd/ulogd_BASE.so" ? "/usr/lib64/ulogd/ulogd_BASE.so" : "/usr/lib/ulogd/ulogd_BASE.so" }
164    -plugin={ -f "/usr/lib64/ulogd/ulogd_LOGEMU.so" ? "/usr/lib64/ulogd/ulogd_LOGEMU.so" : "/usr/lib/ulogd/ulogd_LOGEMU.so" }
165    -
166    -[LOGEMU]
167  -file="/dev/stdout"  -file="/dev/stdout"
168  +file="/var/log/iptables/ulogd.syslogemu"  -sync=1
169   sync=1  diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/yum/post-actions/ulogd.action e-smith-packetfilter-2.6.0/root/etc/yum/post-actions/ulogd.action
170    --- e-smith-packetfilter-2.6.0.old/root/etc/yum/post-actions/ulogd.action       1969-12-31 19:00:00.000000000 -0500
171    +++ e-smith-packetfilter-2.6.0/root/etc/yum/post-actions/ulogd.action   2021-03-05 01:28:09.563000000 -0500
172    @@ -0,0 +1 @@
173    +ulogd:any:/sbin/e-smith/expand-template /etc/logrotate.d/ulogd
174  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  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
175  --- 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  --- 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
176  +++ 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  +++ 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
# Line 187  diff -Nur e-smith-packetfilter-2.6.0.old Line 180  diff -Nur e-smith-packetfilter-2.6.0.old
180  +  +
181  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  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
182  --- e-smith-packetfilter-2.6.0.old/root/usr/lib/systemd/system/ulogd.service    1969-12-31 19:00:00.000000000 -0500  --- e-smith-packetfilter-2.6.0.old/root/usr/lib/systemd/system/ulogd.service    1969-12-31 19:00:00.000000000 -0500
183  +++ e-smith-packetfilter-2.6.0/root/usr/lib/systemd/system/ulogd.service        2021-03-04 23:58:38.429000000 -0500  +++ e-smith-packetfilter-2.6.0/root/usr/lib/systemd/system/ulogd.service        2021-03-05 01:14:55.420000000 -0500
184  @@ -0,0 +1,18 @@  @@ -0,0 +1,17 @@
185  +[Unit]  +[Unit]
186  +Description=Netfilter Userspace Logging Daemon  +Description=Netfilter Userspace Logging Daemon
187  +Before=masq.service  +Before=masq.service
# Line 201  diff -Nur e-smith-packetfilter-2.6.0.old Line 194  diff -Nur e-smith-packetfilter-2.6.0.old
194  +Type=forking  +Type=forking
195  +  +
196  +PIDFile=/run/ulog/ulogd.pid  +PIDFile=/run/ulog/ulogd.pid
197  +#ExecStart=/usr/sbin/ulogd --daemon --uid ulog --pidfile /run/ulog/ulogd.pid  +ExecStart=/usr/sbin/ulogd --daemon --uid ulog --pidfile /run/ulog/ulogd.pid
198  +ExecStart=/usr/sbin/ulogd --daemon  --pidfile /run/ulog/ulogd.pid  +ExecReload=/bin/kill -HUP $MAINPID
 +#ExecStart=/usr/sbin/ulogd --daemon  
199  +  +
200  +[Install]  +[Install]
201  +WantedBy=sme-server.target multi-user.target  +WantedBy=sme-server.target multi-user.target


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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