8918 Commits

Author SHA1 Message Date
大王叫我来巡山
a71aa5cea3
Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 65.0% (1089 of 1674 strings)
2024-09-25 06:15:49 +00:00
Burak Yavuz
94bcb7614d
Translated using Weblate (Turkish)
Currently translated at 100.0% (1674 of 1674 strings)
2024-09-25 06:15:48 +00:00
gallegonovato
c7a2a7fca5
Translated using Weblate (Spanish)
Currently translated at 100.0% (1674 of 1674 strings)
2024-09-25 06:15:48 +00:00
Sunil Mohan Adapa
373ca60f11
users: Increment app version for changes w.r.t. inactive users
- Since previous release 24.20 already has a increment to version 6, users app
version must be incremented in order for the changes related to inactive users
to take effect.

Tests:

- On applying the patches and running the service, upgrade to new app version
runs and succeeds. If there are inactive users presets, then before the setup()
privileged method is run, setup_and_sync_user_states() is run.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-09-24 14:28:25 -07:00
Veiko Aasa
761ee7d183
samba: Fix nmb systemd service is in erroneous state
Disable and mask the nmb service, which is alias to the already
disabled nmbd service.

Tests performed:
- Upgrading Samba app works.
- Systemd doesn't show nmb.service in erroneous state after upgrade.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-09-24 13:45:28 -07:00
James Valleroy
534b0d6eb0
d/tests: Add breaks-testbed restriction
This restriction is also used by systemd:
0992a823a4

This is another attempt to fix #2450.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-09-24 13:38:52 -07:00
James Valleroy
c6f7dec73c
ci: Run autopkgtest but allow failure
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-09-24 13:38:43 -07:00
James Valleroy
d8e82deb20
Revert "debian: tests: Wait for systemd-resolved to be started"
This reverts commit 618adefab794eb85018704ed97c871c3e1ae0b0e.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-09-24 13:38:34 -07:00
Sunil Mohan Adapa
4b2e065304
users: Set proper class on default password policy object
- Some trivial refactoring.

Tests:

- The default password policy works. Inactive users are unable to login via
console, SSH and cockpit.

- After the app is setup freshly and after it is upgraded from previous version,
the namedobject.schema has been ingested into the OpenLDAP configuration.

- Rerunning setup for users app works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-09-24 13:27:17 -07:00
Veiko Aasa
67b6c0f9e8
users: Inactivate users in LDAP user database
Previously, users were inactivated only in plinth users database. This change
adds ability to inactivate users in LDAP database.

Changes:
- Inactive users in plinth users database are also inactivated in LDAP
  during app upgrade.
- Inactivated users can't login using LDAP password.
- Apache2 single-sign-on module now requires LDAP connection. SSO
  sessions are now invalidated when users are inactivated.
- PAM/nslcd now performs authorization checks against LDAP, which means
  inactivated users can't do passwordless ssh logins and running their
  crontabs are blocked.
- When inactivating a user, all user's processes are killed.

Also, update LDAP diagnostics:
 - Fix LDAP checks returned always passed results.
 - Fix `ou=people` entry doesn't exist in LDAP.
 - Add diagnostics checks for `ou=policies` and `cn=DefaultPPolicy`.

Tests performed:
 - App upgrade works.
 - App upgrade with previously disabled user works, user is inactivated
   also in LDAP.
 - App upgrade with disabled user that doesn't exists in LDAP database works.
 - Increment app version again, to 7, app upgrade works second time.
 - Inactivate user and test logins:
   - can't login using direct LDAP (nextcloud, ejabberd, matrixsynapse)
   - can't login using Apache2 LDAP module (gitweb, ikiwiki, rssbridge,
     transmission)
   - can't login using apache sso module (featherwiki, gitweb, rssbridge,
     sharing, syncthing, tiddlywiki, transmission, wordpress).
   - can't login using ssh with password or passwordless
- Inactivate user and test exsisting sessions:
   - ssh, cockpit and samba sessions are killed.
   - Configure crontab, configured crontab is failing to run after user
     is inactivated.
- All the users app tests pass.

Notes:
- Only Apache2 SSO sessions are disabled. Apps that create their own
  sessions keep working, like nextcloud, ejabberd, matrix-synapse,
  ikiwiki. In the future, we could add a feature that apps can implement
  their own users locking functions.
- When testing inactivated users, users and IP-s can be banned by the system,
  banned IP-s/users can be viewed with commands `fail2ban-client banned` and
  `pam_abl`.
- Existing sessions keep working when deleting a user or removing
  a user from an access group.
- I didn't test e-mail app.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
2024-09-24 13:27:13 -07:00
James Valleroy
da02b464a9
Release v24.20 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v24.20
2024-09-23 20:42:47 -04:00
James Valleroy
c3e9dda748
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-09-23 20:42:18 -04:00
James Valleroy
058a363d5a
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-09-23 20:11:06 -04:00
James Valleroy
a1792be03f
action_utils: Remove extra empty line
I introduced this code quality issue when handling a merge conflict in
711c19b511f969d0dce5c36221428e8caa0e7473.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-09-21 12:54:11 -04:00
Sunil Mohan Adapa
9af9a504e0
miniflux: Workaround a packaging bug with DB connection
The latest version of miniflux can't connect to the database after a fresh
installation. This is due to incorrect ownership of /etc/miniflux/database file
which is owned by root (and correctly having the permissions 0600). After
changes in bug #1078416, miniflux no longer runs as root user and instead runs
as miniflux user. This user can't read the database file. The daemon silently
falls back to using built in defaults and fails to connect to PostgreSQL
database. This is originally caught by functional tests in FreedomBox's miniflux
integration.

Links:

1) https://bugs.debian.org/1081562
2) https://salsa.debian.org/go-team/packages/miniflux/-/merge_requests/2

Tests:

- Freshly install miniflux with the patch and the daemon is running. Ownership
for the file /etc/miniflux/database is as expected.

- Install miniflux without the patch. Daemon is not running. Apply patch and
restart service. miniflux app is updated. Daemon is running. Ownership for the
file /etc/miniflux/database is as expected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-09-21 09:22:34 -04:00
James Valleroy
711c19b511
action_utils: Add a method to reset services in 'failed' state
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-09-21 09:22:31 -04:00
Sunil Mohan Adapa
4a34feefb0
action_utils: Update outdated docstrings
- We no longer support sysvinit.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-09-21 09:22:25 -04:00
ikmaak
4e54196c82
Translated using Weblate (Dutch)
Currently translated at 98.0% (1641 of 1673 strings)
2024-09-21 03:05:36 +02:00
Sunil Mohan Adapa
125a002fa3
users: Don't cache NSS user indentity information
nscd daemon caches queries made to NSS via glibc. In our case queries to passwd
and group databases are cached. But this leads to many problems.

See: https://salsa.debian.org/freedombox-team/freedombox/-/merge_requests/2520

The bug that this MR fixes, that is, the inaccuracy of the authentication data,
is horrible and only acceptable if the caching provides very important
functionality. Already, having to purge nscd caches after modifying user
accounts is not nice.

I believe that we have encountered this bug before and blamed libpam-abl due to
the time sensitive nature of the problem.

nscd itself recommends that it should be used if NSS lookup are expensive (such
as in case of NIS, NIS+ queries according to /etc/init.d/nscd). In case of
FreedomBox, LDAP queries are unlikely to be made using network. LDAP server is
likely always local. I believe we can safely remove nscd by masking and stopping
nscd.service and unscd.service.

Tests:

- After applying the patches, users app setup is re-run. Service nscd is stopped
and masked. unscd is also masked.

- Running 'id tester' shows expected value 'uid=10001(tester) gid=100(users)
groups=100(users),10002(admin)'.

- Adding, removing, renaming a user immediately reflects in 'id <user>'.

- Adding and removing a user from groups immediately reflects in 'id <user>'.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-09-21 00:09:22 +03:00
Benedek Nagy
1dabc220b4
nextcloud: Fix issue with upgrading to next version
Don't delete overwrite.cli.url when the Nextcloud app's settings are
updated with no domain configured. Instead, set it to the default value
of http://localhost/nextcloud

We might want to consider updating existing, faulty setups.

Helps: #2433

Signed-off-by: Benedek Nagy <contact@nbenedek.me>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-09-19 21:21:26 -07:00
Veiko Aasa
7e7ad62c8b
users: Invalidate nscd cache after nslcd service startup
Fixes an issue where LDAP group membership info is not available long time
after system restart. This can happen when nscd cache is expired and name
service queries are made while nslcd is not yet started. As a result, nscd
group cache contains only local system groups and not LDAP groups. The issue
arises more likely in slow systems where slapd/nslcd startup can take minutes.
Could also depend on how long the device has been shut down before.

Tests performed:
  - stop nscd service, start nslcd service, check form the logs that
nscd reload errors are ignored and nslcd service starts successfully.

  - Test when nscd group cache is invalidated while nslcd is not running.
Run commands:
```
systemctl reload nscd
id tester
systemctl stop nslcd
nscd -i group
id tester
systemctl start nslcd
id tester
```

Result before patch applied.
```
uid=10001(tester) gid=100(users) groups=10002(admin),100(users)
uid=10001(tester) gid=100(users) groups=100(users)
uid=10001(tester) gid=100(users) groups=100(users)
```

Result after patch applied, tester is in the admins group at the end.
```
uid=10001(tester) gid=100(users) groups=10002(admin),100(users)
uid=10001(tester) gid=100(users) groups=100(users)
uid=10001(tester) gid=100(users) groups=10002(admin),100(users)
```

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-09-19 19:50:27 -07:00
James Valleroy
618adefab7
debian: tests: Wait for systemd-resolved to be started
This is attempting to fix a test setup issue in Debian CI, see #2450.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-09-19 19:41:06 -07:00
Sunil Mohan Adapa
87aac86782
apache: Don't restart daemon when changing certificates
Fixes: #2271

When domain name is updated, it usually results in a error page as the HTTP
connection is broken in the middle of a page load. This is due to apache
restarting in the middle of domain change operation by letsencrypt component.
This also leads to several functional tests failing. To fix this, ensure that
letsencrypt does a reload on the apache2 daemon instead of restarting it.

'reload' operation on apache2 triggers the command 'apachectl graceful'. It
ensures that currently running continue to serve the open HTTP connection until
the page load has been completed. After that those connections stop. Meanwhile,
the server reloads configuration (and apparently the related TLS certificates too).

Tests:

- Unit tests pass.
- When self-signed certificate is updated with 'make-ssl-cert
  generate-default-snakeoil --force-overwrite' and 'systemctl
  try-reload-or-restart apache2' is called, the new certificate is loaded by
  apache2. Browser shows the untrusted certificate warning again. The
  certificate information in the connection details has been updated.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-09-19 16:17:33 +03:00
Sunil Mohan Adapa
f8d2cc7b0d
letsencrypt: Allow reloading daemons after cert changes
- Instead of restarting them.

Tests:

- Changing a domain name leads restarting of services postfix/dovecot services.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-09-19 16:17:28 +03:00
Sunil Mohan Adapa
92a61f422c
service: Add privileged utility for 'try-reload-or-restart' action
Reload a service if it supports reloading, otherwise restart. Do nothing if
service is not running.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-09-19 16:17:28 +03:00
Sunil Mohan Adapa
ec25b3a046
tests: functional: Don't timeout when web server restarts
Likely helps: #2271.

When web server restarts we are shown an error page. Trying to lookup and
element in this error page still raises StaleElementReferenceException. However,
if the page was reloaded with driver.visit(), then trying to lookup the old
element does not throw StaleElementReferenceException. Instead the
NoSuchElementException is thrown. For this case, ensure that we stop waiting
appropriately. This is likely to solve the large waits and timeouts when testing
dynamicdns.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-09-19 16:17:28 +03:00
Sunil Mohan Adapa
9009cdafd6
config, names: Move domain name configuration to names app
Tests:

- Config app description is as expected.
- Config form does not show domain name field anymore.
  - Submitting the form with changes works.
- Names app has correct link for configuring static domain name. Clicking it
  takes to page for setting domain name.
- On startup, static domian name signal is sent properly if set. Otherwise no
  signal is send.
- Change domain name form shows correct value for current domain name.
- Change domain name form sets the value for domain name properly.
  - Page title is correct.
  - Validations works.
  - Add/remove domain name signals are sent properly.
  - Success message as shown expected
  - /etc/hosts is updated as expected.
- Unit tests work.
- Functional tests on ejabberd, letsencrypt, matrix, email, jsxc, openvpn
- After freshly starting the service. Visiting names app shows correct list of
  domains.
- ejabberd:
  - Installs works as expected. Currently set domain_name is setup properly.
    Copy certificate happens on proper domain.
  - Changing the domain sets the domain properly in ejabberd configuration.
  - Ejabberd app page shows link to name services instead of config app.
    Clicking works as expected.
- letsencrypt:
  - When no domains are configured, the link to 'Configure domains' is to the
    names app.
- matrix-synapse:
  - Domain name is properly shown in the status.
- email:
  - Primary domain name is shows properly in the app page.
  - Setting new primary domain works.
  - When installing, domain set as static domain name is prioritized as primary
    domain.
- jsxc:
  - Show the current static domain name in the domain field. BOSH server is
    available.
- openvpn:
  - Show the current static domain in profile is set otherwise show the current
    hostname.
  - If domain name is not set, downloaded OpenVPN profile shows hostname.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-09-19 13:43:32 +03:00
Sunil Mohan Adapa
8c69858d43
config, names: Move setting hostname from config to names
Tests:

- Config app description is as expected.
- Config form does not show hostname anymore.
  - Submitting the form with changes works.
- Names app has correct link for configuring Local Domain Name. Clicking it
  takes to page for setting hostname.
- Avahi shows the current .local domain correctly in Names app.
- Change hostname form shows correct value for current hostname.
- Change hostname form sets the value for hostname properly.
  - Page title is correct.
  - Validations works.
  - Pre/post hostname change signals are sent properly
  - Success message as shown expected
  - hostnamectl shows the set domain
- If domain name is not set, downloaded OpenVPN profile shows hostname.
- Unit tests work.
- Functional tests on names/config/avahi apps work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-09-19 13:42:47 +03:00
James Valleroy
dceee56684
upgrades: Treat n/a release as testing
Closes #2092

On testing and unstable systems, /etc/os-release does not contain
VERSION_ID. In this case, lsb_release will report the release as
"n/a".

For unstable, this means that backports can be enabled in development
mode. When this happens, trixie-backports will be added as an apt
repository. The repository already exists, so it does not cause any
problem.

Tests:

- In stable container, backports can be enabled.

- In stable container, dist-upgrade can be disable and enabled.

- In stable container, in development mode, dist-upgrade can be
  started.

- In testing container, backports cannot be enabled.

- In testing container, dist-upgrade cannot be enabled or started.

- In testing container, in development mode, backports can be enabled.

- In testing container, in development mode, dist-upgrade cannot be
  started.

- In unstable container, in development mode, backports can be enabled
  (as trixie-backports).

- In unstable container, in development mode, dist-upgrade cannot be
  started.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Merge the case of outdated unstable distributions that return 'unstable'
        as release and newer unstable distributions that return 'n/a']
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-09-17 14:21:26 -07:00
Besnik Bleta
be615e9cdb
Translated using Weblate (Albanian)
Currently translated at 99.6% (1667 of 1673 strings)
2024-09-16 20:09:21 +02:00
Jiří Podhorecký
7aec73c31c
Translated using Weblate (Czech)
Currently translated at 100.0% (1673 of 1673 strings)
2024-09-13 17:09:21 +02:00
gallegonovato
614801c2a6
Translated using Weblate (Spanish)
Currently translated at 100.0% (1673 of 1673 strings)
2024-09-13 17:09:20 +02:00
Besnik Bleta
97950e0a95
Translated using Weblate (Albanian)
Currently translated at 96.1% (1608 of 1673 strings)
2024-09-11 04:09:28 +00:00
109247019824
39fc205670
Translated using Weblate (Bulgarian)
Currently translated at 46.0% (771 of 1673 strings)
2024-09-11 04:09:27 +00:00
大王叫我来巡山
a932113d71
Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 65.0% (1088 of 1673 strings)
2024-09-11 04:09:26 +00:00
Burak Yavuz
e59d2cd649
Translated using Weblate (Turkish)
Currently translated at 100.0% (1673 of 1673 strings)
2024-09-11 04:09:25 +00:00
gallegonovato
3e80f29747
Translated using Weblate (Spanish)
Currently translated at 98.8% (1654 of 1673 strings)
2024-09-11 04:09:24 +00:00
James Valleroy
b82c881014
Release v24.19 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v24.19
2024-09-09 21:08:42 -04:00
James Valleroy
dc384f67a4
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-09-09 21:07:55 -04:00
James Valleroy
c1418496dd
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-09-09 20:39:40 -04:00
Sunil Mohan Adapa
bc9e83e41f
bind: Fix port number clash with 'shared' network connections
Closes: #707
Helps: #1570

- Network Manager's 'shared' connections use port 53 on those interfaces. Bind
by default also listens on them if possible. In some corner cases, this could
lead to a clash. This patch fixes to cases by making sure bind does not listen
on IP address likely used by Network Manager's 'shared' connections. If user
custom configures address, they will need to update the bind configuration
accordingly.

- App version increment is not necessary because in this release cycle we have
already incremented it once.

Tests:

- Install without patch. Increment the app version number (and the version
number in the privileged script). Notice that bind app setup is run again.
'listen-on' line is inserted into the configuration file as expected.

- Increment the version numbers again and a second 'listen-on' line is not
inserted.

- Without patch, on a machine with two network interfaces, start a 'shared'
network connection. Start bind. Notice the error that bind could not listen on
the shared network IP address.

- Without patch, on a machine with two network interface, start bind while
'shared' network connection is configured with just the IP address. Start bind
and it will listening on the IP address with shared network IP address.
Configure a shared connection and it fails to start.

- Apply the patch. Start 'shared' network connection. Start bind and notice that
bind does not attempt to listen on that shared network IP address and does not
print error message as well.

- Apply the patch. Start bind while 'shared' network connection is configured
with just the IP address. Bind does not attempt to listen on that shared network
IP address. Start the shared network connection. It start without issues.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-09-09 19:30:55 -04:00
Sunil Mohan Adapa
86c08e56ca
networks: Fix focusing on network interface field on error
- In create/edit network connection form, if the accordion is closed for
'General' section, Network Interface has not be selected yet and Submit button
is pressed, 'General' section should be expanded and focus should go to Network
Interface field. This is not working as expected as the code to expand
accordions didn't match 'select' type input fields properly. Fix this.

- Declare a common class name for both create and edit forms to make writing
queries easier.

- Drop console logs that where meant for debugging.

Tests:

- On both create and edit connection forms, set the value of network interface
to '--select--' and collapse the 'General' section. Press submit. The 'General'
section is expanded, Network Interface field is focus and scrolled into view.

- Do the same check for another field such as Connection Name and that works
too.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-09-08 19:34:44 +03:00
Sunil Mohan Adapa
a1070bf319
names: Show systemd-resolved status in the names page
This improves the user experience in many ways:

- Help user understand if DNSSEC is being used on the current DNS server in case
'allow-fallback' is supported.

- Nudges the user to explore enabling DNS-over-TLS and DNSSEC.

- Help user understand how global vs. link specific configuration works. Help
user understand if a global DNS is being used.

- Show the list of fallback DNS servers being used (as this poses privacy
concerns).

Also helps with debugging in problematic situations:

- Find out which DNS server is being used (and leading to problems) and show the
cycling mechanism.

Tests:

- Enable/disable fallback DNS server in privacy app. See that fallback servers
line is only shown when enabled.

- Set various global values of DNS-over-TLS and DNSSEC and see the status
changes.

- Set various values of DNS-over-TLS in the network connection settings and see
the changes in status.

- Set DNSSEC to allow-fallback. Perform a query and see that the value of
supported/unsupported changes.

- Set DNS servers with special configuration file in
/etc/systemd/resolved.conf.d/test.conf and restart systemd-resolved. See change
in status page. Notice that if connection specific DNS server is set to an
invalid server, global section has a current DNS server.

- Set SNI domain name and port for the an IPv4 DNS and an IPv6 DNS. See that the
display is as expected.

- Raise an exception in get_status() and notice that an error alert is show
properly.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewd-by: Veiko Aasa <veiko17@disroot.org>
2024-09-07 22:58:48 +03:00
James Valleroy
58c7de8d66
letsencrypt: Handle both standard and custom repairs
Pass remaining failed checks to super.

Tests:

- Remove /etc/letsencrypt/renewal-hooks/deploy/50-freedombox so that
  the diagnostic fails. Running repair causes the file to be
  re-created.

- Set domain name to non-existing domain so that the diagnostic
  fails. Running repair attempts to obtain the certificate.

- Have both diagnostics failing. Running repair will attempt to repair
  both.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-09-07 07:28:43 -07:00
Sunil Mohan Adapa
cbfaee85b5
networks: Show current global value of DNS-over-TLS and link to it
So that when users select 'Default' they understand what value applies and how
to change it.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-09-07 12:25:15 +03:00
Sunil Mohan Adapa
ffa628c4e4
names: Add option for setting global DNSSEC preference
Closes: #603.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-09-07 12:25:03 +03:00
Sunil Mohan Adapa
6062b9ef85
names: Restart instead of reload for systemd-resolved changes
- Reloading systemd-resolved does not seem to apply the DNS-over-TLS changes
fully. Although resolvectl shows the new status after a reload, systemd-resolved
seems to be using incorrect DNS-over-TLS setting.

Tests:

- Without the patch, set DNS server that does not support DNS-over-TLS such as
dnsmasq in Network Manager's 'shared' connection. Then enable DNS-over-TLS.
resolvectl shows that DNSOverTLS flag correctly. But name resolutions still
work.

- With the patch, repeat the above and notice that resolution does not work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-09-07 12:24:41 +03:00
Sunil Mohan Adapa
1eb578fdb5
names: Implement a diagnostic check for checking name resolution
- Use deb.debian.org because it is already contacted regularly for
checking/downloading packages and updates.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-09-07 12:24:21 +03:00
Sunil Mohan Adapa
a124681083
names: Add option for setting global DNS-over-TLS preference
Tests:

- Visit the names app. New 'Domains' heading and configuration section appear.

- DNS-over-TLS configuration option is as expected.

- When the configuration file does not exist, the option selected is 'no'.

- When the configuration option is changed, 'resolvectl' shows the newly set
configuration. Using 'resolvectl query {domain}' does not work when DoT is on
and server does not support DoT. 'opportunistic' and 'no' work on those cases.

- When a DNS server supporting DoT (such as 1.1.1.1) is manually set, resolution
with all three settings works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-09-07 12:23:52 +03:00
Sunil Mohan Adapa
64cfdc07b8
networks: Set 'auto' as default IPv6 method in new connection form
- Without selecting an option, trying to submit the form leads to an error.

Tests:

- Go to the new connection form, notice that the 'auto' method is selected by
default.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-09-07 12:23:43 +03:00