SOURCES: busybox-noshadow.patch (NEW) - fix build without shadow s...

qboosh qboosh at pld-linux.org
Sat Dec 30 14:27:42 CET 2006


Author: qboosh                       Date: Sat Dec 30 13:27:42 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix build without shadow support

---- Files affected:
SOURCES:
   busybox-noshadow.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/busybox-noshadow.patch
diff -u /dev/null SOURCES/busybox-noshadow.patch:1.1
--- /dev/null	Sat Dec 30 14:27:42 2006
+++ SOURCES/busybox-noshadow.patch	Sat Dec 30 14:27:37 2006
@@ -0,0 +1,146 @@
+--- busybox-1.3.1/libpwdgrp/pwd_grp.c.orig	2006-12-27 05:56:32.000000000 +0100
++++ busybox-1.3.1/libpwdgrp/pwd_grp.c	2006-12-30 13:31:36.481505160 +0100
+@@ -103,6 +103,7 @@
+ 	return rv;
+ }
+ 
++#if ENABLE_FEATURE_SHADOWPASSWDS
+ int fgetspent_r(FILE *__restrict stream, struct spwd *__restrict resultbuf,
+ 				char *__restrict buffer, size_t buflen,
+ 				struct spwd **__restrict result)
+@@ -117,6 +118,7 @@
+ 
+ 	return rv;
+ }
++#endif
+ 
+ /**********************************************************************/
+ /* For the various fget??ent funcs, return NULL on failure and a
+@@ -144,6 +146,7 @@
+ 	return result;
+ }
+ 
++#if ENABLE_FEATURE_SHADOWPASSWDS
+ extern int fgetspent_r(FILE *__restrict stream, struct spwd *__restrict resultbuf,
+ 				char *__restrict buffer, size_t buflen,
+ 				struct spwd **__restrict result);
+@@ -184,6 +187,7 @@
+  DONE:
+ 	return rv;
+ }
++#endif
+ 
+ /**********************************************************************/
+ 
+@@ -207,6 +211,7 @@
+ #define DO_GETXXKEY_R_PATHNAME  _PATH_GROUP
+ #include "pwd_grp_internal.c"
+ 
++#if ENABLE_FEATURE_SHADOWPASSWDS
+ #define GETXXKEY_R_FUNC			getspnam_R
+ #define GETXXKEY_R_PARSER		__parsespent
+ #define GETXXKEY_R_ENTTYPE		struct spwd
+@@ -214,6 +219,7 @@
+ #define DO_GETXXKEY_R_KEYTYPE	const char *__restrict
+ #define DO_GETXXKEY_R_PATHNAME  _PATH_SHADOW
+ #include "pwd_grp_internal.c"
++#endif
+ 
+ #define GETXXKEY_R_FUNC			getpwuid_R
+ #define GETXXKEY_R_PARSER		__parsepwent
+@@ -257,6 +263,7 @@
+  * to have been created as a reentrant version of the non-standard
+  * functions getspuid.  Why getspuid was added, I do not know. */
+ 
++#if ENABLE_FEATURE_SHADOWPASSWDS
+ int getspuid_r(uid_t uid, struct spwd *__restrict resultbuf,
+ 		       char *__restrict buffer, size_t buflen,
+ 		       struct spwd **__restrict result)
+@@ -286,6 +293,7 @@
+ 	getspuid_r(uid, &resultbuf, buffer, sizeof(buffer), &result);
+ 	return result;
+ }
++#endif
+ 
+ struct passwd *getpwnam(const char *name)
+ {
+@@ -307,6 +315,7 @@
+ 	return result;
+ }
+ 
++#if ENABLE_FEATURE_SHADOWPASSWDS
+ struct spwd *getspnam(const char *name)
+ {
+ 	static char buffer[PWD_BUFFER_SIZE];
+@@ -316,6 +325,7 @@
+ 	getspnam_r(name, &resultbuf, buffer, sizeof(buffer), &result);
+ 	return result;
+ }
++#endif
+ 
+ int getpw(uid_t uid, char *buf)
+ {
+@@ -464,6 +474,7 @@
+ 	UNLOCK;
+ }
+ 
++#if ENABLE_FEATURE_SHADOWPASSWDS
+ int getspent_r(struct spwd *resultbuf, char *buffer,
+ 			   size_t buflen, struct spwd **result)
+ {
+@@ -488,6 +499,7 @@
+ 	UNLOCK;
+ 	return rv;
+ }
++#endif
+ 
+ struct passwd *getpwent(void)
+ {
+@@ -509,6 +521,7 @@
+ 	return result;
+ }
+ 
++#if ENABLE_FEATURE_SHADOWPASSWDS
+ struct spwd *getspent(void)
+ {
+ 	static char line_buff[PWD_BUFFER_SIZE];
+@@ -528,6 +541,7 @@
+ 	sgetspent_r(string, &spwd, line_buff, sizeof(line_buff), &result);
+ 	return result;
+ }
++#endif
+ 
+ int initgroups(const char *user, gid_t gid)
+ {
+@@ -643,6 +657,7 @@
+ 	return rv;
+ }
+ 
++#if ENABLE_FEATURE_SHADOWPASSWDS
+ static const unsigned char _sp_off[] = {
+ 	offsetof(struct spwd, sp_lstchg),	/* 2 - not a char ptr */
+ 	offsetof(struct spwd, sp_min),		/* 3 - not a char ptr */
+@@ -688,6 +703,7 @@
+ DO_UNLOCK:
+ 	return rv;
+ }
++#endif
+ 
+ /**********************************************************************/
+ /* Internal uClibc functions.					 */
+@@ -846,6 +862,7 @@
+ 
+ /**********************************************************************/
+ 
++#if ENABLE_FEATURE_SHADOWPASSWDS
+ static const unsigned char sp_off[] = {
+ 	offsetof(struct spwd, sp_namp),		/* 0 */
+ 	offsetof(struct spwd, sp_pwdp),		/* 1 */
+@@ -900,6 +917,7 @@
+ 
+ 	return EINVAL;
+ }
++#endif
+ 
+ /**********************************************************************/
+ 
================================================================


More information about the pld-cvs-commit mailing list