From 4883c6ee087fbd987acde7acee4f6b35f33c0b84 Mon Sep 17 00:00:00 2001 From: Liam Waldron Date: Tue, 12 Nov 2024 09:06:26 -0500 Subject: [PATCH] v4.0.0-rc7 - custom message support in is_process_root() --- VERSION | 2 +- libglacier.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 6fc9553..220c212 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.0.0-rc6 +4.0.0-rc7 diff --git a/libglacier.c b/libglacier.c index c79bfc5..df4f1d0 100644 --- a/libglacier.c +++ b/libglacier.c @@ -47,6 +47,7 @@ int GLACIER_VERBOSE; const char *GLACIER_REPO; const char *GLACIER_ARCH; const char *GLACIER_TARGET; +const char *GLACIER_LOCALDB; const char *GLACIER_SYSTEM_PROFILE; const char *runtime_files[] = { @@ -172,16 +173,16 @@ runtime_exists() * is_process_root * * DESCRIPTION: Check if process is running as root. - * PARAMETERS: None. + * PARAMETERS: char MSG[] * DEFINED IN: glacier_runtime.h * */ int -is_process_root() +is_process_root(char MSG[]) { if (getuid() != 0) { - errlog("Failed to open package index: permission denied. Are you root?"); + fprintf(stderr, COL_RED "[x] " COL_RESET "%s\n", MSG); exit(1); } }