Patch for shadow passwd configuration

Max Okumoto max at kiyon.com
Sat Aug 5 10:39:00 UTC 2006


When compiling with uClibc which has shadow passwd disabled
in the config, busybox will not correctly compile. 

The following patch corrects libpwdgrp/Makfile.in so that it does
not try to compile the shadow passwd routings unless they are
required.  In addition, the shadow_.h header file is only included
when shadow passwd supported is configured in busybox.

                  Max Okumoto


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/20060805/d320d8c3/attachment-0001.htm 


More information about the busybox mailing list