[PATCH 2/5] added config item USE_BB_THREADSAFE_SHADOW
Manuel Zerpies
manuel.f.zerpies at ww.stud.uni-erlangen.de
Sat Nov 24 22:30:28 UTC 2012
bump.
On Fri, Nov 16, 2012 at 07:36:31PM +0100, Manuel Zerpies wrote:
> From: Manuel Zerpies <manuel.f.zerpies at ww.stud.uni-erlangen.de>
>
> now it is possible to force busybox to use the threadsafe version
> of the shadow password implementation.
> ---
> libpwdgrp/pwd_grp.c | 2 --
> loginutils/Config.src | 20 ++++++++++++++++++++
> 2 files changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/libpwdgrp/pwd_grp.c b/libpwdgrp/pwd_grp.c
> index edf53f3..9b2637d 100644
> --- a/libpwdgrp/pwd_grp.c
> +++ b/libpwdgrp/pwd_grp.c
> @@ -370,8 +370,6 @@ struct spwd *getspnam(const char *name)
>
> /**********************************************************************/
>
> -/* FIXME: we don't have such CONFIG_xx - ?! */
> -
> #if defined CONFIG_USE_BB_THREADSAFE_SHADOW && defined PTHREAD_MUTEX_INITIALIZER
> static pthread_mutex_t mylock = PTHREAD_MUTEX_INITIALIZER;
> # define LOCK pthread_mutex_lock(&mylock)
> diff --git a/loginutils/Config.src b/loginutils/Config.src
> index 9bf79af..e41548e 100644
> --- a/loginutils/Config.src
> +++ b/loginutils/Config.src
> @@ -59,6 +59,26 @@ config USE_BB_SHADOW
> able to use PAM to access shadow passwords from remote LDAP
> password servers and whatnot.
>
> +config USE_BB_THREADSAFE_SHADOW
> + bool "threadsafe shadow"
> + default y
> + depends on USE_BB_PWD_GRP && FEATURE_SHADOWPASSWDS
> + help
> + This is the threadsafe version of USE_BB_SHADOW.
> + If you leave this disabled, busybox will use the system's shadow
> + password handling functions. And if you are using the GNU C library
> + (glibc), you will then need to install the /etc/nsswitch.conf
> + configuration file and the required /lib/libnss_* libraries in
> + order for the shadow password functions to work. This generally
> + makes your embedded system quite a bit larger.
> +
> + Enabling this option will cause busybox to directly access the
> + system's /etc/shadow file when handling shadow passwords. This
> + makes your system smaller (and I will get fewer emails asking about
> + how glibc NSS works). When this option is enabled, you will not be
> + able to use PAM to access shadow passwords from remote LDAP
> + password servers and whatnot.
> +
> config USE_BB_CRYPT
> bool "Use internal crypt functions"
> default y
> --
> 1.7.9.5
>
More information about the busybox
mailing list