15715 Commits

Author SHA1 Message Date
Qhilm
8d3d648035 Corrected link to IANA DHCPv6 Options documentation 2023-09-11 14:59:00 +02:00
Franco Fichtner
a8c348cfa4 system: cron parameters are escaped properly nowadays
This is allowed nowadays with the proper escaping in the
template employed.  However...

1. The parameter"s" are enforced by doing white-space
separated passing of individiual parts, but that breaks
backend scripts expecting either spaces to be part of
the parmeter or discarding additional parameters.

This matters, because...

2. https://docs.opnsense.org/manual/settingsmenu.html#cron
does not state any two parameter value of interest to
users apart from custom Cron glue.

I'd rather have "parameters" treated as a single first
parameter which can be passed with a %s to the shell, but
I'm unsure if configd will treat it that way?  At least
the crontab part would not be the issue.

Let's test this theory:

  # cat src/opnsense/service/conf/actions.d/actions_test.conf
  [shell]
  command:/bin/csh -c
  parameters:%s
  message:Running %s
  type:script_output
  description:Shell execution (use with care)

  # configctl test shell "echo foo"
  Parameter mismatch

  # configctl test shell "echo\ foo"
  foo

  # configctl test shell "echo\ foo;echo\ bar"
  foo
  bar

So there seems to be a mishandling of spaces in general
which is probably why the parameters are treated as such
in the crontab file.  Perhaps we need to discuss this.
2023-09-11 11:56:08 +02:00
Franco Fichtner
36d250f929 mvc: style 2023-09-11 09:32:46 +02:00
Franco Fichtner
b020480ee7 mvc: fix blankdesc test 2023-09-11 09:19:56 +02:00
Franco Fichtner
e79898bcbd ipsec: pet the translation, remove local/remote to only have one string to translate 2023-09-11 08:38:36 +02:00
Monviech
fcc266107d
VPN/IPSec - Add local_port and remote_port to VPN: IPsec: Connections [new] (#6835) 2023-09-09 22:58:52 +02:00
Franco Fichtner
252870b6c0 dhcp: style 2023-09-08 13:36:08 +02:00
Franco Fichtner
4b69625a4a pluginctl: allow -f mode to drop config properties; closes #6834 2023-09-08 09:26:30 +02:00
Franco Fichtner
b3c3b7a0c2 pluginctl: improve the print behavour for #6834
Now an empty node name '' will stay on the same node allowing to
dump the full config.xml for whatever reason.  Also change the
empty print behaviour to omit the spurious newline as that looks
better.  Last but not least pretty-print JSON for better UX.
2023-09-08 08:06:29 +02:00
Franco Fichtner
ff0b85f7e5 dhcp: clean up the messages in the radvd config header #6819 2023-09-07 20:32:49 +02:00
Franco Fichtner
6fbe6ca189 src: sweep over bootstrap update
Windows line endings...
2023-09-07 16:58:16 +02:00
Franco Fichtner
2e0f00b603 system: style change 2023-09-07 16:55:47 +02:00
Ad Schellevis
dd9854f111 core/css - upgrade bootstrap-select to v1.13.18, remove the version number from the css file as well (needs changes in the plugins as well).
source https://github.com/snapappointments/bootstrap-select/tree/v1.13.18/dist
2023-09-07 15:03:20 +02:00
Franco Fichtner
2f87d58f9a system: /usr/sbin/nologin seems to be the authoritative one 2023-09-07 14:31:12 +02:00
Ad Schellevis
8a8b6ff2d6 System: Settings: Logging / targets - simplify tls handling and handle rfc5424 consistently. closes https://github.com/opnsense/core/issues/6813 2023-09-07 14:14:05 +02:00
Franco Fichtner
73b6e048ac openvpn: help text styling 2023-09-07 10:10:32 +02:00
Franco Fichtner
31593b1e6f system: small refactor for clarity 2023-09-07 09:36:04 +02:00
Franco Fichtner
97b08eec0c system: kill the unused "alert" "interval"
The terminology is confusing -- it's just a poll interval in
dpinger's alert thread like we have in gateway watcher (also
defaulting to 1 second).  Since we do not want to expose
such values to the GUI without a pressing reason we better
do it this way than add more knobs that make support harder
and expectations less clear (reaction time suffers quickly when
increasing this value).

While here disable the alert thread completely in dpinger which
seems to be steered by passing the loss and delay.  Also adjust
the default for the loss interval which is calculated by dpinger
as 4 times the probe interval, so the default was wrong also.
2023-09-07 09:28:04 +02:00
Franco Fichtner
ea2f63bddd system: fix pid kill regression in #6825 2023-09-07 09:24:09 +02:00
Franco Fichtner
4b153a375a system: performance part 2; closes #6825
Under ideal circumstances (non-SIGKILL) the PID file and socket
are removed cleanly so they don't show up as readabe sockets in
dpinger_status().  When we kill the process the socket is there
but the open fails immediately.  That only leaves a stuck process
not reacting to open, but we can deal with that by decreating the
timeout a bit more (from 3 to 1 seconds per socket).  We still
want a sort of sensible timeout here that isn't too short and
assume that a system not being able to respond in time is having
other (and more criticial) issues to cope with.
2023-09-07 08:56:55 +02:00
Franco Fichtner
cb584cc171 system: gateway bindings cleanup
return_gateway_groups_array() is not used anymore, but leave it
in 23.7 so that 24.1 picks this up automatically.
2023-09-07 08:45:44 +02:00
Franco Fichtner
a2ab96833d system: avoid plugin system for native dpinger scripts fetching dpinger_status() #6825 2023-09-07 08:45:44 +02:00
Franco Fichtner
943b3fcf2c system: tweak previous also skipping unusable gateways 2023-09-07 08:45:44 +02:00
Ad Schellevis
2207bd2634 VPN: IPsec: Connections [new] - Allow the use of eap_id = %any . closes https://github.com/opnsense/core/issues/6824 (missed a spot) 2023-09-07 08:26:25 +02:00
Franco Fichtner
25e0a41fc7 ipsec: small help text update 2023-09-07 07:44:48 +02:00
Ad Schellevis
e6da85918d VPN: IPsec: Connections [new] - Allow the use of eap_id = %any . closes https://github.com/opnsense/core/issues/6824 2023-09-06 21:01:15 +02:00
Franco Fichtner
5e9f114ea0 dhcp: make dhcrelay code use the Gateways class
Stop using the opportunistic "wan" gateway and emit a
log entry on failing to derive a viable interface name.
It's already somewhat questionable if we should use a
default gateway, but the code is what it is.
2023-09-06 16:10:27 +02:00
Franco Fichtner
bf9cf03dc8 dhcp: 'if' from Gateways class returns the device
Which seems to be required. Fix the brokenness.
2023-09-06 14:55:20 +02:00
Franco Fichtner
dea3644296 dhcp: remove unused Gateways class 2023-09-06 14:33:23 +02:00
Franco Fichtner
3786caf568 system: do not mark defunct gw as disabled as well
gatewaysIndexedByName() -> do not omit when defunct
getDefaultGW() -> omit when defunct
getInterfaceGateway() -> omit when defunct (debatable)

Otherwise strip gatewaysIndexedByName(true) where the behaviour
was likely to try and get defunct gateways as well and fix the
dpinger code accordingly to get rid of raw config access.
2023-09-06 13:55:23 +02:00
Franco Fichtner
d417603918 make: ...and actually include it in a commit ;) 2023-09-06 13:46:53 +02:00
Franco Fichtner
f6b3beba40 make: move version info out of the way
Make merging easier for the main makefile.
2023-09-06 13:45:47 +02:00
Franco Fichtner
e7f19e43da openvpn: style 2023-09-06 13:16:58 +02:00
Franco Fichtner
673634970c system: kill hasGateways(), write DHCP router option unconditionally
It can be disabled and it might take some indeterministic behaviour
out of the situation.
2023-09-06 10:48:16 +02:00
Franco Fichtner
9ddfa876d5 system: small style update
groups, master.passwd and shells do not need updates.
2023-09-06 09:19:42 +02:00
Franco Fichtner
8324cdc467 system: update recovery pattern for /etc/ttys
Since Xen terminal is now part of the file rewrite the integration
slightly to enable/disable unconditionally and use the "onifconsole"
idiosyncrasy employed by FreeBSD.
2023-09-06 09:02:45 +02:00
Manuel Faux
a3d7592e03
OpenVPN Client Export: fix certificate list when CA specified (#6822)
When a different CA is specified for client certificate validation than
the server certificate's CA, a wrong list of certificates was shown in
the Client Export dialog.
2023-09-06 08:24:25 +02:00
Franco Fichtner
17cdb97707 src: strip all $FreeBSD$ tags to follow src.git 2023-09-06 08:20:29 +02:00
Franco Fichtner
b188e119da system: add Polish as release language with 83% complete 2023-09-05 13:48:05 +02:00
Franco Fichtner
c0d183bf88 mvc: strip Required=N for clarity discussed with @adschellevis
Clean up multiline descriptions as well. Also noticed the following but
for later since functional change:

% git grep -i "port.*IntegerField"
2023-09-05 11:11:04 +02:00
Franco Fichtner
13691791bb interfaces: AutoNumberField starts at 1 already
Fix description while at it.
2023-09-05 11:08:28 +02:00
Franco Fichtner
b04e1ca138 src: style sweep 2023-09-05 07:15:56 +02:00
Ad Schellevis
cca075cea2 VPN: OpenVPN: Instances - use new File::file_put_contents() wrapper 2023-09-04 21:08:00 +02:00
Ad Schellevis
1af1a491f0 plist 2023-09-04 20:51:06 +02:00
Ad Schellevis
58b2efccd5 UIbootgrid usage - use generic bytes formatter in pf_top, ipsec and openvpn. 2023-09-04 20:49:15 +02:00
Ad Schellevis
a3d74d84a1 mvc / uibootgrid - add bytes format to standard formatters list. 2023-09-04 20:47:56 +02:00
Ad Schellevis
8a4f77bbd1 Core/Config - Use new File::file_put_contents() method to enforce access rights on backups and set initial access rights of the backup dir upon creation. 2023-09-04 20:34:52 +02:00
Ad Schellevis
8b7f6bab4e Core - add File class incorporating a file_put_contents() alternative which handles access rights before writing the file. There may be some other file type utilities or patterns that are practical to reuse in which case we can add those here. 2023-09-04 20:32:28 +02:00
Ad Schellevis
54ebcb00c6 VPN: OpenVPN: Client Specific Overrides - add "route-gateway" advanced option which can be used to offer a different default gateway to the client when splitting the pool into smaller blocks. for https://github.com/opnsense/core/issues/6703 2023-09-04 11:45:37 +02:00
Manuel Faux
eafbf81b24
Fix IPsec key pair generator for secp256k1 EC and add properer naming to UI (#6817)
Key generation for the "256" EC does not work as secp256r1 does not
exist in OpenSSL, it's called secp256k1.

Also the names shown in the UI are ambiguous as there are several curves
with 256, 384 or 521 bits.
2023-09-02 16:43:12 +02:00