aboutsummaryrefslogtreecommitdiff
path: root/src/librc
diff options
context:
space:
mode:
authorAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2023-06-15 18:31:13 -0300
committerAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2023-10-19 10:56:54 +0200
commit95e77e9a0bac0827e8b8efdb9565063566d22587 (patch)
treeafe29bfd5049d5b63487af35c144247164a217ca /src/librc
parentf3ad53c0ce8676a075af23b108f430a035d78270 (diff)
openrc-run: in user mode, change to homedir instead of /
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
Diffstat (limited to 'src/librc')
-rw-r--r--src/librc/librc.c2
-rw-r--r--src/librc/rc.h.in2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/librc/librc.c b/src/librc/librc.c
index 0a42e2c0..58219b40 100644
--- a/src/librc/librc.c
+++ b/src/librc/librc.c
@@ -454,7 +454,7 @@ rc_set_user(void)
free(path);
}
-static const char *
+const char *
rc_user_home(void)
{
struct passwd *user_passwd;
diff --git a/src/librc/rc.h.in b/src/librc/rc.h.in
index f35c9110..8b1c705a 100644
--- a/src/librc/rc.h.in
+++ b/src/librc/rc.h.in
@@ -66,6 +66,8 @@ extern "C" {
bool rc_is_user(void);
void rc_set_user(void);
+
+const char *rc_user_home(void);
#endif
#define RC_PATH_PREFIX RC_LIBEXECDIR "/bin:/bin:/sbin:/usr/bin:/usr/sbin"