[PATCH] dont compile pwd_to_spwd when shadow passwds is off

Amir Shalem amir at boom.org.il
Thu Sep 15 08:16:53 UTC 2005


hey
this patch disables compliation of pwd_to_spwd when shadow passwords is off
it allows user to compile busybox/uclibc without shadow support.

should it be #ifdef or #if now ?

and should it disable pwd2spwd.c at Makefile.in level ?

-- 
	Amir.

-------------- next part --------------
Index: libbb/pwd2spwd.c
===================================================================
--- libbb/pwd2spwd.c	(revision 11469)
+++ libbb/pwd2spwd.c	(working copy)
@@ -28,6 +28,8 @@
  * SUCH DAMAGE.
  */
 
+#ifdef CONFIG_FEATURE_SHADOWPASSWDS
+
 #include <time.h>
 #include <sys/types.h>
 #include "libbb.h"
@@ -72,3 +74,4 @@
 	return &sp;
 }
 
+#endif
Index: include/libbb.h
===================================================================
--- include/libbb.h	(revision 11469)
+++ include/libbb.h	(working copy)
@@ -431,7 +431,9 @@
 extern void setup_environment ( const char *shell, int loginshell, int changeenv, const struct passwd *pw );
 extern int correct_password ( const struct passwd *pw );
 extern char *pw_encrypt(const char *clear, const char *salt);
+#ifdef CONFIG_FEATURE_SHADOWPASSWDS
 extern struct spwd *pwd_to_spwd(const struct passwd *pw);
+#endif
 extern int obscure(const char *old, const char *newval, const struct passwd *pwdp);
 
 extern int bb_xopen(const char *pathname, int flags);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20050915/3ca72eb7/attachment-0002.pgp 


More information about the busybox mailing list