aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/main.c b/main.c
index 68bb4c2..86bcdc8 100644
--- a/main.c
+++ b/main.c
@@ -286,7 +286,8 @@ static int setup_gsr_ui(const char *user_homepath) {
}
char kms_server_proxy_local_filepath[PATH_MAX];
- get_local_kms_server_proxy_filepath(kms_server_proxy_local_filepath, sizeof(kms_server_proxy_local_filepath), user_homepath);
+ if(!get_local_kms_server_proxy_filepath(kms_server_proxy_local_filepath, sizeof(kms_server_proxy_local_filepath), user_homepath))
+ return 1;
/* Weird-ass distros like openSUSE only allow pkexec for files in $HOME!!! */
char kms_server_proxy_home[PATH_MAX];
@@ -324,7 +325,8 @@ static bool is_setup(const char *user_homepath) {
}
char kms_server_proxy_local_filepath[PATH_MAX];
- get_local_kms_server_proxy_filepath(kms_server_proxy_local_filepath, sizeof(kms_server_proxy_local_filepath), user_homepath);
+ if(!get_local_kms_server_proxy_filepath(kms_server_proxy_local_filepath, sizeof(kms_server_proxy_local_filepath), user_homepath))
+ return false;
if(!file_has_capabilities(kms_server_proxy_local_filepath, (const cap_value_t[]){ CAP_SYS_ADMIN, CAP_SETUID }, 2)) {
fprintf(stderr, "Error: kms-server-proxy (%s) is either not installed or is missing capabilities\n", kms_server_proxy_local_filepath);
@@ -342,7 +344,8 @@ static int launch_gsr_kms_server(const char *initial_socket_path, const char *ca
}
char kms_server_proxy_local_filepath[PATH_MAX];
- get_local_kms_server_proxy_filepath(kms_server_proxy_local_filepath, sizeof(kms_server_proxy_local_filepath), user_homepath);
+ if(!get_local_kms_server_proxy_filepath(kms_server_proxy_local_filepath, sizeof(kms_server_proxy_local_filepath), user_homepath))
+ return 1;
/* Weird-ass distros like openSUSE only allow pkexec for files in $HOME!!! */
char kms_server_proxy_home[PATH_MAX];
@@ -407,7 +410,8 @@ static int launch_gsr_global_hotkeys(char **argv) {
const char *user_homepath = argv[2];
char kms_server_proxy_local_filepath[PATH_MAX];
- get_local_kms_server_proxy_filepath(kms_server_proxy_local_filepath, sizeof(kms_server_proxy_local_filepath), user_homepath);
+ if(!get_local_kms_server_proxy_filepath(kms_server_proxy_local_filepath, sizeof(kms_server_proxy_local_filepath), user_homepath))
+ return 1;
if(!file_has_capabilities(kms_server_proxy_local_filepath, (const cap_value_t[]){ CAP_SETUID }, 1)) {
fprintf(stderr, "Error: kms-server-proxy (%s) is either not installed or is missing capabilities\n", kms_server_proxy_local_filepath);