From 5a1cd9545164d978ded996ac6d673fd6d480a2fe Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Fri, 9 Jun 2023 20:46:47 -0300 Subject: openrc: rework pathing functions this simplifies the allocation of path string. also fixes some memory leaks from the ealier commit also changes the log path for users to XDG_CACHE_HOME, default ~/.cache/openrc Signed-off-by: Anna (navi) Figueiredo Gomes --- src/librc/librc-misc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/librc/librc-misc.c') diff --git a/src/librc/librc-misc.c b/src/librc/librc-misc.c index 2dab1249..766c9b35 100644 --- a/src/librc/librc-misc.c +++ b/src/librc/librc-misc.c @@ -374,10 +374,10 @@ static RC_STRINGLIST * rc_user_config_directory(RC_STRINGLIST *config) RC_STRINGLIST *rc_conf_d_list; char path[PATH_MAX]; RC_STRING *line; - char *sysconf = rc_user_sysconfdir(); + char *sysconf = rc_sysconfdir(); char *user_conf_d; - xasprintf(&user_conf_d, "%s/%s", sysconf, RC_USER_CONF_D); + xasprintf(&user_conf_d, "%s/%s", sysconf, RC_CONF_D); if ((dp = opendir(user_conf_d)) != NULL) { while ((d = readdir(dp)) != NULL) { @@ -471,8 +471,8 @@ rc_conf_value(const char *setting) #ifdef RC_USER_SERVICES if (rc_is_user()) { - user_sysconf = rc_user_sysconfdir(); - xasprintf(&userconf, "%s/%s", user_sysconf, RC_USER_CONF); + user_sysconf = rc_sysconfdir(); + xasprintf(&userconf, "%s/%s", user_sysconf, RC_CONF_FILE); user = rc_config_load(userconf); TAILQ_CONCAT(rc_conf, user, entries); -- cgit v1.2.3