Commit Graph

13381 Commits

Author SHA1 Message Date
Stefan Schantl
376595057b ids.cgi: Always write config files for enabled/disabled rule files
If a single sid has been activated and then disabled without doing
any other ruleset modifications only one of the oinkmaster files
for enabled / disabled rules has been modified.

In this case it was possible, that the same sid, was part of the
file for enabled rules and part of the file for disabled rules at the
same time.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:45:02 +02:00
Stefan Schantl
466c67794b ids.cgi: Process enabled rulefiles in an own loop
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:44:48 +02:00
Stefan Schantl
603334734a ids.cgi: Drop enabled/disabled rules from cgiparams hash
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:44:32 +02:00
Stefan Schantl
b65b5ef377 ids.cgi: Drop enabled rulefile from cgiparams hash after processing
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:44:12 +02:00
Stefan Schantl
e573807983 ids.cgi: Re-add code for enable/disable rulefiles
The enabled rulefiles (rule categories) now will be added
to an own file, which will be included by the snort main config
file.

This will allow us to update snort and push the new main config file
without loosing the activated rulesets anymore.

* Introducing snort-used-rulefiles.conf

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:43:36 +02:00
Stefan Schantl
0b89daee93 ids.cgi: Code cleanup
* Drop a lot of unused variables and code.
* Re-ordering some code parts.
* Add a lot of comments.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:43:22 +02:00
Stefan Schantl
298723b9db ids.cgi: Re-add code to save the ruleset.
The manually enabled or disabled rules by the user now will be written
to own config files, which will be used by oinkmaster to keep these rules
in the same state after a rules update has been performed.

In short words, if you adjust your ruleset, the changes will not be lost
again if you perform an update of your ruleset.

* Grabbing and storing the cgi values now in an own hash (%cgiparams)
* Introducing oinkmaster config files for enabled and disabled rules.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:43:05 +02:00
Stefan Schantl
0b568bb965 ids.cgi: Drop unused css code
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:42:09 +02:00
Stefan Schantl
177266446a ids.cgi: Rework code for displaying the single rules
The complete ruleset will be grouped as categories by it's
corresponding rulefile and printed in hidden tables.

They easiely can be displayed by klicking on the show link and
vice-versa.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:41:55 +02:00
Stefan Schantl
f7fcd1c020 ids.cgi: Always display ruleset
Display the rule categories any time and do not hide them
if no instance of snort is runing.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:41:31 +02:00
Stefan Schantl
e3ab140634 ids.cgi: Remove comment lines for snort rules control
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:41:15 +02:00
Stefan Schantl
3da6e01bcf ids.cgi: Refactor reading-in rule files.
Move the code for reading and parsing the snort rule files
into an own subfunction.

* Drop code for reading in and modifying the snort main config file.
* Rework code for parsing and adding the snort rules to the snortrules hash.
* Drop code for gathering a description for the rule files, which does not
  because of a file layout change and sadly there is not suitable description
  shipped anymore by the snort team.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:40:51 +02:00
Stefan Schantl
a70d269a9a ids.cgi: Move function to end of file
Move the function for doing the page refresh stuff to the end of the file and
do some layout changes for better reading the code.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:40:30 +02:00
Stefan Schantl
422204ff08 ids.cgi: Use pure perl for directory listing
Use pure perl for getting the filelist of available
rule files instead of using a sub-shell and unix commands.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:40:27 +02:00
Stefan Schantl
fbd430172f ids.cgi: Drop old code for uploading a ruleset
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:39:40 +02:00
Michael Tremer
de7c8df83e cdrom: Move list of EFI modules to lfs/cdrom
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-25 10:54:35 +01:00
Michael Tremer
0efda7ac67 cdrom: Re-order arguments again
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-23 23:10:36 +01:00
Michael Tremer
5d657243cf cdrom: The order of arguments for mkisofs seems to be relevant
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-22 22:31:30 +01:00
Arne Fitzenreiter
5dd9140a44 grub: apply vga fallback disable patch again
on some systems (e.g. J1900 based) grub detects a too low resolution
and use it. This is no problem in grub itself but the kernel not render
the consoles in this mode.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-07-22 13:41:38 +02:00
Arne Fitzenreiter
948d660c10 syslinux: update i586 rootfile
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-07-21 16:39:46 +02:00
Arne Fitzenreiter
9023689d73 flash-images: fix partition layout on i586
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-07-21 16:33:29 +02:00
Stefan Schantl
ca745a2978 Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next 2018-07-21 14:14:53 +02:00
Michael Tremer
4e4c122c58 aws: Add support for a script that can be executed at first boot
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-20 16:19:46 +01:00
Michael Tremer
ba06294341 aws: Always exit the init script cleanly
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-20 16:05:15 +01:00
Michael Tremer
04441d8a3c asterisk: Don't optimise for builder
Asterisk enables -march=native which renders the code
incompatible to most systems.

Fixes: #11793

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-20 14:22:59 +00:00
Michael Tremer
a570226765 Merge branch 'next' into efi 2018-07-20 12:47:20 +00:00
Michael Tremer
011204d963 fireinfo: Import latest patches
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-20 12:06:11 +00:00
Michael Tremer
12034118dd installer: Run install-bootloader script instead of own code
This allows us to keep the GRUB installation routine in one
place only.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-20 12:03:10 +00:00
Michael Tremer
6cf5a533f5 partresize: Remove debugging line
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-20 12:03:10 +00:00
Michael Tremer
43829df3bb partresize: Only regenerate configuration instead of re-installing GRUB
This should not be necessary

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-20 12:03:09 +00:00
Michael Tremer
befc040497 Move update-bootloader script into installer
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-20 12:03:09 +00:00
Michael Tremer
eadde44b05 update-bootloader: Allow passing device to install GRUB on
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-20 12:03:09 +00:00
Michael Tremer
c1397b7ab3 update-bootloader: Extend script to support EFI
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-20 12:03:09 +00:00
Arne Fitzenreiter
46a4581db6 flash-image: use FAT for /boot partition on aarch64
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-07-20 12:24:49 +01:00
Arne Fitzenreiter
f8f4ef0795 Merge branch 'next' into efi
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>

Conflicts:
	config/kernel/kernel.config.aarch64-ipfire
2018-07-20 12:24:31 +01:00
Stefan Schantl
b5ea63f85c Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next 2018-07-19 18:10:23 +02:00
Arne Fitzenreiter
413149f80d kernel: aarch64: enable virtio drivers
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-07-19 13:26:06 +01:00
Arne Fitzenreiter
0487a49fec u-boot: boot aarch64 kernel without -multi extension
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-07-19 09:29:44 +01:00
Arne Fitzenreiter
66a29eaa02 kernel: apply multi arch patchset for aarch64
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-07-19 09:28:27 +01:00
Michael Tremer
3deac294f5 cdrom: mkisofs seems to not like the order of the arguments
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-16 22:35:21 +01:00
Michael Tremer
479d82d1b8 Rootfile update
We don't have EFI on i586

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-16 22:31:11 +01:00
Michael Tremer
6a7e6b4499 AWS: Give setup user permissions to read its own SSH keys
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-14 15:06:39 +01:00
Michael Tremer
87d7fc6609 aws: Unlock setup account
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-14 14:20:18 +01:00
Michael Tremer
53eb49180e aws: Install SSH keys only for setup user
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-14 14:20:18 +01:00
Michael Tremer
e2d9fe7e16 aws: setup user should not be a system user
Login is not permitted for system users

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-14 14:20:18 +01:00
Michael Tremer
37dc79434a kernel: Enable EFI on aarch64
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-14 14:05:09 +01:00
Michael Tremer
a5c92f50bf flash-images: Only install grub for EFI on aarch64
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-14 13:43:54 +01:00
Michael Tremer
092bc105e4 cdrom: Run isohybrid only when we have syslinux
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-14 13:43:54 +01:00
Michael Tremer
a1eb776199 cdrom: Fix building GRUB image for aarch64
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-14 13:43:53 +01:00
Michael Tremer
4790db5f95 cdrom: Install ISOLINUX only on some architectures
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-14 13:43:53 +01:00