[BUG] passwd file paths defined in multiple places
walter harms
wharms at bfs.de
Wed Jan 12 08:51:57 UTC 2011
Am 11.01.2011 15:25, schrieb Tito:
> 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
Having path at two places this is clearly not clever. But since it
will touch other tools too (crontab/crond come to my mind) it may be
better to have one file for all.
Unfortunately that means to replicate paths.h.
re,
wh
More information about the busybox
mailing list