[BUG] passwd file paths defined in multiple places

Tito farmatito at tiscali.it
Tue Jan 11 14:25:25 UTC 2011


form libbb.h

#define bb_path_passwd_file "/etc/passwd"
#define bb_path_shadow_file "/etc/shadow"
#define bb_path_gshadow_file "/etc/gshadow"
#define bb_path_group_file "/etc/group"

from pwd_grp.c

#ifndef _PATH_SHADOW
#define _PATH_SHADOW	"/etc/shadow"
#endif
#ifndef _PATH_PASSWD
#define _PATH_PASSWD	"/etc/passwd"
#endif
#ifndef _PATH_GROUP
#define _PATH_GROUP	"/etc/group"
#endif


the paths are defined in multiple places and 
with CONFIG_USE_BB_PWD_GRP=y
if you change them in libbb.h
the changes are not honoured in pwd_grp.c
SHould be consistent and defined in only one file
for example for testing purposes on local files like:

#ifdef DEBUG_PWD_GRP
#define bb_path_passwd_file "./passwd"
#define bb_path_shadow_file "./shadow"
#define bb_path_gshadow_file "./gshadow"
#define bb_path_group_file "./group"
#else
#define bb_path_passwd_file "/etc/passwd"
#define bb_path_shadow_file "/etc/shadow"
#define bb_path_gshadow_file "/etc/gshadow"
#define bb_path_group_file "/etc/group"
#endif

Denys what you think about that? 

Ciao,
Tito


More information about the busybox mailing list