2009-07-07 14:14:22     Shadow Support in Busybox

Document created by Aaronwu Employee on Aug 16, 2013
Version 1Show Document
  • View in full screen mode

2009-07-07 14:14:22     Shadow Support in Busybox

Cameron Barfield (UNITED STATES)

Message: 76893   

 

I'm trying to migrate from applications from the 2008 distro branch to 2009. I need to get shadow support working.

 

Under the 2008 branch, all I had to do was enable busybox to use internal shadow password functions. With 2009, I get this error when building:

 

cameron@camlinux:~/src/blackfin/svn/uClinux-dist.2009$ make NON_SMP_BUILD=1

 

 

<snip>

 

 

 

make -C build-busybox-1.13.4

make[4]: Entering directory `/home/cameron/src/blackfin/svn/uClinux-dist.2009/user/busybox/build-busybox-1.13.4'

make -C /home/cameron/src/blackfin/svn/uClinux-dist.2009/user/busybox/busybox-1.13.4 O=/home/cameron/src/blackfin/svn/uClinux-dist.2009/user/busybox/build-busybox-1.13.4

  Using /home/cameron/src/blackfin/svn/uClinux-dist.2009/user/busybox/busybox-1.13.4 as source for busybox

  GEN     /home/cameron/src/blackfin/svn/uClinux-dist.2009/user/busybox/build-busybox-1.13.4/Makefile

  CC      applets/applets.o

In file included from /home/cameron/src/blackfin/svn/uClinux-dist.2009/user/busybox/busybox-1.13.4/include/busybox.h:10,

                 from /home/cameron/src/blackfin/svn/uClinux-dist.2009/user/busybox/busybox-1.13.4/applets/applets.c:11:

/home/cameron/src/blackfin/svn/uClinux-dist.2009/user/busybox/busybox-1.13.4/include/libbb.h:75:21: error: shadow.h: No such file or directory

make[7]: *** [applets/applets.o] Error 1

make[6]: *** [applets] Error 2

make[5]: *** [_all] Error 2

make[4]: *** [all] Error 2

make[4]: Leaving directory `/home/cameron/src/blackfin/svn/uClinux-dist.2009/user/busybox/build-busybox-1.13.4'

make[3]: *** [all] Error 2

make[3]: Leaving directory `/home/cameron/src/blackfin/svn/uClinux-dist.2009/user/busybox'

make[2]: *** [busybox] Error 2

make[2]: Leaving directory `/home/cameron/src/blackfin/svn/uClinux-dist.2009/user'

make[1]: *** [all] Error 2

make[1]: Leaving directory `/home/cameron/src/blackfin/svn/uClinux-dist.2009/user'

make: *** [subdirs] Error 1

 

 

 

 

Relevant portion of config/.config:

 

#

# Login/Password Management Utilities

#

CONFIG_USER_BUSYBOX_FEATURE_SHADOWPASSWDS=y

CONFIG_USER_BUSYBOX_USE_BB_PWD_GRP=y

# CONFIG_USER_BUSYBOX_USE_BB_SHADOW is not set

# CONFIG_USER_BUSYBOX_USE_BB_CRYPT is not set

CONFIG_USER_BUSYBOX_ADDGROUP=y

# CONFIG_USER_BUSYBOX_FEATURE_ADDUSER_TO_GROUP is not set

# CONFIG_USER_BUSYBOX_DELGROUP is not set

# CONFIG_USER_BUSYBOX_FEATURE_CHECK_NAMES is not set

CONFIG_USER_BUSYBOX_ADDUSER=y

# CONFIG_USER_BUSYBOX_FEATURE_ADDUSER_LONG_OPTIONS is not set

# CONFIG_USER_BUSYBOX_DELUSER is not set

CONFIG_USER_BUSYBOX_GETTY=y

CONFIG_USER_BUSYBOX_FEATURE_UTMP=y

CONFIG_USER_BUSYBOX_FEATURE_WTMP=y

CONFIG_USER_BUSYBOX_LOGIN=y

# CONFIG_USER_BUSYBOX_PAM is not set

# CONFIG_USER_BUSYBOX_LOGIN_SCRIPTS is not set

# CONFIG_USER_BUSYBOX_FEATURE_NOLOGIN is not set

# CONFIG_USER_BUSYBOX_FEATURE_SECURETTY is not set

CONFIG_USER_BUSYBOX_PASSWD=y

# CONFIG_USER_BUSYBOX_FEATURE_PASSWD_WEAK_CHECK is not set

# CONFIG_USER_BUSYBOX_CRYPTPW is not set

# CONFIG_USER_BUSYBOX_CHPASSWD is not set

# CONFIG_USER_BUSYBOX_SU is not set

# CONFIG_USER_BUSYBOX_SULOGIN is not set

# CONFIG_USER_BUSYBOX_VLOCK is not set

 

 

 

I found a reference to a similar problem (using libpam):

 

  blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=5185

 

Is the only resolution to rebuild the toolchain? This may be a stupid question, but how do I build the toolchain with that uclibc option specified?

QuoteReplyEditDelete

 

 

2009-07-07 14:41:32     Re: Shadow Support in Busybox

Mike Frysinger (UNITED STATES)

Message: 76895   

 

in order to get shadow.h and related support in uClibc, you'll have to rebuild the toolchain.  it may be easier to add a small stub implementation in your own shadow.h.

 

does USE_BB_SHADOW not work or something ?

QuoteReplyEditDelete

 

 

2009-07-07 15:02:27     Re: Shadow Support in Busybox

Cameron Barfield (UNITED STATES)

Message: 76896   

 

I could swear that USE_BB_SHADOW was checked in the Kconfig menu. I rebuilt with USE_BB_SHADOW enabled (I checked the .config this time) and still get the same results.

 

BusyBox shouldn't be dependent on uclibc, should it?

 

 

 

#

# Login/Password Management Utilities

#

CONFIG_USER_BUSYBOX_FEATURE_SHADOWPASSWDS=y

CONFIG_USER_BUSYBOX_USE_BB_PWD_GRP=y

CONFIG_USER_BUSYBOX_USE_BB_SHADOW=y

# CONFIG_USER_BUSYBOX_USE_BB_CRYPT is not set

# CONFIG_USER_BUSYBOX_ADDGROUP is not set

# CONFIG_USER_BUSYBOX_DELGROUP is not set

# CONFIG_USER_BUSYBOX_ADDUSER is not set

# CONFIG_USER_BUSYBOX_DELUSER is not set

CONFIG_USER_BUSYBOX_GETTY=y

CONFIG_USER_BUSYBOX_FEATURE_UTMP=y

CONFIG_USER_BUSYBOX_FEATURE_WTMP=y

CONFIG_USER_BUSYBOX_LOGIN=y

# CONFIG_USER_BUSYBOX_PAM is not set

# CONFIG_USER_BUSYBOX_LOGIN_SCRIPTS is not set

# CONFIG_USER_BUSYBOX_FEATURE_NOLOGIN is not set

# CONFIG_USER_BUSYBOX_FEATURE_SECURETTY is not set

CONFIG_USER_BUSYBOX_PASSWD=y

# CONFIG_USER_BUSYBOX_FEATURE_PASSWD_WEAK_CHECK is not set

# CONFIG_USER_BUSYBOX_CRYPTPW is not set

# CONFIG_USER_BUSYBOX_CHPASSWD is not set

# CONFIG_USER_BUSYBOX_SU is not set

# CONFIG_USER_BUSYBOX_SULOGIN is not set

# CONFIG_USER_BUSYBOX_VLOCK is not set

 

 

QuoteReplyEditDelete

 

 

2009-07-09 01:27:43     Re: Shadow Support in Busybox

Mike Frysinger (UNITED STATES)

Message: 76941   

 

if you dont enable the BB_SHADOW option, then busybox will of course need shadow support in the C library

 

as for when you have enabled that option, in this case busybox just wants it for the spwd struct definition.  you should be able to copy that from your host system shadow.h to include/libbb.h and comment out the shadow.h include.

QuoteReplyEditDelete

Attachments

    Outcomes