Compare commits

..
1 Commits
Author SHA1 Message Date
Denis Vlasenko fa3f806cd0 apply accumulated post 1.7.2 patches; bump version to 1.7.3 2007-11-03 23:17:40 +00:00
8 changed files with 28 additions and 23 deletions

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
VERSION = 1
PATCHLEVEL = 7
SUBLEVEL = 2
SUBLEVEL = 3
EXTRAVERSION =
NAME = Unnamed
+14 -7
View File
@@ -47,13 +47,16 @@ static void tail_xprint_header(const char *fmt, const char *filename)
static ssize_t tail_read(int fd, char *buf, size_t count)
{
ssize_t r;
off_t current, end;
off_t current;
struct stat sbuf;
end = current = lseek(fd, 0, SEEK_CUR);
if (!fstat(fd, &sbuf))
end = sbuf.st_size;
lseek(fd, end < current ? 0 : current, SEEK_SET);
/* (A good comment is missing here) */
current = lseek(fd, 0, SEEK_CUR);
/* /proc files report zero st_size, don't lseek them. */
if (fstat(fd, &sbuf) == 0 && sbuf.st_size)
if (sbuf.st_size < current)
lseek(fd, 0, SEEK_SET);
r = safe_read(fd, buf, count);
if (r < 0) {
bb_perror_msg(bb_msg_read_error);
@@ -67,8 +70,12 @@ static const char header_fmt[] ALIGN1 = "\n==> %s <==\n";
static unsigned eat_num(const char *p)
{
if (*p == '-') p++;
else if (*p == '+') { p++; G.status = EXIT_FAILURE; }
if (*p == '-')
p++;
else if (*p == '+') {
p++;
G.status = EXIT_FAILURE;
}
return xatou_sfx(p, tail_suffixes);
}
+1 -1
View File
@@ -776,7 +776,7 @@ char *bb_simplify_path(const char *path);
extern void bb_do_delay(int seconds);
extern void change_identity(const struct passwd *pw);
extern const char *change_identity_e2str(const struct passwd *pw);
extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args);
extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) ATTRIBUTE_NORETURN;
#if ENABLE_SELINUX
extern void renew_current_security_context(void);
extern void set_current_security_context(security_context_t sid);
+3
View File
@@ -1186,6 +1186,9 @@ static void send_cgi_and_exit(
* and send it to the peer. So please no SIGPIPEs! */
signal(SIGPIPE, SIG_IGN);
/* Accound for POSTDATA already in hdr_buf */
bodyLen -= hdr_cnt;
/* This loop still looks messy. What is an exit criteria?
* "CGI's output closed"? Or "CGI has exited"?
* What to do if CGI has closed both input and output, but
+3 -2
View File
@@ -734,7 +734,8 @@ static servtab_t *getconfigent(void)
/* if ((arg = skip(&cp, 1)) == NULL) */
/* goto more; */
sep->se_server = xxstrdup(skip(&cp));
arg = skip(&cp);
sep->se_server = xxstrdup(arg);
if (strcmp(sep->se_server, "internal") == 0) {
#ifdef INETD_FEATURE_ENABLED
const struct builtin *bi;
@@ -759,7 +760,7 @@ static servtab_t *getconfigent(void)
sep->se_bi = NULL;
#endif
argc = 0;
for (arg = skip(&cp); cp; arg = skip(&cp)) {
for (; cp; arg = skip(&cp)) {
if (argc < MAXARGV)
sep->se_argv[argc++] = xxstrdup(arg);
}
+2 -2
View File
@@ -241,12 +241,12 @@ static void parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p)
} else if (key == ARG_remote) {
NEXT_ARG();
key = index_in_strings(keywords, *argv);
if (key == ARG_any)
if (key != ARG_any)
p->iph.daddr = get_addr32(*argv);
} else if (key == ARG_local) {
NEXT_ARG();
key = index_in_strings(keywords, *argv);
if (key == ARG_any)
if (key != ARG_any)
p->iph.saddr = get_addr32(*argv);
} else if (key == ARG_dev) {
NEXT_ARG();
+1 -7
View File
@@ -4379,6 +4379,7 @@ clear_traps(void)
/* Lives far away from here, needed for forkchild */
static void closescript(void);
/* Called after fork(), in child */
static void
forkchild(struct job *jp, union node *n, int mode)
@@ -4423,15 +4424,8 @@ forkchild(struct job *jp, union node *n, int mode)
setsignal(SIGQUIT);
setsignal(SIGTERM);
}
#if JOBS
/* For "jobs | cat" to work like in bash, we must retain list of jobs
* in child, but we do need to remove ourself */
if (jp)
freejob(jp);
#else
for (jp = curjob; jp; jp = jp->prev_job)
freejob(jp);
#endif
jobless = 0;
}
+3 -3
View File
@@ -107,7 +107,7 @@ int logger_main(int argc, char **argv)
argv += optind;
if (!argc) {
#define strbuf bb_common_bufsiz1
while (fgets(strbuf, BUFSIZ, stdin)) {
while (fgets(strbuf, COMMON_BUFSIZE, stdin)) {
if (strbuf[0]
&& NOT_LONE_CHAR(strbuf, '\n')
) {
@@ -117,11 +117,11 @@ int logger_main(int argc, char **argv)
}
} else {
char *message = NULL;
int len = 1; /* for NUL */
int len = 0;
int pos = 0;
do {
len += strlen(*argv) + 1;
message = xrealloc(message, len);
message = xrealloc(message, len + 1);
sprintf(message + pos, " %s", *argv),
pos = len;
} while (*++argv);