From 3ea6df885d42a5acab9f641416daa5b06972eefd Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sun, 28 Sep 2025 10:40:09 +0200 Subject: [PATCH] lib/: Use libc _FILE_SHADOW from Signed-off-by: Alejandro Colomar --- lib/defines.h | 4 ---- lib/prefix_flag.c | 2 +- lib/shadowio.c | 3 ++- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/defines.h b/lib/defines.h index 219724c9f..0374f0f03 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -157,10 +157,6 @@ #define GROUP_FILE "/etc/group" #endif -#ifndef SHADOW_FILE -#define SHADOW_FILE "/etc/shadow" -#endif - #ifndef SUBUID_FILE #define SUBUID_FILE "/etc/subuid" #endif diff --git a/lib/prefix_flag.c b/lib/prefix_flag.c index cb807c6ac..dd5972cc7 100644 --- a/lib/prefix_flag.c +++ b/lib/prefix_flag.c @@ -122,7 +122,7 @@ extern const char* process_prefix_flag (const char* short_opt, int argc, char ** sgr_setdbname(sgroup_db_file); #endif - spw_db_file = xaprintf("%s/%s", prefix, SHADOW_FILE); + spw_db_file = xaprintf("%s/%s", prefix, _PATH_SHADOW); spw_setdbname(spw_db_file); #ifdef ENABLE_SUBIDS diff --git a/lib/shadowio.c b/lib/shadowio.c index 9fe5d097f..bf7181751 100644 --- a/lib/shadowio.c +++ b/lib/shadowio.c @@ -10,6 +10,7 @@ #include "config.h" +#include #include #include @@ -82,7 +83,7 @@ static struct commonio_ops shadow_ops = { }; static struct commonio_db shadow_db = { - SHADOW_FILE, /* filename */ + _PATH_SHADOW, /* filename */ &shadow_ops, /* ops */ NULL, /* fp */ #ifdef WITH_SELINUX -- 2.47.3