extern int __parsepwent(void *pw, char *line);
extern int __parsegrent(void *gr, char *line);
+#if ENABLE_USE_BB_SHADOW
extern int __parsespent(void *sp, char *line);
+#endif
extern int __pgsreader(int (*__parserfunc)(void *d, char *line), void *data,
char *__restrict line_buff, size_t buflen, FILE *f);
return rv;
}
+#if ENABLE_USE_BB_SHADOW
int fgetspent_r(FILE *__restrict stream, struct spwd *__restrict resultbuf,
char *__restrict buffer, size_t buflen,
struct spwd **__restrict result)
return rv;
}
+#endif
/**********************************************************************/
/* For the various fget??ent funcs, return NULL on failure and a
return result;
}
+#if ENABLE_USE_BB_SHADOW
extern int fgetspent_r(FILE *__restrict stream, struct spwd *__restrict resultbuf,
char *__restrict buffer, size_t buflen,
struct spwd **__restrict result);
DONE:
return rv;
}
+#endif
/**********************************************************************/
#define DO_GETXXKEY_R_PATHNAME _PATH_GROUP
#include "pwd_grp_internal.c"
+#if ENABLE_USE_BB_SHADOW
#define GETXXKEY_R_FUNC getspnam_R
#define GETXXKEY_R_PARSER __parsespent
#define GETXXKEY_R_ENTTYPE struct spwd
#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
return result;
}
+#if 0 //ENABLE_USE_BB_SHADOW
/* This function is non-standard and is currently not built. It seems
* to have been created as a reentrant version of the non-standard
* functions getspuid. Why getspuid was added, I do not know. */
getspuid_r(uid, &resultbuf, buffer, sizeof(buffer), &result);
return result;
}
+#endif
struct passwd *getpwnam(const char *name)
{
return result;
}
+#if ENABLE_USE_BB_SHADOW
struct spwd *getspnam(const char *name)
{
static char buffer[PWD_BUFFER_SIZE];
getspnam_r(name, &resultbuf, buffer, sizeof(buffer), &result);
return result;
}
+#endif
int getpw(uid_t uid, char *buf)
{
return rv;
}
+#if ENABLE_USE_BB_SHADOW
static FILE *spf /*= NULL*/;
void setspent(void)
{
UNLOCK;
return rv;
}
+#endif
struct passwd *getpwent(void)
{
return result;
}
+#if ENABLE_USE_BB_SHADOW
struct spwd *getspent(void)
{
static char line_buff[PWD_BUFFER_SIZE];
sgetspent_r(string, &spwd, line_buff, sizeof(line_buff), &result);
return result;
}
+#endif
int initgroups(const char *user, gid_t gid)
{
return rv;
}
+#if ENABLE_USE_BB_SHADOW
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 */
DO_UNLOCK:
return rv;
}
+#endif
/**********************************************************************/
/* Internal uClibc functions. */
/**********************************************************************/
+#if ENABLE_USE_BB_SHADOW
static const unsigned char sp_off[] = {
offsetof(struct spwd, sp_namp), /* 0 */
offsetof(struct spwd, sp_pwdp), /* 1 */
return EINVAL;
}
+#endif
/**********************************************************************/