Compare commits
1
Commits
1_3_stable
..
1_3_1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3fa4a0a19 |
No files matched your search
@@ -1,8 +1,8 @@
|
||||
VERSION = 1
|
||||
PATCHLEVEL = 3
|
||||
SUBLEVEL = 2
|
||||
SUBLEVEL = 1
|
||||
EXTRAVERSION =
|
||||
NAME = Unnamed
|
||||
NAME = Christmas Tree
|
||||
|
||||
# *DOCUMENTATION*
|
||||
# To see a list of typical targets execute "make help"
|
||||
|
||||
+2
-4
@@ -46,13 +46,11 @@
|
||||
#ifdef CONFIG_LOCALE_SUPPORT
|
||||
#include <locale.h>
|
||||
#else
|
||||
#define setlocale(x,y) ((void)0)
|
||||
#define setlocale(x,y)
|
||||
#endif
|
||||
|
||||
#include "pwd_.h"
|
||||
#include "grp_.h"
|
||||
/* ifdef it out, because it may include <shadow.h> */
|
||||
/* and we may not even _have_ <shadow.h>! */
|
||||
#if ENABLE_FEATURE_SHADOWPASSWDS
|
||||
#include "shadow_.h"
|
||||
#endif
|
||||
@@ -61,7 +59,7 @@
|
||||
#include <limits.h>
|
||||
#include <sys/param.h>
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 256
|
||||
#define PATH_MAX 256
|
||||
#endif
|
||||
|
||||
/* Tested to work correctly (IIRC :]) */
|
||||
|
||||
@@ -52,9 +52,7 @@
|
||||
|
||||
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);
|
||||
@@ -105,7 +103,6 @@ int fgetgrent_r(FILE *__restrict stream, struct group *__restrict resultbuf,
|
||||
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)
|
||||
@@ -120,7 +117,6 @@ int fgetspent_r(FILE *__restrict stream, struct spwd *__restrict resultbuf,
|
||||
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**********************************************************************/
|
||||
/* For the various fget??ent funcs, return NULL on failure and a
|
||||
@@ -148,7 +144,6 @@ struct group *fgetgrent(FILE *stream)
|
||||
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);
|
||||
@@ -189,7 +184,6 @@ int sgetspent_r(const char *string, struct spwd *result_buf,
|
||||
DONE:
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
@@ -213,7 +207,6 @@ int sgetspent_r(const char *string, struct spwd *result_buf,
|
||||
#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
|
||||
@@ -221,7 +214,6 @@ int sgetspent_r(const char *string, struct spwd *result_buf,
|
||||
#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
|
||||
@@ -261,7 +253,6 @@ struct group *getgrgid(gid_t gid)
|
||||
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. */
|
||||
@@ -295,7 +286,6 @@ struct spwd *getspuid(uid_t uid)
|
||||
getspuid_r(uid, &resultbuf, buffer, sizeof(buffer), &result);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct passwd *getpwnam(const char *name)
|
||||
{
|
||||
@@ -317,7 +307,6 @@ struct group *getgrnam(const char *name)
|
||||
return result;
|
||||
}
|
||||
|
||||
#if ENABLE_USE_BB_SHADOW
|
||||
struct spwd *getspnam(const char *name)
|
||||
{
|
||||
static char buffer[PWD_BUFFER_SIZE];
|
||||
@@ -327,7 +316,6 @@ struct spwd *getspnam(const char *name)
|
||||
getspnam_r(name, &resultbuf, buffer, sizeof(buffer), &result);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
int getpw(uid_t uid, char *buf)
|
||||
{
|
||||
@@ -456,7 +444,6 @@ int getgrent_r(struct group *__restrict resultbuf,
|
||||
return rv;
|
||||
}
|
||||
|
||||
#if ENABLE_USE_BB_SHADOW
|
||||
static FILE *spf /*= NULL*/;
|
||||
void setspent(void)
|
||||
{
|
||||
@@ -501,7 +488,6 @@ int getspent_r(struct spwd *resultbuf, char *buffer,
|
||||
UNLOCK;
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct passwd *getpwent(void)
|
||||
{
|
||||
@@ -523,7 +509,6 @@ struct group *getgrent(void)
|
||||
return result;
|
||||
}
|
||||
|
||||
#if ENABLE_USE_BB_SHADOW
|
||||
struct spwd *getspent(void)
|
||||
{
|
||||
static char line_buff[PWD_BUFFER_SIZE];
|
||||
@@ -543,7 +528,6 @@ struct spwd *sgetspent(const char *string)
|
||||
sgetspent_r(string, &spwd, line_buff, sizeof(line_buff), &result);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
int initgroups(const char *user, gid_t gid)
|
||||
{
|
||||
@@ -659,7 +643,6 @@ int putgrent(const struct group *__restrict p, FILE *__restrict f)
|
||||
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 */
|
||||
@@ -705,7 +688,6 @@ int putspent(const struct spwd *p, FILE *stream)
|
||||
DO_UNLOCK:
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**********************************************************************/
|
||||
/* Internal uClibc functions. */
|
||||
@@ -864,7 +846,6 @@ int __parsegrent(void *data, char *line)
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
#if ENABLE_USE_BB_SHADOW
|
||||
static const unsigned char sp_off[] = {
|
||||
offsetof(struct spwd, sp_namp), /* 0 */
|
||||
offsetof(struct spwd, sp_pwdp), /* 1 */
|
||||
@@ -919,7 +900,6 @@ int __parsespent(void *data, char * line)
|
||||
|
||||
return EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
|
||||
+1
-3
@@ -275,8 +275,7 @@ int passwd_main(int argc, char **argv)
|
||||
}
|
||||
|
||||
filename = bb_path_passwd_file;
|
||||
#if ENABLE_FEATURE_SHADOWPASSWDS
|
||||
{
|
||||
if (ENABLE_FEATURE_SHADOWPASSWDS) {
|
||||
struct spwd *sp = getspnam(name);
|
||||
if (!sp) {
|
||||
/* LOGMODE_BOTH */
|
||||
@@ -288,7 +287,6 @@ int passwd_main(int argc, char **argv)
|
||||
pw->pw_passwd = sp->sp_pwdp;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Decide what the new password will be */
|
||||
newp = NULL;
|
||||
|
||||
@@ -41,6 +41,7 @@ int sulogin_main(int argc, char **argv)
|
||||
char *timeout_arg;
|
||||
const char * const *p;
|
||||
struct passwd *pwd;
|
||||
struct spwd *spwd;
|
||||
const char *shell;
|
||||
|
||||
logmode = LOGMODE_BOTH;
|
||||
@@ -74,15 +75,13 @@ int sulogin_main(int argc, char **argv)
|
||||
goto auth_error;
|
||||
}
|
||||
|
||||
#if ENABLE_FEATURE_SHADOWPASSWDS
|
||||
{
|
||||
struct spwd *spwd = getspnam(pwd->pw_name);
|
||||
if (ENABLE_FEATURE_SHADOWPASSWDS) {
|
||||
spwd = getspnam(pwd->pw_name);
|
||||
if (!spwd) {
|
||||
goto auth_error;
|
||||
}
|
||||
pwd->pw_passwd = spwd->sp_pwdp;
|
||||
}
|
||||
#endif
|
||||
|
||||
while (1) {
|
||||
/* cp points to a static buffer that is zeroed every time */
|
||||
|
||||
+1
-2
@@ -217,10 +217,9 @@ static void sendping(int junk)
|
||||
pkt->icmp_type = ICMP_ECHO;
|
||||
pkt->icmp_code = 0;
|
||||
pkt->icmp_cksum = 0;
|
||||
pkt->icmp_seq = htons(ntransmitted);
|
||||
pkt->icmp_seq = htons(ntransmitted++);
|
||||
pkt->icmp_id = myid;
|
||||
CLR(ntohs(pkt->icmp_seq) % MAX_DUP_CHK);
|
||||
ntransmitted++;
|
||||
|
||||
gettimeofday((struct timeval *) &pkt->icmp_dun, NULL);
|
||||
pkt->icmp_cksum = in_cksum((unsigned short *) pkt, sizeof(packet));
|
||||
|
||||
+1
-2
@@ -205,10 +205,9 @@ static void sendping(int junk)
|
||||
pkt->icmp6_type = ICMP6_ECHO_REQUEST;
|
||||
pkt->icmp6_code = 0;
|
||||
pkt->icmp6_cksum = 0;
|
||||
pkt->icmp6_seq = htons(ntransmitted);
|
||||
pkt->icmp6_seq = htons(ntransmitted++);
|
||||
pkt->icmp6_id = myid;
|
||||
CLR(pkt->icmp6_seq % MAX_DUP_CHK);
|
||||
ntransmitted++;
|
||||
|
||||
gettimeofday((struct timeval *) &pkt->icmp6_data8[4], NULL);
|
||||
|
||||
|
||||
Reference in new issue
Block a user