On Wednesday 12 January 2011 14:25:17 you wrote: > On Tue, Jan 11, 2011 at 3:25 PM, Tito <[email protected]> wrote: > > 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? > > They are not meant to be configurable. > > (I believe pwd_grp.c has been taken from uclibc, > presumably to make glibc-without-nss builds possible.) > Hi, wouldn't something like this in libbb.h or platform.h make more sense as pwd_grp.c already includes libbb.h?
#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 #ifndef _PATH_GSHADOW #define _PATH_GSHADOW "/etc/gshadow" #endif #define bb_path_passwd_file _PATH_PASSWD #define bb_path_shadow_file _PATH_SHADOW #define bb_path_gshadow_file _PATH_GSHADOW #define bb_path_group_file _PATH_GROUP Ciao, Tito _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
