compile problem with now shadow passwds

Max Okumoto max at kiyon.com
Mon Aug 14 04:33:12 UTC 2006


Rob Landley <rob at landley.net> wrote: On Thursday 03 August 2006 4:16 pm, Max Okumoto wrote:
> Hi Rob,
>  
>  Did you have a chance to look at busybox with no shadow
>  passwd support compiling with uClibc with no shadow passwd support?

I'm just getting to it now.  (Bit behind. :)
No problem.  With all the other task you have this is pretty
minor.
I see svn 15766 from rpjday fixing the config typo, but it looks like your initial patch wasn't checked in.

Sigh, my mental map of this area of the code is the stuff I spent a couple   weeks rewriting (now what, 3 months ago?), and really really need to finish.

>  It looks like uClibc does not have a shadow.h if it is
>  not configured.  And busybox still tries to compile the
>  shadow passwd routines even though they are not going
>  to be used.

Yeah, that's broken.

Hmmm...

> Since I don't want shadow passwd support anyway.
> I commented out the #include "shadow_.h" �in
> libpwdgrp/pwd_grp.c and libpwdgrp/pwd_grp_internal.c

That fixed it for you?  Doesn't that code #include libbb.h, which #includes shadow_.h?
>From my quick search, and test builds it looks like those are the
only locations.
This code hasn't had its #includes cleaned up because I plan to _delete_ it.  
(Parsing lines of colon separated ascii text is _not_ brain surgery, and does 
_not_ require a separate library from parsing the colon separated ascii text 
in /etc/passwd.  It just doesn't.  Really.  Honest and truly...)

> The libpwdgrp/Makefile.in tries to compile the shadow library code anyway.
> �So I commented out LIBPWDGRP_MOBJS1 assignment. 

I have a tree where that entire directory is gone, but alas the result doesn't 
quite compile yet, and _this_ weekend I'm working on learning enough from 
Cross Linux From Scratch (and buildroot, where necessary) to build a 
reproducible cross-compiler toolchain as part of a revival of my Firmware 
Linux project.

Right now the best regression test I have for busybox making a development 
system that uses BusyBox in place of all the packages it can replace, and 
which rebuilds itself from source code under itself.  Unfortunately, I'd 
taken it apart to add cross-compiling and QEMU to the mix (test it on arm, 
from my x86 laptop!) and in the middle of that I got a job at a 
cross-compiling company that uses completely different technology (based on 
RPM, which I try not to get any of on me), and it's now been 8 months since 
I've actually had any combination of "remotely current" and "actually working" on this project...

And so, I poke.  If you wondering why I was distracted, cross-compiling is painfully fiddly.

It'll be in http://busybox.net/~landley/firmware when I have something to 
post.  Right now there's about the first 1/3 of a design document up there, I 
think.  (And a mercurial repository, but that's not linked from index.html 
yet. :)

Anyway: could you send me an actual patch that fixes it for you (and confirm 
that it does), and I'll confirm it doesn't break anything here and apply it.

>                       Max

Rob
[old patch removed]
 
 I submitted a patch a few days ago, but I will attach it below.  I've
 been using it and have not run into any problems. .  Thanks for all your hard work.
 
                 Max
 
 Index: libpwdgrp/Makefile.in
 ===================================================================
 RCS file: /opt/cvs/busybox/libpwdgrp/Makefile.in,v
 retrieving revision 1.1.1.2
 diff -u -r1.1.1.2 Makefile.in
 --- libpwdgrp/Makefile.in       9 Jul 2006 19:10:12 -0000       1.1.1.2
 +++ libpwdgrp/Makefile.in       5 Aug 2006 10:23:12 -0000
 @@ -23,7 +23,7  @@
  LIBPWDGRP_MOBJS0=$(patsubst %,$(LIBPWDGRP_DIR)/%, $(LIBPWDGRP_MOBJ0-y))
  
  LIBPWDGRP_MSRC1:=$(srcdir)/pwd_grp.c
 -LIBPWDGRP_MOBJ1-$(CONFIG_USE_BB_PWD_GRP):= __parsepwent.o __parsegrent.o \
 +LIBPWDGRP_MOBJ1-$(CONFIG_USE_BB_SHADOW):= __parsepwent.o __parsegrent.o \
         __pgsreader.o fgetspent_r.o fgetspent.o sgetspent_r.o getspnam_r.o \
         getspnam.o getspent_r.o getspent.o sgetspent.o \
         putspent.o __parsespent.o # getspuid_r.o getspuid.o
 Index: libpwdgrp/pwd_grp.c
 ===================================================================
 RCS file: /opt/cvs/busybox/libpwdgrp/pwd_grp.c,v
 retrieving revision 1.1.1.2
 diff -u -r1.1.1.2 pwd_grp.c
 --- libpwdgrp/pwd_grp.c 9 Jul 2006 19:10:12 -0000       1.1.1.2
 +++ libpwdgrp/pwd_grp.c 5 Aug 2006 10:23:12 -0000
 @@ -28,7 +28,9  @@
  #include <assert.h>
  #include <ctype.h>
  
 +#ifdef CONFIG_FEATURE_SHADOWPASSWDS
  #include "shadow_.h"
 +#endif
  
  #ifndef _PATH_SHADOW
  #define        _PATH_SHADOW    "/etc/shadow"
 Index: libpwdgrp/pwd_grp_internal.c
 ===================================================================
 RCS file: /opt/cvs/busybox/libpwdgrp/pwd_grp_internal.c,v
 retrieving revision 1.1.1.2
 diff -u -r1.1.1.2 pwd_grp_internal.c
 --- libpwdgrp/pwd_grp_internal.c        9 Jul 2006 19:10:12 -0000       1.1.1.2
 +++ libpwdgrp/pwd_grp_internal.c        5 Aug 2006 10:23:12 -0000
 @@ -29,7 +29,9 @@
  
  #include "pwd_.h"
  #include "grp_.h"
 +#ifdef CONFIG_FEATURE_SHADOWPASSWDS
  #include "shadow_.h"
 +#endif
  #include  "libbb.h"
  
  #ifndef _PATH_SHADOW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20060813/186240d7/attachment-0001.htm 


More information about the busybox mailing list