summaryrefslogtreecommitdiffstats
path: root/discover/discover-server.h
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-06-19 16:50:28 +1000
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-12-03 14:39:57 +1100
commit336f4eb17fb50526ea9fda82262356581e1b9ae0 (patch)
tree0a0b0fc427646d6ccd39f9baf209e62bfd40eb23 /discover/discover-server.h
parentde6f6c4bff7d42f63e2bbd01d2bab65ae9635877 (diff)
downloadtalos-petitboot-336f4eb17fb50526ea9fda82262356581e1b9ae0.tar.gz
talos-petitboot-336f4eb17fb50526ea9fda82262356581e1b9ae0.zip
discover/discover-server: Restrict clients based on uid
If crypt support is enabled restrict what actions clients can perform by default. Initial authorisation is set at connection time; clients running as root are unrestricted, anything else runs as restricted until it makes an authentication to pb-discover. Unprivileged clients may only perform the following actions: - Boot the default boot option. - Cancel the autoboot timeout. - Make an authentication request. If a group named "petitgroup" exists then the socket permissions are also modified so that only clients running as root or in that group may connect to the socket. The user-event socket is only usable by root since the two main usecases are by utilities called by pb-discover or by a user in the shell who will need to su to root anyway. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/discover-server.h')
-rw-r--r--discover/discover-server.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/discover/discover-server.h b/discover/discover-server.h
index 9f3aa62..9722e17 100644
--- a/discover/discover-server.h
+++ b/discover/discover-server.h
@@ -20,6 +20,9 @@ void discover_server_destroy(struct discover_server *server);
void discover_server_set_device_source(struct discover_server *server,
struct device_handler *handler);
+void discover_server_set_auth_mode(struct discover_server *server,
+ bool restrict_clients);
+
void discover_server_notify_device_add(struct discover_server *server,
struct device *device);
void discover_server_notify_boot_option_add(struct discover_server *server,
OpenPOWER on IntegriCloud