From pgf at busybox.net Fri Feb 1 15:25:35 2008 From: pgf at busybox.net (pgf at busybox.net) Date: Fri, 1 Feb 2008 15:25:35 -0800 (PST) Subject: svn commit: trunk/busybox/networking Message-ID: <20080201232535.9245012C686@busybox.net> Author: pgf Date: 2008-02-01 15:25:32 -0800 (Fri, 01 Feb 2008) New Revision: 20928 Log: Fix compilation error when FEATURE_FANCY_PING enabled. Also reorder networking/Config.in moving FEATURE_FANCY_PING next to PING6. (Cristian Ionescu-Idbohrn) Modified: trunk/busybox/networking/Config.in trunk/busybox/networking/ping.c Changeset: Modified: trunk/busybox/networking/Config.in =================================================================== --- trunk/busybox/networking/Config.in 2008-02-01 06:53:50 UTC (rev 20927) +++ trunk/busybox/networking/Config.in 2008-02-01 23:25:32 UTC (rev 20928) @@ -645,12 +645,6 @@ help This will give you a ping that can talk IPv6. -config PSCAN - bool "pscan" - default n - help - Simple network port scanner. - config FEATURE_FANCY_PING bool "Enable fancy ping output" default y @@ -659,6 +653,12 @@ Make the output from the ping applet include statistics, and at the same time provide full support for ICMP packets. +config PSCAN + bool "pscan" + default n + help + Simple network port scanner. + config ROUTE bool "route" default n Modified: trunk/busybox/networking/ping.c =================================================================== --- trunk/busybox/networking/ping.c 2008-02-01 06:53:50 UTC (rev 20927) +++ trunk/busybox/networking/ping.c 2008-02-01 23:25:32 UTC (rev 20928) @@ -94,7 +94,7 @@ char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN]; pingsock = create_icmp_socket(); - pingaddr = lsa->sin; + pingaddr = lsa->u.sin; pkt = (struct icmp *) packet; memset(pkt, 0, sizeof(packet)); @@ -138,7 +138,7 @@ char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN]; pingsock = create_icmp6_socket(); - pingaddr = lsa->sin6; + pingaddr = lsa->u.sin6; pkt = (struct icmp6_hdr *) packet; memset(pkt, 0, sizeof(packet)); From vda at busybox.net Sat Feb 2 08:23:44 2008 From: vda at busybox.net (vda at busybox.net) Date: Sat, 2 Feb 2008 08:23:44 -0800 (PST) Subject: svn commit: trunk/busybox/networking Message-ID: <20080202162344.68359120108@busybox.net> Author: vda Date: 2008-02-02 08:23:43 -0800 (Sat, 02 Feb 2008) New Revision: 20929 Log: nc: fix fallout from C99 standard compliance change Modified: trunk/busybox/networking/nc_bloaty.c Changeset: Modified: trunk/busybox/networking/nc_bloaty.c =================================================================== --- trunk/busybox/networking/nc_bloaty.c 2008-02-01 23:25:32 UTC (rev 20928) +++ trunk/busybox/networking/nc_bloaty.c 2008-02-02 16:23:43 UTC (rev 20929) @@ -1,7 +1,7 @@ /* Based on netcat 1.10 RELEASE 960320 written by hobbit at avian.org. * Released into public domain by the author. * - * Copyright (C) 2007 Denis Vlasenko. + * Copyright (C) 2007 Denys Vlasenko. * * Licensed under GPLv2, see file LICENSE in this tarball for details. */ @@ -243,7 +243,7 @@ /* wrap connect inside a timer, and hit it */ arm(o_wait); if (setjmp(jbuf) == 0) { - rr = connect(fd, &themaddr->sa, themaddr->len); + rr = connect(fd, &themaddr->u.sa, themaddr->len); unarm(); } else { /* setjmp: connect failed... */ rr = -1; @@ -275,10 +275,10 @@ random unknown port is probably not very useful without "netstat". */ if (o_verbose) { char *addr; - rr = getsockname(netfd, &ouraddr->sa, &ouraddr->len); + rr = getsockname(netfd, &ouraddr->u.sa, &ouraddr->len); if (rr < 0) bb_perror_msg_and_die("getsockname after bind"); - addr = xmalloc_sockaddr2dotted(&ouraddr->sa); + addr = xmalloc_sockaddr2dotted(&ouraddr->u.sa); fprintf(stderr, "listening on %s ...\n", addr); free(addr); } @@ -306,7 +306,7 @@ remend.len = LSA_SIZEOF_SA; if (themaddr) { remend = *themaddr; - xconnect(netfd, &themaddr->sa, themaddr->len); + xconnect(netfd, &themaddr->u.sa, themaddr->len); } /* peek first packet and remember peer addr */ arm(o_wait); /* might as well timeout this, too */ @@ -314,7 +314,7 @@ /* (*ouraddr) is prefilled with "default" address */ /* and here we block... */ rr = recv_from_to(netfd, NULL, 0, MSG_PEEK, /*was bigbuf_net, BIGSIZ*/ - &remend.sa, &ouraddr->sa, ouraddr->len); + &remend.u.sa, &ouraddr->u.sa, ouraddr->len); if (rr < 0) bb_perror_msg_and_die("recvfrom"); unarm(); @@ -323,25 +323,25 @@ /* Now we learned *to which IP* peer has connected, and we want to anchor our socket on it, so that our outbound packets will have correct local IP. Unfortunately, bind() on already bound socket will fail now (EINVAL): - xbind(netfd, &ouraddr->sa, ouraddr->len); + xbind(netfd, &ouraddr->u.sa, ouraddr->len); Need to read the packet, save data, close this socket and create new one, and bind() it. TODO */ if (!themaddr) - xconnect(netfd, &remend.sa, ouraddr->len); + xconnect(netfd, &remend.u.sa, ouraddr->len); } else { /* TCP */ arm(o_wait); /* wrap this in a timer, too; 0 = forever */ if (setjmp(jbuf) == 0) { again: remend.len = LSA_SIZEOF_SA; - rr = accept(netfd, &remend.sa, &remend.len); + rr = accept(netfd, &remend.u.sa, &remend.len); if (rr < 0) bb_perror_msg_and_die("accept"); - if (themaddr && memcmp(&remend.sa, &themaddr->sa, remend.len) != 0) { + if (themaddr && memcmp(&remend.u.sa, &themaddr->u.sa, remend.len) != 0) { /* nc 1.10 bails out instead, and its error message * is not suppressed by o_verbose */ if (o_verbose) { - char *remaddr = xmalloc_sockaddr2dotted(&remend.sa); + char *remaddr = xmalloc_sockaddr2dotted(&remend.u.sa); bb_error_msg("connect from wrong ip/port %s ignored", remaddr); free(remaddr); } @@ -356,7 +356,7 @@ doing a listen-on-any on a multihomed machine. This allows one to offer different services via different alias addresses, such as the "virtual web site" hack. */ - rr = getsockname(netfd, &ouraddr->sa, &ouraddr->len); + rr = getsockname(netfd, &ouraddr->u.sa, &ouraddr->len); if (rr < 0) bb_perror_msg_and_die("getsockname after accept"); } @@ -393,9 +393,9 @@ accept the connection and then reject undesireable ones by closing. In other words, we need a TCP MSG_PEEK. */ /* bbox: removed most of it */ - lcladdr = xmalloc_sockaddr2dotted(&ouraddr->sa); - remaddr = xmalloc_sockaddr2dotted(&remend.sa); - remhostname = o_nflag ? remaddr : xmalloc_sockaddr2host(&remend.sa); + lcladdr = xmalloc_sockaddr2dotted(&ouraddr->u.sa); + remaddr = xmalloc_sockaddr2dotted(&remend.u.sa); + remhostname = o_nflag ? remaddr : xmalloc_sockaddr2host(&remend.u.sa); fprintf(stderr, "connect to %s from %s (%s)\n", lcladdr, remhostname, remaddr); free(lcladdr); @@ -433,7 +433,7 @@ /* Set a temporary connect timeout, so packet filtration doesnt cause us to hang forever, and hit it */ o_wait = 5; /* enough that we'll notice?? */ - rr = xsocket(ouraddr->sa.sa_family, SOCK_STREAM, 0); + rr = xsocket(ouraddr->u.sa.sa_family, SOCK_STREAM, 0); set_nport(themaddr, htons(SLEAZE_PORT)); connect_w_timeout(rr); /* don't need to restore themaddr's port, it's not used anymore */ @@ -746,12 +746,12 @@ if (option_mask32 & OPT_s) { /* local address */ /* if o_lport is still 0, then we will use random port */ ouraddr = xhost2sockaddr(str_s, o_lport); - x = xsocket(ouraddr->sa.sa_family, x, 0); + x = xsocket(ouraddr->u.sa.sa_family, x, 0); } else { /* We try IPv6, then IPv4, unless addr family is * implicitly set by way of remote addr/port spec */ x = xsocket_type(&ouraddr, - USE_FEATURE_IPV6((themaddr ? themaddr->sa.sa_family : AF_UNSPEC),) + USE_FEATURE_IPV6((themaddr ? themaddr->u.sa.sa_family : AF_UNSPEC),) x); if (o_lport) set_nport(ouraddr, htons(o_lport)); @@ -760,7 +760,7 @@ setsockopt_reuseaddr(netfd); if (o_udpmode) socket_want_pktinfo(netfd); - xbind(netfd, &ouraddr->sa, ouraddr->len); + xbind(netfd, &ouraddr->u.sa, ouraddr->len); #if 0 setsockopt(netfd, SOL_SOCKET, SO_RCVBUF, &o_rcvbuf, sizeof o_rcvbuf); setsockopt(netfd, SOL_SOCKET, SO_SNDBUF, &o_sndbuf, sizeof o_sndbuf); @@ -796,7 +796,7 @@ remend = *themaddr; if (o_verbose) - themdotted = xmalloc_sockaddr2dotted(&themaddr->sa); + themdotted = xmalloc_sockaddr2dotted(&themaddr->u.sa); x = connect_w_timeout(netfd); if (o_zero && x == 0 && o_udpmode) /* if UDP scanning... */ From vda at busybox.net Sat Feb 2 08:43:51 2008 From: vda at busybox.net (vda at busybox.net) Date: Sat, 2 Feb 2008 08:43:51 -0800 (PST) Subject: svn commit: trunk/busybox/procps Message-ID: <20080202164351.E532E120108@busybox.net> Author: vda Date: 2008-02-02 08:43:51 -0800 (Sat, 02 Feb 2008) New Revision: 20930 Log: ps: add (disabled) compat code Modified: trunk/busybox/procps/ps.c Changeset: Modified: trunk/busybox/procps/ps.c =================================================================== --- trunk/busybox/procps/ps.c 2008-02-02 16:23:43 UTC (rev 20929) +++ trunk/busybox/procps/ps.c 2008-02-02 16:43:51 UTC (rev 20930) @@ -157,7 +157,21 @@ static void func_user(char *buf, int size, const procps_status_t *ps) { +#if 1 safe_strncpy(buf, get_cached_username(ps->uid), size+1); +#else + /* "compatible" version, but it's larger */ + /* procps 2.18 shows numeric UID if name overflows the field */ + /* TODO: get_cached_username() returns numeric string if + * user has no passwd record, we will display it + * left-justified here; too long usernames are shown + * as _right-justified_ IDs. Is it worth fixing? */ + const char *user = get_cached_username(ps->uid); + if (strlen(user) <= size) + safe_strncpy(buf, get_cached_username(ps->uid), size+1); + else + sprintf(buf, "%*u", size, (unsigned)ps->uid); +#endif } static void func_comm(char *buf, int size, const procps_status_t *ps) From vda at busybox.net Sat Feb 2 09:54:36 2008 From: vda at busybox.net (vda at busybox.net) Date: Sat, 2 Feb 2008 09:54:36 -0800 (PST) Subject: svn commit: trunk/busybox: include networking Message-ID: <20080202175436.80A6A120108@busybox.net> Author: vda Date: 2008-02-02 09:54:35 -0800 (Sat, 02 Feb 2008) New Revision: 20931 Log: sendmail: fixes by Vladimir Dronnikov Modified: trunk/busybox/include/usage.h trunk/busybox/networking/sendmail.c Changeset: Modified: trunk/busybox/include/usage.h =================================================================== --- trunk/busybox/include/usage.h 2008-02-02 16:43:51 UTC (rev 20930) +++ trunk/busybox/include/usage.h 2008-02-02 17:54:35 UTC (rev 20931) @@ -3135,26 +3135,28 @@ #define selinuxenabled_full_usage #define sendmail_trivial_usage \ - "[-d] {-t to}+ [-f from] [-n[notify]] [-s subject] [-b file]*\n" \ - "[-a attachment]* [-c charset] [-w timeout] [-h server] [-p port] [-U user] [-P password]" + "{-t to}+ {-f from} [-n[notify]] [-s subject] [-b file]*\n" \ + "[-a attachment]* [-c charset]" \ + USE_FEATURE_SENDMAIL_NETWORK("\n" \ + " [-d] [-w timeout] [-h server] [-p port] [-U user] [-P password]" \ + ) #define sendmail_full_usage \ - "Send an email from to with subject and optional attachments.\n" \ - "Body is read from stdin or from optional files" \ + "Send an email with and optional attachments." \ "\n\nArguments:\n" \ - " -d Just dump composed message\n" \ " -t to Recipient email. May be multiple\n" \ - " -f from Sender email\n" \ + " -f from Sender address\n" \ " -n[notify] Optional notification address. If just -n given then notifies the sender\n" \ " -s subject Optional subject\n" \ " -b filename Optional body content file. May be multiple\n" \ " -a filename Optional file attachment. May be multiple\n" \ " -c charset Assumed charset for body and subject [koi8-r]" \ USE_FEATURE_SENDMAIL_NETWORK("\n" \ + " -d Just dump composed message\n" \ " -w timeout Set timeout on network operations\n" \ " -h server Optional mail server name or IP [127.0.0.1]\n" \ " -p port Optional mail server port [25]\n" \ " -U username Authenticate using AUTH LOGIN with specified username\n" \ - " -P password Authenticate using AUTH LOGIN with specified password"\ + " -P password Authenticate using AUTH LOGIN with specified password" \ ) #define seq_trivial_usage \ Modified: trunk/busybox/networking/sendmail.c =================================================================== --- trunk/busybox/networking/sendmail.c 2008-02-02 16:43:51 UTC (rev 20930) +++ trunk/busybox/networking/sendmail.c 2008-02-02 17:54:35 UTC (rev 20931) @@ -16,47 +16,48 @@ DST_BUF_SIZE = 4 * ((SRC_BUF_SIZE + 2) / 3), }; -static void uuencode(const char *fname) +static void uuencode(char *fname, const char *text) { +#define src_buf text int fd; - char src_buf[SRC_BUF_SIZE]; - char dst_buf[1 + DST_BUF_SIZE + 1]; +#define len fd + char dst_buf[DST_BUF_SIZE + 1]; - fd = xopen(fname, O_RDONLY); - fflush(stdout); - dst_buf[0] = '\n'; + if (fname) { + fd = xopen(fname, O_RDONLY); + src_buf = bb_common_bufsiz1; + } else { + len = strlen(text); + } + + fflush(stdout); // sync stdio and unistd output while (1) { - size_t size = full_read(fd, src_buf, SRC_BUF_SIZE); + size_t size; + if (fname) { + size = full_read(fd, (char *)src_buf, SRC_BUF_SIZE); + if ((ssize_t)size < 0) + bb_perror_msg_and_die(bb_msg_read_error); + } else { + size = len; + if (len > SRC_BUF_SIZE) + size = SRC_BUF_SIZE; + } if (!size) break; - if ((ssize_t)size < 0) - bb_perror_msg_and_die(bb_msg_read_error); - /* Encode the buffer we just read in */ - bb_uuencode(dst_buf + 1, src_buf, size, bb_uuenc_tbl_base64); - xwrite(STDOUT_FILENO, dst_buf, 1 + 4 * ((size + 2) / 3)); + // Encode the buffer we just read in + bb_uuencode(dst_buf, src_buf, size, bb_uuenc_tbl_base64); + if (fname) { + xwrite(STDOUT_FILENO, "\n", 1); + } else { + src_buf += size; + len -= size; + } + xwrite(STDOUT_FILENO, dst_buf, 4 * ((size + 2) / 3)); } - close(fd); + if (ENABLE_FEATURE_CLEAN_UP && fname) + close(fd); } -// "inline" version -// encodes content of given buffer instead of fd -// used to encode subject and authentication terms -static void uuencode_inline(const char *src_buf) -{ - size_t len; - char dst_buf[DST_BUF_SIZE + 1]; - - len = strlen(src_buf); - fflush(stdout); - while (len > 0) { - size_t chunk = (len <= SRC_BUF_SIZE) ? len : SRC_BUF_SIZE; - bb_uuencode(dst_buf, src_buf, chunk, bb_uuenc_tbl_base64); - xwrite(STDOUT_FILENO, dst_buf, 4 * ((chunk + 2) / 3)); - src_buf += chunk; - len -= chunk; - } -} - #if ENABLE_FEATURE_SENDMAIL_NETWORK // generic signal handler static void signal_handler(int signo) @@ -72,7 +73,7 @@ bb_error_msg_and_die("child exited (%d)", WEXITSTATUS(err)); } -static pid_t helper_pid = -1; +static pid_t helper_pid; // read stdin, parses first bytes to a number, i.e. server response // if code = -1 then just return this number @@ -92,7 +93,7 @@ return n; } } - // TODO!!!: is there more elegant way to terminate child on program failure? + // TODO: is there more elegant way to terminate child on program failure? if (helper_pid > 0) kill(helper_pid, SIGTERM); if (!answer) @@ -104,9 +105,24 @@ static int puts_and_check(const char *msg, int code, const char *errmsg) { - puts(msg); + printf("%s\r\n", msg); return check(code, errmsg); } + +// strip argument of bad chars +static char *sane(char *str) +{ + char *s = str; + char *p = s; + while (*s) { + if (isalnum(*s) || '_' == *s || '-' == *s || '.' == *s || '@' == *s) { + *p++ = *s; + } + s++; + } + *p = '\0'; + return str; +} #endif int sendmail_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; @@ -115,10 +131,10 @@ llist_t *recipients = NULL; llist_t *bodies = NULL; llist_t *attachments = NULL; - const char *from; - const char *notify; + char *from; + char *notify = NULL; const char *subject; - const char *charset = "utf-8"; + char *charset = (char*)"utf-8"; #if ENABLE_FEATURE_SENDMAIL_NETWORK const char *wsecs = "10"; const char *server = "127.0.0.1"; @@ -133,6 +149,7 @@ OPT_f = 1 << 0, // sender OPT_n = 1 << 2, // notification OPT_s = 1 << 3, // subject given + OPT_c = 1 << 6, // charset OPT_d = 1 << 7, // dry run - no networking OPT_w = 1 << 8, // network timeout OPT_h = 1 << 9, // server @@ -152,10 +169,11 @@ //argc -= optind; argv += optind; -//printf("OPTS[%4x]\n", opts); + // sanitize user input + sane(from); + if (opts & OPT_c) + sane(charset); - // TODO!!!: strip recipients and sender from <> - // establish connection #if ENABLE_FEATURE_SENDMAIL_NETWORK timeout = xatou(wsecs); @@ -167,24 +185,24 @@ bb_error_msg_and_die("no password"); } } -//printf("OPTS[%4x][%s][%s]\n", opts, opt_user, opt_pass); -//exit(0); // set chat timeout alarm(timeout); // connect to server if (argv[0]) { // if connection helper given // setup vanilla unidirectional pipes interchange + int idx; int pipes[4]; xpipe(pipes); xpipe(pipes+2); helper_pid = vfork(); if (helper_pid < 0) bb_perror_msg_and_die("vfork"); - xdup2(pipes[(helper_pid)?0:2], STDIN_FILENO); - xdup2(pipes[(helper_pid)?3:1], STDOUT_FILENO); + idx = (!helper_pid)*2; + xdup2(pipes[idx], STDIN_FILENO); + xdup2(pipes[3-idx], STDOUT_FILENO); if (ENABLE_FEATURE_CLEAN_UP) - for (int i = 4; --i >= 0; ) + for (int i = 4; --i >= 0;) if (pipes[i] > STDOUT_FILENO) close(pipes[i]); // replace child with connection helper @@ -210,10 +228,12 @@ check(220, "INIT"); } // mail user specified? try modern AUTHentication - if (opt_user && (334 == puts_and_check("auth login", -1, "auth login"))) { - uuencode_inline(opt_user); + if ((opts & OPT_U) + && (334 == puts_and_check("auth login", -1, "auth login")) + ) { + uuencode(NULL, opt_user); puts_and_check("", 334, "AUTH"); - uuencode_inline(opt_pass); + uuencode(NULL, opt_pass); puts_and_check("", 235, "AUTH"); // no mail user specified or modern AUTHentication is not supported? } else { @@ -224,15 +244,15 @@ domain++; else domain = "local"; - printf("helo %s\n", domain); + printf("helo %s\r\n", domain); check(250, "HELO"); } // set addresses - printf("mail from:<%s>\n", from); + printf("mail from:<%s>\r\n", from); check(250, "MAIL FROM"); for (llist_t *to = recipients; to; to = to->link) { - printf("rcpt to:<%s>\n", to->data); + printf("rcpt to:<%s>\r\n", sane(to->data)); check(250, "RCPT TO"); } puts_and_check("data", 354, "DATA"); @@ -243,60 +263,64 @@ // now put message // put address headers - printf("From: %s\n", from); + printf("From: %s\r\n", from); for (llist_t *to = recipients; to; to = to->link) { - printf("To: %s\n", to->data); + printf("To: %s\r\n", sane(to->data)); } // put encoded subject if (opts & OPT_s) { printf("Subject: =?%s?B?", charset); - uuencode_inline(subject); - puts("?="); + uuencode(NULL, subject); + puts("?=\r"); } // put notification if (opts & OPT_n) { - const char *s = notify; - if (!s[0]) - s = from; // notify sender by default - printf("Disposition-Notification-To: %s\n", s); + // -n without parameter? + if (!notify) + notify = from; // notify sender by default + printf("Disposition-Notification-To: %s\r\n", sane(notify)); } // put common headers and body start //srand(?); boundary = xasprintf("%d-%d-%d", rand(), rand(), rand()); printf( - "X-Mailer: busybox " BB_VER " sendmail\n" - "X-Priority: 3\n" - "Message-ID: <%s>\n" - "Mime-Version: 1.0\n" - "Content-Type: multipart/mixed; boundary=\"%s\"\n" - "\n" - "--%s\n" - "Content-Type: text/plain; charset=%s\n" - "%s\n%s" - , boundary, boundary, boundary, charset + "X-Mailer: busybox " BB_VER " sendmail\r\n" + "Message-ID: <%s>\r\n" + "Mime-Version: 1.0\r\n" + "%smultipart/mixed; boundary=\"%s\"\r\n" + "\r\n" + "--%s\r\n" + "%stext/plain; charset=%s\r\n" + "%s\r\n%s" + , boundary + , "Content-Type: " + , boundary, boundary + , "Content-Type: " + , charset , "Content-Disposition: inline" - , "Content-Transfer-Encoding: base64\n" + , "Content-Transfer-Encoding: base64\r\n" ); // put body(ies) for (llist_t *f = bodies; f; f = f->link) { - uuencode(f->data); + uuencode(f->data, NULL); } // put attachment(s) for (llist_t *f = attachments; f; f = f->link) { printf( - "\n--%s\n" - "Content-Type: application/octet-stream\n" - "%s; filename=\"%s\"\n" + "\r\n--%s\r\n" + "%sapplication/octet-stream\r\n" + "%s; filename=\"%s\"\r\n" "%s" , boundary + , "Content-Type: " , "Content-Disposition: inline" , bb_get_last_path_component_strip(f->data) - , "Content-Transfer-Encoding: base64\n" + , "Content-Transfer-Encoding: base64\r\n" ); - uuencode(f->data); + uuencode(f->data, NULL); } // put terminator - printf("\n--%s--\n\n", boundary); + printf("\r\n--%s--\r\n\r\n", boundary); if (ENABLE_FEATURE_CLEAN_UP) free(boundary); From bugs at busybox.net Sat Feb 2 10:00:08 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Sat, 2 Feb 2008 10:00:08 -0800 Subject: [BusyBox 0001999]: patch to support the DHCP options 121, 43 (vendorinfo, staticroutes) Message-ID: <206e0968baab238ecfe70942e37ede34@bugs.busybox.net> A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=1999 ====================================================================== Reported By: nmav Assigned To: BusyBox ====================================================================== Project: BusyBox Issue ID: 1999 Category: Networking Support Reproducibility: always Severity: feature Priority: normal Status: assigned ====================================================================== Date Submitted: 01-29-2008 05:01 PST Last Modified: 02-02-2008 10:00 PST ====================================================================== Summary: patch to support the DHCP options 121,43 (vendorinfo,staticroutes) Description: This is a patch to enhance udhcpc to include the DHCP options 43 and 121. This patch is based on the 1.6.0 release of busybox. It was developed for Gennet S.A. ====================================================================== ---------------------------------------------------------------------- vda - 02-02-08 10:00 ---------------------------------------------------------------------- Needs to be rebased to more recent busybox. Unfortunately, 1.9.0 had many changes in DHCP applets. Issue History Date Modified Username Field Change ====================================================================== 01-29-08 05:01 nmav New Issue 01-29-08 05:01 nmav Status new => assigned 01-29-08 05:01 nmav Assigned To => BusyBox 01-29-08 05:01 nmav File Added: udhcpc-vendorinfo-static-routes.patch 02-02-08 10:00 vda Note Added: 0003644 ====================================================================== From vda at busybox.net Sat Feb 2 10:35:56 2008 From: vda at busybox.net (vda at busybox.net) Date: Sat, 2 Feb 2008 10:35:56 -0800 (PST) Subject: svn commit: trunk/busybox: include libbb shell Message-ID: <20080202183556.9C9D4120108@busybox.net> Author: vda Date: 2008-02-02 10:35:55 -0800 (Sat, 02 Feb 2008) New Revision: 20932 Log: msh: fix Ctrl-C handling with line editing Modified: trunk/busybox/include/libbb.h trunk/busybox/libbb/lineedit.c trunk/busybox/shell/msh.c Changeset: Modified: trunk/busybox/include/libbb.h =================================================================== --- trunk/busybox/include/libbb.h 2008-02-02 17:54:35 UTC (rev 20931) +++ trunk/busybox/include/libbb.h 2008-02-02 18:35:55 UTC (rev 20932) @@ -963,10 +963,9 @@ }; line_input_t *new_line_input_t(int flags); /* Returns: - * -1 on read errors or EOF, or on bare Ctrl-D. - * 0 on ctrl-C, + * -1 on read errors or EOF, or on bare Ctrl-D, + * 0 on ctrl-C (the line entered is still returned in 'command'), * >0 length of input string, including terminating '\n' - * [is this true? stores "" in 'command' if return value is 0 or -1] */ int read_line_input(const char* prompt, char* command, int maxsize, line_input_t *state); #else Modified: trunk/busybox/libbb/lineedit.c =================================================================== --- trunk/busybox/libbb/lineedit.c 2008-02-02 17:54:35 UTC (rev 20931) +++ trunk/busybox/libbb/lineedit.c 2008-02-02 18:35:55 UTC (rev 20932) @@ -1315,8 +1315,8 @@ #define CTRL(a) ((a) & ~0x40) /* Returns: - * -1 on read errors or EOF, or on bare Ctrl-D. - * 0 on ctrl-C, + * -1 on read errors or EOF, or on bare Ctrl-D, + * 0 on ctrl-C (the line entered is still returned in 'command'), * >0 length of input string, including terminating '\n' */ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t *st) Modified: trunk/busybox/shell/msh.c =================================================================== --- trunk/busybox/shell/msh.c 2008-02-02 17:54:35 UTC (rev 20931) +++ trunk/busybox/shell/msh.c 2008-02-02 18:35:55 UTC (rev 20932) @@ -4836,7 +4836,9 @@ static int position = 0, size = 0; while (size == 0 || position >= size) { - read_line_input(current_prompt, filechar_cmdbuf, BUFSIZ, line_input_state); + /* Repeat if Ctrl-C is pressed. TODO: exit on -1 (error/EOF)? */ + while (read_line_input(current_prompt, filechar_cmdbuf, BUFSIZ, line_input_state) == 0) + continue; size = strlen(filechar_cmdbuf); position = 0; } From vda at busybox.net Sat Feb 2 10:50:50 2008 From: vda at busybox.net (vda at busybox.net) Date: Sat, 2 Feb 2008 10:50:50 -0800 (PST) Subject: svn commit: trunk/busybox/shell Message-ID: <20080202185050.B99FF120108@busybox.net> Author: vda Date: 2008-02-02 10:50:50 -0800 (Sat, 02 Feb 2008) New Revision: 20933 Log: msh: also handle EOF/read errors correctly Modified: trunk/busybox/shell/msh.c Changeset: Modified: trunk/busybox/shell/msh.c =================================================================== --- trunk/busybox/shell/msh.c 2008-02-02 18:35:55 UTC (rev 20932) +++ trunk/busybox/shell/msh.c 2008-02-02 18:50:50 UTC (rev 20933) @@ -4836,11 +4836,11 @@ static int position = 0, size = 0; while (size == 0 || position >= size) { - /* Repeat if Ctrl-C is pressed. TODO: exit on -1 (error/EOF)? */ - while (read_line_input(current_prompt, filechar_cmdbuf, BUFSIZ, line_input_state) == 0) - continue; - size = strlen(filechar_cmdbuf); + size = read_line_input(current_prompt, filechar_cmdbuf, BUFSIZ, line_input_state); + if (size < 0) /* Error/EOF */ + exit(0); position = 0; + /* if Ctrl-C, size == 0 and loop will repeat */ } c = filechar_cmdbuf[position]; position++; From vda at busybox.net Sat Feb 2 10:54:58 2008 From: vda at busybox.net (vda at busybox.net) Date: Sat, 2 Feb 2008 10:54:58 -0800 (PST) Subject: svn commit: trunk/busybox/e2fsprogs Message-ID: <20080202185458.05FFA120157@busybox.net> Author: vda Date: 2008-02-02 10:54:58 -0800 (Sat, 02 Feb 2008) New Revision: 20934 Log: fsck: don't kill pid -1! (Roy Marples ) Modified: trunk/busybox/e2fsprogs/fsck.c Changeset: Modified: trunk/busybox/e2fsprogs/fsck.c =================================================================== --- trunk/busybox/e2fsprogs/fsck.c 2008-02-02 18:50:50 UTC (rev 20933) +++ trunk/busybox/e2fsprogs/fsck.c 2008-02-02 18:54:58 UTC (rev 20934) @@ -663,6 +663,12 @@ for (i = num_args+1; i < argc; i++) free(argv[i]); + /* No pid, so don't record an instance */ + if (pid < 0) { + free(inst); + return; + } + inst->pid = pid; inst->prog = argv[0]; inst->type = xstrdup(type); From vda at busybox.net Sat Feb 2 11:05:36 2008 From: vda at busybox.net (vda at busybox.net) Date: Sat, 2 Feb 2008 11:05:36 -0800 (PST) Subject: svn commit: trunk/busybox/loginutils Message-ID: <20080202190536.C5C3012015F@busybox.net> Author: vda Date: 2008-02-02 11:05:36 -0800 (Sat, 02 Feb 2008) New Revision: 20935 Log: getty: don't try to detect parity on local lines (Joakim Tjernlund ) Modified: trunk/busybox/loginutils/getty.c Changeset: Modified: trunk/busybox/loginutils/getty.c =================================================================== --- trunk/busybox/loginutils/getty.c 2008-02-02 18:54:58 UTC (rev 20934) +++ trunk/busybox/loginutils/getty.c 2008-02-02 19:05:36 UTC (rev 20935) @@ -435,7 +435,7 @@ /* Do parity bit handling. */ ascval = c & 0177; - if (c != ascval) { /* "parity" bit on ? */ + if (!(op->flags & F_LOCAL) && (c != ascval)) { /* "parity" bit on ? */ bits = 1; mask = 1; while (mask & 0177) { From bugs at busybox.net Sat Feb 2 19:35:46 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Sat, 2 Feb 2008 19:35:46 -0800 Subject: [BusyBox 0002024]: Command substitution in busybox-1.8.2 does not work Message-ID: <8d640e8ec64c3cfde20896eb1127c259@busybox.net> The following issue has been SUBMITTED. ====================================================================== http://busybox.net/bugs/view.php?id=2024 ====================================================================== Reported By: Craig Assigned To: BusyBox ====================================================================== Project: BusyBox Issue ID: 2024 Category: Standards Compliance Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 02-02-2008 19:35 PST Last Modified: 02-02-2008 19:35 PST ====================================================================== Summary: Command substitution in busybox-1.8.2 does not work Description: I have busybox in /tmp/myroot # mount -t proc proc /tmp/myroot/proc/ # chroot /tmp/myroot/ /bin/sh / # sed -n 's/^ *\([0-9]\+\) \+misc$/\1/p' /proc/devices 10 / # A=`sed -n 's/^ *\([0-9]\+\) \+misc$/\1/p' /proc/devices` / # echo $A / # A=`ls` / # echo $A bin dev devmap_mknod.sh etc linuxrc new proc usr / # Somehow the substitution does not work for the sed line, any hints? What's wrong here? I'm desperate :( If interested, also see: http://www.mail-archive.com/busybox at busybox.net/msg02975.html ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 02-02-08 19:35 Craig New Issue 02-02-08 19:35 Craig Status new => assigned 02-02-08 19:35 Craig Assigned To => BusyBox ====================================================================== From vda at busybox.net Sun Feb 3 14:01:09 2008 From: vda at busybox.net (vda at busybox.net) Date: Sun, 3 Feb 2008 14:01:09 -0800 (PST) Subject: svn commit: trunk/busybox/shell Message-ID: <20080203220109.8CF5A12C670@busybox.net> Author: vda Date: 2008-02-03 14:01:08 -0800 (Sun, 03 Feb 2008) New Revision: 20937 Log: ash: readability enhancement, no code changes Modified: trunk/busybox/shell/ash.c Changeset: Modified: trunk/busybox/shell/ash.c =================================================================== --- trunk/busybox/shell/ash.c 2008-02-02 21:49:48 UTC (rev 20936) +++ trunk/busybox/shell/ash.c 2008-02-03 22:01:08 UTC (rev 20937) @@ -1475,7 +1475,7 @@ { while (*pfx) { if (*pfx++ != *string++) - return 0; + return NULL; } return (char *) string; } @@ -6500,8 +6500,10 @@ /* unsigned flags; */ }; #define IS_BUILTIN_SPECIAL(b) ((b)->name[0] & 1) +/* "regular" bltins always take precedence over commands, + * regardless of PATH=....%builtin... position */ #define IS_BUILTIN_REGULAR(b) ((b)->name[0] & 2) -#define IS_BUILTIN_ASSIGN(b) ((b)->name[0] & 4) +#define IS_BUILTIN_ASSIGN(b) ((b)->name[0] & 4) struct cmdentry { int cmdtype; @@ -6788,10 +6790,11 @@ struct cmdentry entry; char *name; - while ((c = nextopt("r")) != '\0') { + if (nextopt("r") != '\0') { clearcmdentry(0); return 0; } + if (*argptr == NULL) { for (pp = cmdtable; pp < &cmdtable[CMDTABLESIZE]; pp++) { for (cmdp = *pp; cmdp; cmdp = cmdp->next) { @@ -6801,13 +6804,16 @@ } return 0; } + c = 0; while ((name = *argptr) != NULL) { cmdp = cmdlookup(name, 0); if (cmdp != NULL && (cmdp->cmdtype == CMDNORMAL - || (cmdp->cmdtype == CMDBUILTIN && builtinloc >= 0))) + || (cmdp->cmdtype == CMDBUILTIN && builtinloc >= 0)) + ) { delete_cmd_entry(); + } find_command(name, &entry, DO_ERR, pathval()); if (entry.cmdtype == CMDUNKNOWN) c = 1; @@ -6828,12 +6834,13 @@ for (pp = cmdtable; pp < &cmdtable[CMDTABLESIZE]; pp++) { for (cmdp = *pp; cmdp; cmdp = cmdp->next) { - if (cmdp->cmdtype == CMDNORMAL || ( - cmdp->cmdtype == CMDBUILTIN && - !(IS_BUILTIN_REGULAR(cmdp->param.cmd)) && - builtinloc > 0 - )) + if (cmdp->cmdtype == CMDNORMAL + || (cmdp->cmdtype == CMDBUILTIN + && !IS_BUILTIN_REGULAR(cmdp->param.cmd) + && builtinloc > 0) + ) { cmdp->rehash = 1; + } } } } @@ -6845,15 +6852,14 @@ * Called with interrupts off. */ static void -changepath(const char *newval) +changepath(const char *new) { - const char *old, *new; + const char *old; + int firstchange; int idx; - int firstchange; int idx_bltin; old = pathval(); - new = newval; firstchange = 9999; /* assume no change */ idx = 0; idx_bltin = -1; @@ -6869,9 +6875,8 @@ break; if (*new == '%' && idx_bltin < 0 && prefix(new + 1, "builtin")) idx_bltin = idx; - if (*new == ':') { + if (*new == ':') idx++; - } new++, old++; } if (builtinloc < 0 && idx_bltin >= 0) From vda at busybox.net Sun Feb 3 14:04:20 2008 From: vda at busybox.net (vda at busybox.net) Date: Sun, 3 Feb 2008 14:04:20 -0800 (PST) Subject: svn commit: trunk/busybox/procps Message-ID: <20080203220420.4D16012C692@busybox.net> Author: vda Date: 2008-02-03 14:04:19 -0800 (Sun, 03 Feb 2008) New Revision: 20938 Log: ps: fixlet to disabled compat code Modified: trunk/busybox/procps/ps.c Changeset: Modified: trunk/busybox/procps/ps.c =================================================================== --- trunk/busybox/procps/ps.c 2008-02-03 22:01:08 UTC (rev 20937) +++ trunk/busybox/procps/ps.c 2008-02-03 22:04:19 UTC (rev 20938) @@ -4,7 +4,7 @@ * * Copyright (C) 1999-2004 by Erik Andersen * Fix for SELinux Support:(c)2007 Hiroshi Shinji - (c)2007 Yuichi Nakamura + * (c)2007 Yuichi Nakamura * * Licensed under the GPL version 2, see the file LICENSE in this tarball. */ @@ -168,7 +168,7 @@ * as _right-justified_ IDs. Is it worth fixing? */ const char *user = get_cached_username(ps->uid); if (strlen(user) <= size) - safe_strncpy(buf, get_cached_username(ps->uid), size+1); + safe_strncpy(buf, user, size+1); else sprintf(buf, "%*u", size, (unsigned)ps->uid); #endif From bugs at busybox.net Sun Feb 3 14:09:54 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Sun, 3 Feb 2008 14:09:54 -0800 Subject: [BusyBox 0002024]: Command substitution in busybox-1.8.2 does not work Message-ID: A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=2024 ====================================================================== Reported By: Craig Assigned To: BusyBox ====================================================================== Project: BusyBox Issue ID: 2024 Category: Standards Compliance Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 02-02-2008 19:35 PST Last Modified: 02-03-2008 14:09 PST ====================================================================== Summary: Command substitution in busybox-1.8.2 does not work Description: I have busybox in /tmp/myroot # mount -t proc proc /tmp/myroot/proc/ # chroot /tmp/myroot/ /bin/sh / # sed -n 's/^ *\([0-9]\+\) \+misc$/\1/p' /proc/devices 10 / # A=`sed -n 's/^ *\([0-9]\+\) \+misc$/\1/p' /proc/devices` / # echo $A / # A=`ls` / # echo $A bin dev devmap_mknod.sh etc linuxrc new proc usr / # Somehow the substitution does not work for the sed line, any hints? What's wrong here? I'm desperate :( If interested, also see: http://www.mail-archive.com/busybox at busybox.net/msg02975.html ====================================================================== ---------------------------------------------------------------------- vda - 02-03-08 14:09 ---------------------------------------------------------------------- Please post your .config Issue History Date Modified Username Field Change ====================================================================== 02-02-08 19:35 Craig New Issue 02-02-08 19:35 Craig Status new => assigned 02-02-08 19:35 Craig Assigned To => BusyBox 02-03-08 14:09 vda Note Added: 0003654 ====================================================================== From vda at busybox.net Sun Feb 3 15:52:45 2008 From: vda at busybox.net (vda at busybox.net) Date: Sun, 3 Feb 2008 15:52:45 -0800 (PST) Subject: svn commit: trunk/busybox/util-linux Message-ID: <20080203235245.8843812C6AF@busybox.net> Author: vda Date: 2008-02-03 15:52:41 -0800 (Sun, 03 Feb 2008) New Revision: 20939 Log: mkswap: do not do extra seek mount: add another mount helper call method Modified: trunk/busybox/util-linux/Config.in trunk/busybox/util-linux/mkswap.c trunk/busybox/util-linux/mount.c Changeset: Modified: trunk/busybox/util-linux/Config.in =================================================================== --- trunk/busybox/util-linux/Config.in 2008-02-03 22:04:19 UTC (rev 20938) +++ trunk/busybox/util-linux/Config.in 2008-02-03 23:52:41 UTC (rev 20939) @@ -392,9 +392,11 @@ depends on MOUNT help Enable mounting of virtual file systems via external helpers. - E.g. mount obexfs#-b00.11.22.33.44.55 /mnt will in effect call - obexfs -b00.11.22.33.44.55 /mnt - The idea is to use such virtual filesystems in /etc/fstab + E.g. "mount obexfs#-b00.11.22.33.44.55 /mnt" will in effect call + "obexfs -b00.11.22.33.44.55 /mnt" + Also "mount -t sometype [-o opts] fs /mnt" will try + "sometype [-o opts] fs /mnt" if simple mount syscall fails. + The idea is to use such virtual filesystems in /etc/fstab. config FEATURE_MOUNT_NFS bool "Support mounting NFS file systems" Modified: trunk/busybox/util-linux/mkswap.c =================================================================== --- trunk/busybox/util-linux/mkswap.c 2008-02-03 22:04:19 UTC (rev 20938) +++ trunk/busybox/util-linux/mkswap.c 2008-02-03 23:52:41 UTC (rev 20939) @@ -66,7 +66,9 @@ fd = xopen(argv[1], O_RDWR); /* fdlength was reported to be unreliable - use seek */ len = xlseek(fd, 0, SEEK_END); +#if ENABLE_SELINUX xlseek(fd, 0, SEEK_SET); +#endif pagesize = getpagesize(); printf("Setting up swapspace version 1, size = %"OFF_FMT"u bytes\n", len - pagesize); Modified: trunk/busybox/util-linux/mount.c =================================================================== --- trunk/busybox/util-linux/mount.c 2008-02-03 22:04:19 UTC (rev 20938) +++ trunk/busybox/util-linux/mount.c 2008-02-03 23:52:41 UTC (rev 20939) @@ -309,6 +309,27 @@ for (;;) { rc = mount(mp->mnt_fsname, mp->mnt_dir, mp->mnt_type, vfsflags, filteropts); + + // If mount failed, try + // helper program + if (ENABLE_FEATURE_MOUNT_HELPERS && rc) { + char *args[6]; + int errno_save = errno; + args[0] = mp->mnt_type; + rc = 1; + if (filteropts) { + args[rc++] = (char *)"-o"; + args[rc++] = filteropts; + } + args[rc++] = mp->mnt_fsname; + args[rc++] = mp->mnt_dir; + args[rc] = NULL; + rc = wait4pid(spawn(args)); + if (!rc) + break; + errno = errno_save; + } + if (!rc || (vfsflags & MS_RDONLY) || (errno != EACCES && errno != EROFS)) break; if (!(vfsflags & MS_SILENT)) From vda at busybox.net Sun Feb 3 16:30:08 2008 From: vda at busybox.net (vda at busybox.net) Date: Sun, 3 Feb 2008 16:30:08 -0800 (PST) Subject: svn commit: trunk/busybox/coreutils Message-ID: <20080204003008.18A1712C6B1@busybox.net> Author: vda Date: 2008-02-03 16:30:06 -0800 (Sun, 03 Feb 2008) New Revision: 20940 Log: nohup: compat patch by Christoph Gysin Modified: trunk/busybox/coreutils/nohup.c Changeset: Modified: trunk/busybox/coreutils/nohup.c =================================================================== --- trunk/busybox/coreutils/nohup.c 2008-02-03 23:52:41 UTC (rev 20939) +++ trunk/busybox/coreutils/nohup.c 2008-02-04 00:30:06 UTC (rev 20940) @@ -12,21 +12,41 @@ #include "libbb.h" +/* Compat info: nohup (GNU coreutils 6.8) does this: +# nohup true +nohup: ignoring input and appending output to `nohup.out' +# nohup true 1>/dev/null +nohup: ignoring input and redirecting stderr to stdout +# nohup true 2>zz +# cat zz +nohup: ignoring input and appending output to `nohup.out' +# nohup true 2>zz 1>/dev/null +# cat zz +nohup: ignoring input +# nohup true /dev/null +nohup: redirecting stderr to stdout +# nohup true zz 1>/dev/null +# cat zz + (nothing) +# +*/ + int nohup_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int nohup_main(int argc, char **argv) { - int nullfd; const char *nohupout; - char *home = NULL; + char *home; xfunc_error_retval = 127; if (argc < 2) bb_show_usage(); - nullfd = xopen(bb_dev_null, O_WRONLY|O_APPEND); /* If stdin is a tty, detach from it. */ - if (isatty(STDIN_FILENO)) - dup2(nullfd, STDIN_FILENO); + if (isatty(STDIN_FILENO)) { + /* bb_error_msg("ignoring input"); */ + close(STDIN_FILENO); + xopen(bb_dev_null, O_RDONLY); /* will be fd 0 (STDIN_FILENO) */ + } nohupout = "nohup.out"; /* Redirect stdout to nohup.out, either in "." or in "$HOME". */ @@ -37,24 +57,22 @@ if (home) { nohupout = concat_path_file(home, nohupout); xopen3(nohupout, O_CREAT|O_WRONLY|O_APPEND, S_IRUSR|S_IWUSR); + } else { + xopen(bb_dev_null, O_RDONLY); /* will be fd 1 */ } } - } else dup2(nullfd, STDOUT_FILENO); + bb_error_msg("appending output to %s", nohupout); + } - /* If we have a tty on stderr, announce filename and redirect to stdout. - * Else redirect to /dev/null. - */ + /* If we have a tty on stderr, redirect to stdout. */ if (isatty(STDERR_FILENO)) { - bb_error_msg("appending to %s", nohupout); + /* if (stdout_wasnt_a_tty) + bb_error_msg("redirecting stderr to stdout"); */ dup2(STDOUT_FILENO, STDERR_FILENO); - } else dup2(nullfd, STDERR_FILENO); + } - if (nullfd > 2) - close(nullfd); signal(SIGHUP, SIG_IGN); BB_EXECVP(argv[1], argv+1); - if (ENABLE_FEATURE_CLEAN_UP && home) - free((char*)nohupout); bb_simple_perror_msg_and_die(argv[1]); } From bugs at busybox.net Sun Feb 3 16:53:11 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Sun, 3 Feb 2008 16:53:11 -0800 Subject: [BusyBox 0002019]: zcip fails to obtain or defend an IP address when daemonized Message-ID: A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=2019 ====================================================================== Reported By: dajhorn Assigned To: BusyBox ====================================================================== Project: BusyBox Issue ID: 2019 Category: Networking Support Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 01-30-2008 13:06 PST Last Modified: 02-03-2008 16:53 PST ====================================================================== Summary: zcip fails to obtain or defend an IP address when daemonized Description: The busybox zcip program fails to obtain or defend an IP address when it is started as a daemon because the bb_daemonize_or_rexec() function closes the sock_fd. Calling bb_daemonize_or_rexec() before opening the domain socket results in proper behavior. ====================================================================== ---------------------------------------------------------------------- vda - 02-03-08 16:53 ---------------------------------------------------------------------- Why bb_daemonize_or_rexec() function closes the sock_fd? It is calling bb_daemonize_or_rexec(), which should never close any extra fds unless (flags & DAEMON_CLOSE_EXTRA_FDS) != 0. In zcip case, DAEMON_CLOSE_EXTRA_FDS is not set. I am confused. Issue History Date Modified Username Field Change ====================================================================== 01-30-08 13:06 dajhorn New Issue 01-30-08 13:06 dajhorn Status new => assigned 01-30-08 13:06 dajhorn Assigned To => BusyBox 01-30-08 13:06 dajhorn File Added: busybox-zcip-daemonize.patch 02-03-08 16:53 vda Note Added: 0003664 ====================================================================== From bugs at busybox.net Sun Feb 3 17:08:14 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Sun, 3 Feb 2008 17:08:14 -0800 Subject: [BusyBox 0001619]: BusyBox 1.8.2 fdisk doesn't read from stdin Message-ID: A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=1619 ====================================================================== Reported By: vicser Assigned To: BusyBox ====================================================================== Project: BusyBox Issue ID: 1619 Category: Standards Compliance Reproducibility: always Severity: major Priority: normal Status: feedback ====================================================================== Date Submitted: 11-30-2007 01:53 PST Last Modified: 02-03-2008 17:08 PST ====================================================================== Summary: BusyBox 1.8.2 fdisk doesn't read from stdin Description: busybox is used for unattended Linux installations. During the installation hard drive is partitioned by means of fdisk. fdisk is used in a batch mode. This means text file with fdisk commands is prepared - see attached fdisk-commands file (partition size values are variable, fdisk-commands is used to create 3 partitions -boot root and swap). And then fdisk-commands file is passed to fdisk through the stdin. Somthing like fdisk /dev/hda < fdisk-commands In all busybox till 1.7.3 this works fine But in busybox 1.8.0-1.8.2 fdisk doesn't read commands from stdin. ====================================================================== ---------------------------------------------------------------------- vda - 12-01-07 19:41 ---------------------------------------------------------------------- Just built busybox 1.8.2 and tested it: # echo q >Q # strace -o fdisk.log ./busybox fdisk /dev/sda1 Apparently this busybox version expects all input to be line-buffered. 1.9.0 uses fgets() in fdisk (indirectly through read_line_input) if input is coming from non-tty. What is the problem? > As a workaround, calling sync after sending each line will fix the problem. What "sync"? > (line reading should be fixed instead, of course) I need understandable bug report first. Issue History Date Modified Username Field Change ====================================================================== 11-30-07 01:53 vicser New Issue 11-30-07 01:53 vicser Status new => assigned 11-30-07 01:53 vicser Assigned To => BusyBox 11-30-07 01:53 vicser File Added: fdisk-commands 11-30-07 02:04 vicser Issue Monitored: vicser 11-30-07 02:04 vicser Issue End Monitor: vicser 12-01-07 19:41 vda Note Added: 0002994 12-01-07 19:41 vda Status assigned => feedback 01-30-08 12:55 iluxa Note Added: 0003624 02-03-08 17:08 vda Note Added: 0003674 ====================================================================== From bugs at busybox.net Sun Feb 3 17:46:54 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Sun, 3 Feb 2008 17:46:54 -0800 Subject: [BusyBox 0002019]: zcip fails to obtain or defend an IP address when daemonized Message-ID: A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=2019 ====================================================================== Reported By: dajhorn Assigned To: BusyBox ====================================================================== Project: BusyBox Issue ID: 2019 Category: Networking Support Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 01-30-2008 13:06 PST Last Modified: 02-03-2008 17:46 PST ====================================================================== Summary: zcip fails to obtain or defend an IP address when daemonized Description: The busybox zcip program fails to obtain or defend an IP address when it is started as a daemon because the bb_daemonize_or_rexec() function closes the sock_fd. Calling bb_daemonize_or_rexec() before opening the domain socket results in proper behavior. ====================================================================== ---------------------------------------------------------------------- vda - 02-03-08 16:53 ---------------------------------------------------------------------- Why bb_daemonize_or_rexec() function closes the sock_fd? It is calling bb_daemonize_or_rexec(), which should never close any extra fds unless (flags & DAEMON_CLOSE_EXTRA_FDS) != 0. In zcip case, DAEMON_CLOSE_EXTRA_FDS is not set. I am confused. ---------------------------------------------------------------------- dajhorn - 02-03-08 17:46 ---------------------------------------------------------------------- This bug was first discussed when xdaemon() was replaced. Perhaps it is a regression. http://www.uclibc.org/lists/busybox/2007-February.txt When you try this patch, do you get different zcip behavior? Issue History Date Modified Username Field Change ====================================================================== 01-30-08 13:06 dajhorn New Issue 01-30-08 13:06 dajhorn Status new => assigned 01-30-08 13:06 dajhorn Assigned To => BusyBox 01-30-08 13:06 dajhorn File Added: busybox-zcip-daemonize.patch 02-03-08 16:53 vda Note Added: 0003664 02-03-08 17:46 dajhorn Note Added: 0003684 ====================================================================== From bugs at busybox.net Mon Feb 4 01:40:26 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Mon, 4 Feb 2008 01:40:26 -0800 Subject: [BusyBox 0002019]: zcip fails to obtain or defend an IP address when daemonized Message-ID: <93381986ee7ba8fd105aab81509e43ac@busybox.net> A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=2019 ====================================================================== Reported By: dajhorn Assigned To: BusyBox ====================================================================== Project: BusyBox Issue ID: 2019 Category: Networking Support Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 01-30-2008 13:06 PST Last Modified: 02-04-2008 01:40 PST ====================================================================== Summary: zcip fails to obtain or defend an IP address when daemonized Description: The busybox zcip program fails to obtain or defend an IP address when it is started as a daemon because the bb_daemonize_or_rexec() function closes the sock_fd. Calling bb_daemonize_or_rexec() before opening the domain socket results in proper behavior. ====================================================================== ---------------------------------------------------------------------- vda - 02-03-08 16:53 ---------------------------------------------------------------------- Why bb_daemonize_or_rexec() function closes the sock_fd? It is calling bb_daemonize_or_rexec(), which should never close any extra fds unless (flags & DAEMON_CLOSE_EXTRA_FDS) != 0. In zcip case, DAEMON_CLOSE_EXTRA_FDS is not set. I am confused. ---------------------------------------------------------------------- dajhorn - 02-03-08 17:46 ---------------------------------------------------------------------- This bug was first discussed when xdaemon() was replaced. Perhaps it is a regression. http://www.uclibc.org/lists/busybox/2007-February.txt When you try this patch, do you get different zcip behavior? ---------------------------------------------------------------------- vda - 02-04-08 01:40 ---------------------------------------------------------------------- No, I don't see the difference. I think I know why. bb_daemonize is innocent. It's openlog! It opens new fd for logging, and if it happens to be fd 3, it gets reused for sock_fd later. We must open ARP socket before openlog. http://busybox.net/downloads/fixes-1.9.0/busybox-1.9.0-zcip.patch should fix it. Please test this patch. Issue History Date Modified Username Field Change ====================================================================== 01-30-08 13:06 dajhorn New Issue 01-30-08 13:06 dajhorn Status new => assigned 01-30-08 13:06 dajhorn Assigned To => BusyBox 01-30-08 13:06 dajhorn File Added: busybox-zcip-daemonize.patch 02-03-08 16:53 vda Note Added: 0003664 02-03-08 17:46 dajhorn Note Added: 0003684 02-04-08 01:40 vda Note Added: 0003694 ====================================================================== From vda at busybox.net Mon Feb 4 01:42:06 2008 From: vda at busybox.net (vda at busybox.net) Date: Mon, 4 Feb 2008 01:42:06 -0800 (PST) Subject: svn commit: trunk/busybox/networking Message-ID: <20080204094206.CBC1312C6CB@busybox.net> Author: vda Date: 2008-02-04 01:42:05 -0800 (Mon, 04 Feb 2008) New Revision: 20942 Log: zcip: open ARP socket before openlog (else we can thrash syslog socket) Modified: trunk/busybox/networking/zcip.c Changeset: Modified: trunk/busybox/networking/zcip.c =================================================================== --- trunk/busybox/networking/zcip.c 2008-02-04 07:54:32 UTC (rev 20941) +++ trunk/busybox/networking/zcip.c 2008-02-04 09:42:05 UTC (rev 20942) @@ -178,7 +178,7 @@ char *r_opt; unsigned opts; - /* Ugly trick, but I want these zeroed in one go */ + // ugly trick, but I want these zeroed in one go struct { const struct in_addr null_ip; const struct ether_addr null_addr; @@ -212,8 +212,17 @@ // exactly 2 args; -v accumulates and implies -f opt_complementary = "=2:vv:vf"; opts = getopt32(argv, "fqr:v", &r_opt, &verbose); +#if !BB_MMU + // on NOMMU reexec early (or else we will rerun things twice) + if (!FOREGROUND) + bb_daemonize_or_rexec(DAEMON_CHDIR_ROOT, argv); +#endif + // open an ARP socket + // (need to do it before openlog to prevent openlog from taking + // fd 3 (sock_fd==3)) + xmove_fd(xsocket(AF_PACKET, SOCK_PACKET, htons(ETH_P_ARP)), sock_fd); if (!FOREGROUND) { - /* Do it early, before all bb_xx_msg calls */ + // do it before all bb_xx_msg calls openlog(applet_name, 0, LOG_DAEMON); logmode |= LOGMODE_SYSLOG; } @@ -224,11 +233,6 @@ bb_error_msg_and_die("invalid link address"); } } - // On NOMMU reexec early (or else we will rerun things twice) -#if !BB_MMU - if (!FOREGROUND) - bb_daemonize_or_rexec(DAEMON_CHDIR_ROOT, argv); -#endif argc -= optind; argv += optind; @@ -247,8 +251,6 @@ //TODO: are we leaving sa_family == 0 (AF_UNSPEC)?! safe_strncpy(saddr.sa_data, intf, sizeof(saddr.sa_data)); - // open an ARP socket - xmove_fd(xsocket(AF_PACKET, SOCK_PACKET, htons(ETH_P_ARP)), sock_fd); // bind to the interface's ARP socket xbind(sock_fd, &saddr, sizeof(saddr)); @@ -288,7 +290,7 @@ // restarting after address conflicts: // - start with some address we want to try // - short random delay - // - arp probes to see if another host else uses it + // - arp probes to see if another host uses it // - arp announcements that we're claiming it // - use it // - defend it, within limits @@ -319,7 +321,7 @@ switch (safe_poll(fds, 1, timeout_ms)) { default: - /*bb_perror_msg("poll"); - done in safe_poll */ + //bb_perror_msg("poll"); - done in safe_poll return EXIT_FAILURE; // timeout From vda at busybox.net Mon Feb 4 04:12:50 2008 From: vda at busybox.net (vda at busybox.net) Date: Mon, 4 Feb 2008 04:12:50 -0800 (PST) Subject: svn commit: trunk/busybox: archival/libunarchive include Message-ID: <20080204121250.B6DC112C631@busybox.net> Author: vda Date: 2008-02-04 04:12:48 -0800 (Mon, 04 Feb 2008) New Revision: 20943 Log: unzip: do not try to read entire compressed stream at once (it can be huge) unzip: handle short reads correctly Modified: trunk/busybox/archival/libunarchive/decompress_unzip.c trunk/busybox/include/unarchive.h Changeset: Modified: trunk/busybox/archival/libunarchive/decompress_unzip.c =================================================================== --- trunk/busybox/archival/libunarchive/decompress_unzip.c 2008-02-04 09:42:05 UTC (rev 20942) +++ trunk/busybox/archival/libunarchive/decompress_unzip.c 2008-02-04 12:12:48 UTC (rev 20943) @@ -85,7 +85,8 @@ /* input (compressed) data */ unsigned char *bytebuffer; /* buffer itself */ - unsigned bytebuffer_max; /* buffer size */ + off_t to_read; /* compressed bytes to read (unzip only, -1 for gunzip) */ +// unsigned bytebuffer_max; /* buffer size */ unsigned bytebuffer_offset; /* buffer position */ unsigned bytebuffer_size; /* how much data is there (size <= max) */ @@ -126,7 +127,10 @@ #define gunzip_crc_table (S()gunzip_crc_table ) #define gunzip_bb (S()gunzip_bb ) #define gunzip_bk (S()gunzip_bk ) -#define bytebuffer_max (S()bytebuffer_max ) +#define to_read (S()to_read ) +// #define bytebuffer_max (S()bytebuffer_max ) +// Both gunzip and unzip can use constant buffer size now (16k): +#define bytebuffer_max 0x4000 #define bytebuffer (S()bytebuffer ) #define bytebuffer_offset (S()bytebuffer_offset ) #define bytebuffer_size (S()bytebuffer_size ) @@ -251,13 +255,18 @@ { while (*current < required) { if (bytebuffer_offset >= bytebuffer_size) { + unsigned sz = bytebuffer_max - 4; + if (to_read >= 0 && to_read < sz) /* unzip only */ + sz = to_read; /* Leave the first 4 bytes empty so we can always unwind the bitbuffer * to the front of the bytebuffer */ - bytebuffer_size = safe_read(gunzip_src_fd, &bytebuffer[4], bytebuffer_max - 4); + bytebuffer_size = safe_read(gunzip_src_fd, &bytebuffer[4], sz); if ((int)bytebuffer_size < 1) { error_msg = "unexpected end of file"; abort_unzip(PASS_STATE_ONLY); } + if (to_read >= 0) /* unzip only */ + to_read -= bytebuffer_size; bytebuffer_size += 4; bytebuffer_offset = 4; } @@ -1025,14 +1034,15 @@ /* For unzip */ USE_DESKTOP(long long) int -inflate_unzip(inflate_unzip_result *res, unsigned bufsize, int in, int out) +inflate_unzip(inflate_unzip_result *res, off_t compr_size, int in, int out) { USE_DESKTOP(long long) int n; DECLARE_STATE; ALLOC_STATE; - bytebuffer_max = bufsize + 4; + to_read = compr_size; +// bytebuffer_max = 0x8000; bytebuffer_offset = 4; bytebuffer = xmalloc(bytebuffer_max); n = inflate_unzip_internal(PASS_STATE in, out); @@ -1176,7 +1186,8 @@ n = 0; ALLOC_STATE; - bytebuffer_max = 0x8000; + to_read = -1; +// bytebuffer_max = 0x8000; bytebuffer = xmalloc(bytebuffer_max); gunzip_src_fd = in; Modified: trunk/busybox/include/unarchive.h =================================================================== --- trunk/busybox/include/unarchive.h 2008-02-04 09:42:05 UTC (rev 20942) +++ trunk/busybox/include/unarchive.h 2008-02-04 12:12:48 UTC (rev 20943) @@ -109,7 +109,7 @@ } inflate_unzip_result; extern USE_DESKTOP(long long) int unpack_bz2_stream(int src_fd, int dst_fd); -extern USE_DESKTOP(long long) int inflate_unzip(inflate_unzip_result *res, unsigned bufsize, int src_fd, int dst_fd); +extern USE_DESKTOP(long long) int inflate_unzip(inflate_unzip_result *res, off_t compr_size, int src_fd, int dst_fd); extern USE_DESKTOP(long long) int unpack_gz_stream(int src_fd, int dst_fd); extern USE_DESKTOP(long long) int unpack_lzma_stream(int src_fd, int dst_fd); From vda at busybox.net Mon Feb 4 05:12:19 2008 From: vda at busybox.net (vda at busybox.net) Date: Mon, 4 Feb 2008 05:12:19 -0800 (PST) Subject: svn commit: trunk/busybox: include networking/udhcp Message-ID: <20080204131219.99AB412C676@busybox.net> Author: vda Date: 2008-02-04 05:12:16 -0800 (Mon, 04 Feb 2008) New Revision: 20944 Log: udhcp: optional support for non-standard DHCP ports (+300 bytes when selected) Modified: trunk/busybox/include/usage.h trunk/busybox/networking/udhcp/Config.in trunk/busybox/networking/udhcp/clientsocket.c trunk/busybox/networking/udhcp/common.h trunk/busybox/networking/udhcp/dhcpc.c trunk/busybox/networking/udhcp/dhcpc.h trunk/busybox/networking/udhcp/dhcpd.c trunk/busybox/networking/udhcp/dhcpd.h trunk/busybox/networking/udhcp/dhcprelay.c trunk/busybox/networking/udhcp/serverpacket.c Changeset: Modified: trunk/busybox/include/usage.h =================================================================== --- trunk/busybox/include/usage.h 2008-02-04 12:12:48 UTC (rev 20943) +++ trunk/busybox/include/usage.h 2008-02-04 13:12:16 UTC (rev 20944) @@ -3892,7 +3892,7 @@ #define udhcpc_trivial_usage \ "[-Cfbnqtv] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE]\n" \ - " [-p pidfile] [-r IP] [-s script] [-O dhcp-option]..." + " [-p pidfile] [-r IP] [-s script] [-O dhcp-option]..." USE_FEATURE_UDHCP_PORT(" [-P N]") #define udhcpc_full_usage \ USE_GETOPT_LONG( \ " -V,--vendorclass=CLASSID Vendor class identifier" \ @@ -3913,6 +3913,9 @@ "\n -q,--quit Quit after obtaining lease" \ "\n -R,--release Release IP on quit" \ "\n -O,--request-option=OPT Request DHCP option OPT from server" \ + USE_FEATURE_UDHCP_PORT( \ + "\n -P,--client-port N Use port N instead of default 68" \ + ) \ USE_FEATURE_UDHCPC_ARPING( \ "\n -a,--arping Use arping to validate offered address" \ ) \ @@ -3936,18 +3939,24 @@ "\n -q Quit after obtaining lease" \ "\n -R Release IP on quit" \ "\n -O OPT Request DHCP option OPT from server" \ + USE_FEATURE_UDHCP_PORT( \ + "\n -P N Use port N instead of default 68" \ + ) \ USE_FEATURE_UDHCPC_ARPING( \ "\n -a Use arping to validate offered address" \ ) \ ) #define udhcpd_trivial_usage \ - "[-fS] [configfile]" \ + "[-fS]" USE_FEATURE_UDHCP_PORT(" [-P N]") " [configfile]" \ #define udhcpd_full_usage \ "DHCP server" \ "\n -f Run in foreground" \ - "\n -S Log to syslog too" + "\n -S Log to syslog too" \ + USE_FEATURE_UDHCP_PORT( \ + "\n -P N Use port N instead of default 67" \ + ) #define umount_trivial_usage \ "[flags] FILESYSTEM|DIRECTORY" Modified: trunk/busybox/networking/udhcp/Config.in =================================================================== --- trunk/busybox/networking/udhcp/Config.in 2008-02-04 12:12:48 UTC (rev 20943) +++ trunk/busybox/networking/udhcp/Config.in 2008-02-04 13:12:16 UTC (rev 20944) @@ -63,6 +63,13 @@ is really available. The client will DHCPDECLINE the offer if the address is in use, and restart the discover process. +config FEATURE_UDHCP_PORT + bool "Enable '-P port' option for udhcpd and udhcpc" + default n + depends on APP_UDHCPD || APP_UDHCPC + help + At the cost of ~300 bytes, enables -P port option. + This feature is typically not needed. config FEATURE_UDHCP_DEBUG bool "Compile udhcp with noisy debugging messages" Modified: trunk/busybox/networking/udhcp/clientsocket.c =================================================================== --- trunk/busybox/networking/udhcp/clientsocket.c 2008-02-04 12:12:48 UTC (rev 20943) +++ trunk/busybox/networking/udhcp/clientsocket.c 2008-02-04 13:12:16 UTC (rev 20944) @@ -33,9 +33,9 @@ #include #include "common.h" +#include "dhcpd.h" +#include "dhcpc.h" -#define SERVER_AND_CLIENT_PORTS ((SERVER_PORT << 16) + CLIENT_PORT) - int raw_socket(int ifindex) { int fd; @@ -62,6 +62,7 @@ * * TODO: make conditional? */ +#define SERVER_AND_CLIENT_PORTS ((67 << 16) + 68) static const struct sock_filter filter_instr[] = { /* check for udp */ BPF_STMT(BPF_LD|BPF_B|BPF_ABS, 9), @@ -89,10 +90,13 @@ fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); DEBUG("got raw socket fd %d", fd); - /* Ignoring error (kernel may lack support for this) */ - if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter_prog, + if (SERVER_PORT == 67 && CLIENT_PORT == 68) { + /* Use only if standard ports are in use */ + /* Ignoring error (kernel may lack support for this) */ + if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter_prog, sizeof(filter_prog)) >= 0) - DEBUG("attached filter to raw socket fd %d", fd); + DEBUG("attached filter to raw socket fd %d", fd); + } sock.sll_family = AF_PACKET; sock.sll_protocol = htons(ETH_P_IP); Modified: trunk/busybox/networking/udhcp/common.h =================================================================== --- trunk/busybox/networking/udhcp/common.h 2008-02-04 12:12:48 UTC (rev 20943) +++ trunk/busybox/networking/udhcp/common.h 2008-02-04 13:12:16 UTC (rev 20944) @@ -14,9 +14,6 @@ #define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script" -#define SERVER_PORT 67 -#define CLIENT_PORT 68 - extern const uint8_t MAC_BCAST_ADDR[6]; /* six all-ones */ /*** packet.h ***/ Modified: trunk/busybox/networking/udhcp/dhcpc.c =================================================================== --- trunk/busybox/networking/udhcp/dhcpc.c 2008-02-04 12:12:48 UTC (rev 20943) +++ trunk/busybox/networking/udhcp/dhcpc.c 2008-02-04 13:12:16 UTC (rev 20944) @@ -133,6 +133,7 @@ { uint8_t *temp, *message; char *str_c, *str_V, *str_h, *str_F, *str_r, *str_T, *str_A, *str_t; + USE_FEATURE_UDHCP_PORT(char *str_P;) llist_t *list_O = NULL; #if ENABLE_FEATURE_UDHCPC_ARPING char *str_W; @@ -181,6 +182,7 @@ OPT_a = 1 << 20, OPT_W = 1 << 21, #endif + OPT_P = 1 << 22, }; #if ENABLE_GETOPT_LONG static const char udhcpc_longopts[] ALIGN1 = @@ -207,9 +209,16 @@ "arping\0" No_argument "a" #endif "request-option\0" Required_argument "O" +#if ENABLE_FEATURE_UDHCP_PORT + "client-port\0" Required_argument "P" +#endif ; #endif /* Default options. */ +#if ENABLE_FEATURE_UDHCP_PORT + SERVER_PORT = 67; + CLIENT_PORT = 68; +#endif client_config.interface = "eth0"; client_config.script = DEFAULT_SCRIPT; @@ -220,11 +229,13 @@ #endif opt = getopt32(argv, "c:CV:fbH:h:F:i:np:qRr:s:T:t:vSA:" USE_FEATURE_UDHCPC_ARPING("aW:") + USE_FEATURE_UDHCP_PORT("P:") "O:" , &str_c, &str_V, &str_h, &str_h, &str_F , &client_config.interface, &client_config.pidfile, &str_r , &client_config.script, &str_T, &str_t, &str_A USE_FEATURE_UDHCPC_ARPING(, &str_W) + USE_FEATURE_UDHCP_PORT(, &str_P) , &list_O ); @@ -276,6 +287,12 @@ openlog(applet_name, LOG_PID, LOG_LOCAL0); logmode |= LOGMODE_SYSLOG; } +#if ENABLE_FEATURE_UDHCP_PORT + if (opt & OPT_P) { + CLIENT_PORT = xatou16(str_P); + SERVER_PORT = CLIENT_PORT - 1; + } +#endif while (list_O) { int n = index_in_strings(dhcp_option_strings, list_O->data); if (n < 0) Modified: trunk/busybox/networking/udhcp/dhcpc.h =================================================================== --- trunk/busybox/networking/udhcp/dhcpc.h 2008-02-04 12:12:48 UTC (rev 20943) +++ trunk/busybox/networking/udhcp/dhcpc.h 2008-02-04 13:12:16 UTC (rev 20944) @@ -29,13 +29,21 @@ uint8_t *hostname; /* Optional hostname to use */ uint8_t *fqdn; /* Optional fully qualified domain name to use */ int ifindex; /* Index number of the interface to use */ + uint16_t port; uint8_t arp[6]; /* Our arp address */ uint8_t opt_mask[256 / 8]; /* Bitmask of options to send (-O option) */ }; -#define client_config (*(struct client_config_t*)&bb_common_bufsiz1) +/* server_config sits in 1st half of bb_common_bufsiz1 */ +#define client_config (*(struct client_config_t*)(&bb_common_bufsiz1[COMMON_BUFSIZE/2])) +#if ENABLE_FEATURE_UDHCP_PORT +#define CLIENT_PORT (client_config.port) +#else +#define CLIENT_PORT 68 +#endif + /*** clientpacket.h ***/ uint32_t random_xid(void); Modified: trunk/busybox/networking/udhcp/dhcpd.c =================================================================== --- trunk/busybox/networking/udhcp/dhcpd.c 2008-02-04 12:12:48 UTC (rev 20943) +++ trunk/busybox/networking/udhcp/dhcpd.c 2008-02-04 13:12:16 UTC (rev 20944) @@ -12,6 +12,7 @@ #include #include "common.h" +#include "dhcpc.h" #include "dhcpd.h" #include "options.h" @@ -35,8 +36,14 @@ unsigned opt; struct option_set *option; struct dhcpOfferedAddr *lease, static_lease; + USE_FEATURE_UDHCP_PORT(char *str_P;) - opt = getopt32(argv, "fS"); +#if ENABLE_FEATURE_UDHCP_PORT + SERVER_PORT = 67; + CLIENT_PORT = 68; +#endif + + opt = getopt32(argv, "fS" USE_FEATURE_UDHCP_PORT("P:", &str_P)); argv += optind; if (!(opt & 1)) { /* no -f */ @@ -48,7 +55,12 @@ openlog(applet_name, LOG_PID, LOG_LOCAL0); logmode |= LOGMODE_SYSLOG; } - +#if ENABLE_FEATURE_UDHCP_PORT + if (opt & 4) { /* -P */ + SERVER_PORT = xatou16(str_P); + CLIENT_PORT = SERVER_PORT + 1; + } +#endif /* Would rather not do read_config before daemonization - * otherwise NOMMU machines will parse config twice */ read_config(argv[0] ? argv[0] : DHCPD_CONF_FILE); Modified: trunk/busybox/networking/udhcp/dhcpd.h =================================================================== --- trunk/busybox/networking/udhcp/dhcpd.h 2008-02-04 12:12:48 UTC (rev 20943) +++ trunk/busybox/networking/udhcp/dhcpd.h 2008-02-04 13:12:16 UTC (rev 20944) @@ -1,5 +1,6 @@ /* vi: set sw=4 ts=4: */ /* dhcpd.h */ + #ifndef _DHCPD_H #define _DHCPD_H @@ -27,6 +28,7 @@ struct server_config_t { uint32_t server; /* Our IP, in network order */ + uint16_t port; /* start,end are in host order: we need to compare start <= ip <= end */ uint32_t start_ip; /* Start address of leases, in host order */ uint32_t end_ip; /* End of leases, in host order */ @@ -55,7 +57,14 @@ }; #define server_config (*(struct server_config_t*)&bb_common_bufsiz1) +/* client_config sits in 2nd half of bb_common_bufsiz1 */ +#if ENABLE_FEATURE_UDHCP_PORT +#define SERVER_PORT (server_config.port) +#else +#define SERVER_PORT 67 +#endif + extern struct dhcpOfferedAddr *leases; Modified: trunk/busybox/networking/udhcp/dhcprelay.c =================================================================== --- trunk/busybox/networking/udhcp/dhcprelay.c 2008-02-04 12:12:48 UTC (rev 20943) +++ trunk/busybox/networking/udhcp/dhcprelay.c 2008-02-04 13:12:16 UTC (rev 20944) @@ -14,6 +14,7 @@ #include "options.h" /* constants */ +#define SERVER_PORT 67 #define SELECT_TIMEOUT 5 /* select timeout in sec. */ #define MAX_LIFETIME 2*60 /* lifetime of an xid entry in sec. */ Modified: trunk/busybox/networking/udhcp/serverpacket.c =================================================================== --- trunk/busybox/networking/udhcp/serverpacket.c 2008-02-04 12:12:48 UTC (rev 20943) +++ trunk/busybox/networking/udhcp/serverpacket.c 2008-02-04 13:12:16 UTC (rev 20944) @@ -21,6 +21,7 @@ */ #include "common.h" +#include "dhcpc.h" #include "dhcpd.h" #include "options.h" From vda at busybox.net Mon Feb 4 05:23:53 2008 From: vda at busybox.net (vda at busybox.net) Date: Mon, 4 Feb 2008 05:23:53 -0800 (PST) Subject: svn commit: trunk/busybox/networking/udhcp Message-ID: <20080204132353.EAD7312C663@busybox.net> Author: vda Date: 2008-02-04 05:23:53 -0800 (Mon, 04 Feb 2008) New Revision: 20945 Log: udhcp: ifdef out unused members Modified: trunk/busybox/networking/udhcp/dhcpc.h trunk/busybox/networking/udhcp/dhcpd.h Changeset: Modified: trunk/busybox/networking/udhcp/dhcpc.h =================================================================== --- trunk/busybox/networking/udhcp/dhcpc.h 2008-02-04 13:12:16 UTC (rev 20944) +++ trunk/busybox/networking/udhcp/dhcpc.h 2008-02-04 13:23:53 UTC (rev 20945) @@ -29,7 +29,9 @@ uint8_t *hostname; /* Optional hostname to use */ uint8_t *fqdn; /* Optional fully qualified domain name to use */ int ifindex; /* Index number of the interface to use */ +#if ENABLE_FEATURE_UDHCP_PORT uint16_t port; +#endif uint8_t arp[6]; /* Our arp address */ uint8_t opt_mask[256 / 8]; /* Bitmask of options to send (-O option) */ }; Modified: trunk/busybox/networking/udhcp/dhcpd.h =================================================================== --- trunk/busybox/networking/udhcp/dhcpd.h 2008-02-04 13:12:16 UTC (rev 20944) +++ trunk/busybox/networking/udhcp/dhcpd.h 2008-02-04 13:23:53 UTC (rev 20945) @@ -28,7 +28,9 @@ struct server_config_t { uint32_t server; /* Our IP, in network order */ +#if ENABLE_FEATURE_UDHCP_PORT uint16_t port; +#endif /* start,end are in host order: we need to compare start <= ip <= end */ uint32_t start_ip; /* Start address of leases, in host order */ uint32_t end_ip; /* End of leases, in host order */ From bugs at busybox.net Mon Feb 4 13:22:22 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Mon, 4 Feb 2008 13:22:22 -0800 Subject: [BusyBox 0001619]: BusyBox 1.8.2 fdisk doesn't read from stdin Message-ID: A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=1619 ====================================================================== Reported By: vicser Assigned To: BusyBox ====================================================================== Project: BusyBox Issue ID: 1619 Category: Standards Compliance Reproducibility: always Severity: major Priority: normal Status: feedback ====================================================================== Date Submitted: 11-30-2007 01:53 PST Last Modified: 02-04-2008 13:22 PST ====================================================================== Summary: BusyBox 1.8.2 fdisk doesn't read from stdin Description: busybox is used for unattended Linux installations. During the installation hard drive is partitioned by means of fdisk. fdisk is used in a batch mode. This means text file with fdisk commands is prepared - see attached fdisk-commands file (partition size values are variable, fdisk-commands is used to create 3 partitions -boot root and swap). And then fdisk-commands file is passed to fdisk through the stdin. Somthing like fdisk /dev/hda < fdisk-commands In all busybox till 1.7.3 this works fine But in busybox 1.8.0-1.8.2 fdisk doesn't read commands from stdin. ====================================================================== ---------------------------------------------------------------------- vda - 12-01-07 19:41 ---------------------------------------------------------------------- Just built busybox 1.8.2 and tested it: # echo q >Q # strace -o fdisk.log ./busybox fdisk /dev/sda1 Apparently this busybox version expects all input to be line-buffered. 1.9.0 uses fgets() in fdisk (indirectly through read_line_input) if input is coming from non-tty. What is the problem? > As a workaround, calling sync after sending each line will fix the problem. What "sync"? > (line reading should be fixed instead, of course) I need understandable bug report first. ---------------------------------------------------------------------- hshao - 02-04-08 13:22 ---------------------------------------------------------------------- it is noticed that some changes in libbb/lineedit.c cause this problem. A quick fix is to follow the patch below: --- busybox-1.8.2/libbb/lineedit.c.orig 2008-02-04 11:38:51.000000000 -0800 +++ busybox-1.8.2/libbb/lineedit.c 2008-02-04 11:39:47.000000000 -0800 @@ -1270,6 +1270,8 @@ smalluint prevc; #endif +//fix the issue: fdisk can't take input from non-tty mode +#if 0 getTermSettings(0, (void *) &initial_settings); /* Happens when e.g. stty -echo was run before */ if (!(initial_settings.c_lflag & ECHO)) { @@ -1278,6 +1280,7 @@ fgets(command, maxsize, stdin); return strlen(command); } +#endif // FIXME: audit & improve this if (maxsize > MAX_LINELEN) @@ -1296,6 +1299,7 @@ command_ps = command; command[0] = '\0'; + getTermSettings(0, (void *) &initial_settings); memcpy(&new_settings, &initial_settings, sizeof(new_settings)); new_settings.c_lflag &= ~ICANON; /* unbuffered input */ /* Turn off echoing and CTRL-C, so we can trap it */ Issue History Date Modified Username Field Change ====================================================================== 11-30-07 01:53 vicser New Issue 11-30-07 01:53 vicser Status new => assigned 11-30-07 01:53 vicser Assigned To => BusyBox 11-30-07 01:53 vicser File Added: fdisk-commands 11-30-07 02:04 vicser Issue Monitored: vicser 11-30-07 02:04 vicser Issue End Monitor: vicser 12-01-07 19:41 vda Note Added: 0002994 12-01-07 19:41 vda Status assigned => feedback 01-30-08 12:55 iluxa Note Added: 0003624 02-03-08 17:08 vda Note Added: 0003674 02-04-08 13:22 hshao Note Added: 0003704 ====================================================================== From bugs at busybox.net Mon Feb 4 20:30:50 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Mon, 4 Feb 2008 20:30:50 -0800 Subject: [BusyBox 0001619]: BusyBox 1.8.2 fdisk doesn't read from stdin Message-ID: <5101c1b4ff212dfdf8192b8f3da64ff1@busybox.net> A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=1619 ====================================================================== Reported By: vicser Assigned To: BusyBox ====================================================================== Project: BusyBox Issue ID: 1619 Category: Standards Compliance Reproducibility: always Severity: major Priority: normal Status: feedback ====================================================================== Date Submitted: 11-30-2007 01:53 PST Last Modified: 02-04-2008 20:30 PST ====================================================================== Summary: BusyBox 1.8.2 fdisk doesn't read from stdin Description: busybox is used for unattended Linux installations. During the installation hard drive is partitioned by means of fdisk. fdisk is used in a batch mode. This means text file with fdisk commands is prepared - see attached fdisk-commands file (partition size values are variable, fdisk-commands is used to create 3 partitions -boot root and swap). And then fdisk-commands file is passed to fdisk through the stdin. Somthing like fdisk /dev/hda < fdisk-commands In all busybox till 1.7.3 this works fine But in busybox 1.8.0-1.8.2 fdisk doesn't read commands from stdin. ====================================================================== ---------------------------------------------------------------------- vda - 12-01-07 19:41 ---------------------------------------------------------------------- Just built busybox 1.8.2 and tested it: # echo q >Q # strace -o fdisk.log ./busybox fdisk /dev/sda1 Apparently this busybox version expects all input to be line-buffered. 1.9.0 uses fgets() in fdisk (indirectly through read_line_input) if input is coming from non-tty. What is the problem? > As a workaround, calling sync after sending each line will fix the problem. What "sync"? > (line reading should be fixed instead, of course) I need understandable bug report first. ---------------------------------------------------------------------- hshao - 02-04-08 13:22 ---------------------------------------------------------------------- it is noticed that some changes in libbb/lineedit.c cause this problem. A quick fix is to follow the patch below: --- busybox-1.8.2/libbb/lineedit.c.orig 2008-02-04 11:38:51.000000000 -0800 +++ busybox-1.8.2/libbb/lineedit.c 2008-02-04 11:39:47.000000000 -0800 @@ -1270,6 +1270,8 @@ smalluint prevc; #endif +//fix the issue: fdisk can't take input from non-tty mode +#if 0 getTermSettings(0, (void *) &initial_settings); /* Happens when e.g. stty -echo was run before */ if (!(initial_settings.c_lflag & ECHO)) { @@ -1278,6 +1280,7 @@ fgets(command, maxsize, stdin); return strlen(command); } +#endif // FIXME: audit & improve this if (maxsize > MAX_LINELEN) @@ -1296,6 +1299,7 @@ command_ps = command; command[0] = '\0'; + getTermSettings(0, (void *) &initial_settings); memcpy(&new_settings, &initial_settings, sizeof(new_settings)); new_settings.c_lflag &= ~ICANON; /* unbuffered input */ /* Turn off echoing and CTRL-C, so we can trap it */ ---------------------------------------------------------------------- iluxa - 02-04-08 20:30 ---------------------------------------------------------------------- I took a look at 1.8 code, and it comes down to the same fgets call. This may be a bug in the way busybox and glibc interact, since in this case it is busybox statically linked with glibc 2.3 The "sync" I was referring to above was sync command. Example: Original way: fdisk /dev/sda << EOF n p 1 w EOF Had to be replaced with: (echo n;sync; echo p; sync; echo 1; sync; echo; sync; echo; sync; echo w;)|fdisk /dev/sda Issue History Date Modified Username Field Change ====================================================================== 11-30-07 01:53 vicser New Issue 11-30-07 01:53 vicser Status new => assigned 11-30-07 01:53 vicser Assigned To => BusyBox 11-30-07 01:53 vicser File Added: fdisk-commands 11-30-07 02:04 vicser Issue Monitored: vicser 11-30-07 02:04 vicser Issue End Monitor: vicser 12-01-07 19:41 vda Note Added: 0002994 12-01-07 19:41 vda Status assigned => feedback 01-30-08 12:55 iluxa Note Added: 0003624 02-03-08 17:08 vda Note Added: 0003674 02-04-08 13:22 hshao Note Added: 0003704 02-04-08 20:30 iluxa Note Added: 0003714 ====================================================================== From bugs at busybox.net Tue Feb 5 11:31:06 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Tue, 5 Feb 2008 11:31:06 -0800 Subject: [BusyBox 0002044]: ash - problem with expression evaluation Message-ID: <997c5dc43835bad8539c43424ec762c4@busybox.net> The following issue has been SUBMITTED. ====================================================================== http://busybox.net/bugs/view.php?id=2044 ====================================================================== Reported By: kkkonrad Assigned To: BusyBox ====================================================================== Project: BusyBox Issue ID: 2044 Category: Other Reproducibility: always Severity: major Priority: normal Status: assigned ====================================================================== Date Submitted: 02-05-2008 11:31 PST Last Modified: 02-05-2008 11:31 PST ====================================================================== Summary: ash - problem with expression evaluation Description: with at least 1.6.x till yesterdays svn the following expression incorrectly evaluates to true: if [ ! "a" = "b" -a ! "c" = "c" ];then echo true;fi (found while modifying the initial ramdisk in the RIP (Recovery Is Possible) Linux distribution. The last version which seems to work OK is busybox-1.5.1. busybox 1.6.0 gets it wrong slightly different: both: if [ ! "a" = "b" -a ! "c" = "d" ];then echo true;fi and if [ ! "a" = "b" -a ! "c" = "c" ];then echo true;fi dont evaluate to true. defconfiged, compiled on Fedora 7 and running in a chrooted environment using F7's current glibc. Greetings, Konrad ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 02-05-08 11:31 kkkonrad New Issue 02-05-08 11:31 kkkonrad Status new => assigned 02-05-08 11:31 kkkonrad Assigned To => BusyBox ====================================================================== From vapier at busybox.net Thu Feb 7 14:10:09 2008 From: vapier at busybox.net (vapier at busybox.net) Date: Thu, 7 Feb 2008 14:10:09 -0800 (PST) Subject: svn commit: trunk/busybox/include Message-ID: <20080207221009.CAC3D12C65A@busybox.net> Author: vapier Date: 2008-02-07 14:10:07 -0800 (Thu, 07 Feb 2008) New Revision: 20955 Log: only include mntent.h according to HAVE_MNTENT_H and dont define this on OS X Modified: trunk/busybox/include/libbb.h trunk/busybox/include/platform.h Changeset: Modified: trunk/busybox/include/libbb.h =================================================================== --- trunk/busybox/include/libbb.h 2008-02-07 16:17:14 UTC (rev 20954) +++ trunk/busybox/include/libbb.h 2008-02-07 22:10:07 UTC (rev 20955) @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -46,6 +45,10 @@ #define PATH_MAX 256 #endif +#ifdef HAVE_MNTENT_H +#include +#endif + #if ENABLE_SELINUX #include #include Modified: trunk/busybox/include/platform.h =================================================================== --- trunk/busybox/include/platform.h 2008-02-07 16:17:14 UTC (rev 20954) +++ trunk/busybox/include/platform.h 2008-02-07 22:10:07 UTC (rev 20955) @@ -146,7 +146,7 @@ #endif /* ---- Compiler dependent settings ------------------------- */ -#if (defined __digital__ && defined __unix__) +#if (defined __digital__ && defined __unix__) || defined __APPLE__ # undef HAVE_MNTENT_H #else # define HAVE_MNTENT_H 1 From vapier at busybox.net Thu Feb 7 14:41:34 2008 From: vapier at busybox.net (vapier at busybox.net) Date: Thu, 7 Feb 2008 14:41:34 -0800 (PST) Subject: svn commit: trunk/busybox/include Message-ID: <20080207224134.1621A12C65A@busybox.net> Author: vapier Date: 2008-02-07 14:41:33 -0800 (Thu, 07 Feb 2008) New Revision: 20956 Log: some more fixes for cross-compiling on an OS X host: apple provides core types so dont redefine them, sys/statfs.h is not available, and only use some newer AF_* defines if they are actually available Modified: trunk/busybox/include/libbb.h trunk/busybox/include/platform.h Changeset: Modified: trunk/busybox/include/libbb.h =================================================================== --- trunk/busybox/include/libbb.h 2008-02-07 22:10:07 UTC (rev 20955) +++ trunk/busybox/include/libbb.h 2008-02-07 22:41:33 UTC (rev 20956) @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -49,6 +48,10 @@ #include #endif +#ifdef HAVE_SYS_STATFS_H +#include +#endif + #if ENABLE_SELINUX #include #include @@ -311,8 +314,12 @@ | AF_INET | AF_INET6 | AF_UNIX +#ifdef AF_PACKET | AF_PACKET +#endif +#ifdef AF_NETLINK | AF_NETLINK +#endif /* | AF_DECnet */ /* | AF_IPX */ ) <= 127 ? 1 : -1]; @@ -807,8 +814,10 @@ extern void run_applet_no_and_exit(int a, char **argv) ATTRIBUTE_NORETURN; #endif +#ifdef HAVE_MNTENT_H extern int match_fstype(const struct mntent *mt, const char *fstypes); extern struct mntent *find_mount_point(const char *name, const char *table); +#endif extern void erase_mtab(const char * name); extern unsigned int tty_baud_to_value(speed_t speed); extern speed_t tty_value_to_baud(unsigned int value); Modified: trunk/busybox/include/platform.h =================================================================== --- trunk/busybox/include/platform.h 2008-02-07 22:10:07 UTC (rev 20955) +++ trunk/busybox/include/platform.h 2008-02-07 22:41:33 UTC (rev 20956) @@ -137,19 +137,20 @@ /* ---- Networking ------------------------------------------ */ #ifndef __APPLE__ # include +# ifndef __socklen_t_defined +typedef int socklen_t; +# endif #else # include #endif -#ifndef __socklen_t_defined -typedef int socklen_t; -#endif - /* ---- Compiler dependent settings ------------------------- */ #if (defined __digital__ && defined __unix__) || defined __APPLE__ # undef HAVE_MNTENT_H +# undef HAVE_SYS_STATFS_H #else # define HAVE_MNTENT_H 1 +# define HAVE_SYS_STATFS_H 1 #endif /* ___digital__ && __unix__ */ /* linux/loop.h relies on __u64. Make sure we have that as a proper type @@ -180,7 +181,7 @@ #define HAVE_FEATURES_H #include #define HAVE_STDINT_H -#else +#elif !defined __APPLE__ /* Largest integral types. */ #if __BIG_ENDIAN__ typedef long intmax_t; From vapier at busybox.net Thu Feb 7 14:44:27 2008 From: vapier at busybox.net (vapier at busybox.net) Date: Thu, 7 Feb 2008 14:44:27 -0800 (PST) Subject: svn commit: trunk/busybox Message-ID: <20080207224427.EA31D12C65B@busybox.net> Author: vapier Date: 2008-02-07 14:44:27 -0800 (Thu, 07 Feb 2008) New Revision: 20957 Log: force disable setlocalversion usage in busybox Modified: trunk/busybox/Makefile Changeset: Modified: trunk/busybox/Makefile =================================================================== --- trunk/busybox/Makefile 2008-02-07 22:41:33 UTC (rev 20956) +++ trunk/busybox/Makefile 2008-02-07 22:44:27 UTC (rev 20957) @@ -729,7 +729,7 @@ # Currently, only git is supported. # Other SCMs can edit scripts/setlocalversion and add the appropriate # checks as needed. -ifdef CONFIG_LOCALVERSION_AUTO +ifdef _BB_DISABLED_CONFIG_LOCALVERSION_AUTO _localver-auto = $(shell $(CONFIG_SHELL) \ $(srctree)/scripts/setlocalversion $(srctree)) localver-auto = $(LOCALVERSION)$(_localver-auto) From bugs at busybox.net Thu Feb 7 15:38:08 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Thu, 7 Feb 2008 15:38:08 -0800 Subject: [BusyBox 0002054]: error: '__NR_clock_gettime' undeclared (first use in this function) Message-ID: <52232f850faf207d84092f161a723e1b@busybox.net> The following issue has been SUBMITTED. ====================================================================== http://busybox.net/bugs/view.php?id=2054 ====================================================================== Reported By: cedric Assigned To: BusyBox ====================================================================== Project: BusyBox Issue ID: 2054 Category: Documentation Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 02-07-2008 15:38 PST Last Modified: 02-07-2008 15:38 PST ====================================================================== Summary: error: '__NR_clock_gettime' undeclared (first use in this function) Description: >>> Unpacking source... >>> Unpacking busybox-1.8.2.tar.bz2 to /var/tmp/portage/sys-apps/busybox-1.8.2/work * Applying busybox-1.7.0-bb.patch ...  [ ok ] * Applying busybox-1.7.4-signal-hack.patch ...  [ ok ] * Could not locate user configfile, so we will save a default one scripts/kconfig/mconf.c: In function 'main': scripts/kconfig/mconf.c:1048: warning: statement with no effect scripts/kconfig/mconf.c:1049: warning: statement with no effect * # CONFIG_DMALLOC is not set * # CONFIG_FEATURE_SUID_CONFIG is not set * * # CONFIG_BUILD_LIBBUSYBOX is not set * CONFIG_FEATURE_SH_IS_ASH=y * # CONFIG_FEATURE_SH_IS_NONE is not set * # CONFIG_PAM is not set * # CONFIG_STATIC is not set * # CONFIG_DEBUG is not set * # CONFIG_SELINUX is not set * # CONFIG_LOCALE_SUPPORT is not set * # CONFIG_TFTP is not set * # CONFIG_FTPGET is not set * # CONFIG_FTPPUT is not set * # CONFIG_IPCALC is not set * # CONFIG_TFTP is not set * # CONFIG_HUSH is not set * # CONFIG_LASH is not set * # CONFIG_MSH is not set * # CONFIG_INETD is not set * # CONFIG_DPKG is not set * # CONFIG_RPM2CPIO is not set * # CONFIG_RPM is not set * # CONFIG_FOLD is not set * # CONFIG_LOGNAME is not set * # CONFIG_OD is not set * # CONFIG_CRONTAB is not set * # CONFIG_UUDECODE is not set * # CONFIG_UUENCODE is not set * # CONFIG_SULOGIN is not set * # CONFIG_DC is not set * * # CONFIG_DEBUG_INIT is not set * # CONFIG_DEBUG_CROND_OPTION is not set * # CONFIG_FEATURE_UDHCP_DEBUG is not set * # CONFIG_TASKSET is not set >>> Source unpacked. >>> Compiling source in /var/tmp/portage/sys-apps/busybox-1.8.2/work/busybox-1.8.2 ... HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/split-include HOSTCC scripts/basic/docproc SPLIT include/autoconf.h -> include/config/* GEN include/bbconfigopts.h HOSTCC applets/usage LD archival/built-in.o CC archival/ar.o GEN include/usage_compressed.h CC archival/bbunzip.o CC applets/applets.o CC archival/bzip2.o LD applets/built-in.o LD archival/libunarchive/built-in.o CC archival/cpio.o CC archival/libunarchive/archive_xread_all_eof.o CC archival/dpkg_deb.o CC archival/libunarchive/data_align.o CC archival/gzip.o CC archival/libunarchive/data_extract_all.o CC archival/libunarchive/data_extract_to_buffer.o CC archival/tar.o CC archival/libunarchive/data_extract_to_stdout.o CC archival/unzip.o CC archival/libunarchive/data_skip.o AR archival/lib.a LD console-tools/built-in.o CC console-tools/chvt.o CC archival/libunarchive/decompress_bunzip2.o CC console-tools/clear.o CC archival/libunarchive/decompress_uncompress.o CC console-tools/deallocvt.o CC archival/libunarchive/decompress_unlzma.o CC console-tools/dumpkmap.o CC archival/libunarchive/decompress_unzip.o CC console-tools/kbd_mode.o CC archival/libunarchive/filter_accept_all.o CC console-tools/loadfont.o CC archival/libunarchive/filter_accept_list.o CC console-tools/loadkmap.o CC archival/libunarchive/filter_accept_list_reassign.o CC console-tools/openvt.o CC archival/libunarchive/filter_accept_reject_list.o CC console-tools/reset.o CC archival/libunarchive/find_list_entry.o CC console-tools/resize.o CC archival/libunarchive/get_header_ar.o CC console-tools/setconsole.o CC archival/libunarchive/get_header_cpio.o CC console-tools/setkeycodes.o CC archival/libunarchive/get_header_tar.o CC console-tools/setlogcons.o CC archival/libunarchive/get_header_tar_bz2.o AR console-tools/lib.a LD coreutils/built-in.o CC coreutils/basename.o CC archival/libunarchive/get_header_tar_gz.o CC coreutils/cal.o CC archival/libunarchive/get_header_tar_lzma.o CC coreutils/cat.o CC archival/libunarchive/header_list.o CC coreutils/catv.o CC archival/libunarchive/header_skip.o CC coreutils/chgrp.o CC archival/libunarchive/header_verbose_list.o CC coreutils/chmod.o CC archival/libunarchive/init_handle.o CC coreutils/chown.o CC archival/libunarchive/open_transformer.o CC coreutils/chroot.o CC archival/libunarchive/seek_by_jump.o CC coreutils/cksum.o CC archival/libunarchive/seek_by_read.o CC coreutils/comm.o CC archival/libunarchive/unpack_ar_archive.o CC coreutils/cp.o AR archival/libunarchive/lib.a LD coreutils/libcoreutils/built-in.o CC coreutils/libcoreutils/cp_mv_stat.o CC coreutils/cut.o CC coreutils/libcoreutils/getopt_mk_fifo_nod.o CC coreutils/date.o AR coreutils/libcoreutils/lib.a LD debianutils/built-in.o CC debianutils/mktemp.o CC coreutils/dd.o CC debianutils/pipe_progress.o CC coreutils/df.o CC debianutils/run_parts.o CC coreutils/dirname.o CC debianutils/start_stop_daemon.o CC coreutils/dos2unix.o CC debianutils/which.o CC coreutils/du.o AR debianutils/lib.a LD e2fsprogs/built-in.o CC e2fsprogs/chattr.o CC coreutils/echo.o CC e2fsprogs/e2fs_lib.o CC coreutils/env.o CC e2fsprogs/fsck.o CC coreutils/expand.o CC coreutils/expr.o CC coreutils/false.o CC coreutils/head.o CC e2fsprogs/lsattr.o CC coreutils/hostid.o AR e2fsprogs/lib.a LD editors/built-in.o CC editors/awk.o CC coreutils/id.o CC editors/cmp.o CC coreutils/install.o CC editors/diff.o CC coreutils/length.o CC editors/ed.o CC coreutils/ln.o CC editors/patch.o CC coreutils/ls.o CC editors/sed.o CC coreutils/md5_sha1_sum.o CC editors/vi.o CC coreutils/mkdir.o CC coreutils/mkfifo.o CC coreutils/mknod.o CC coreutils/mv.o CC coreutils/nice.o CC coreutils/nohup.o CC coreutils/printenv.o AR editors/lib.a LD findutils/built-in.o CC findutils/find.o CC coreutils/printf.o CC findutils/grep.o CC coreutils/pwd.o CC findutils/xargs.o CC coreutils/readlink.o AR findutils/lib.a CC coreutils/realpath.o LD init/built-in.o CC init/halt.o CC coreutils/rm.o CC init/init.o CC coreutils/rmdir.o CC init/mesg.o CC coreutils/seq.o AR init/lib.a LD ipsvd/built-in.o CC ipsvd/ipsvd_perhost.o CC coreutils/sleep.o CC ipsvd/tcpudp.o CC coreutils/sort.o AR ipsvd/lib.a CC coreutils/split.o LD libbb/built-in.o CC libbb/appletlib.o CC coreutils/stat.o CC libbb/ask_confirmation.o CC coreutils/stty.o CC libbb/bb_askpass.o CC coreutils/sum.o CC libbb/bb_basename.o CC coreutils/sync.o CC libbb/bb_do_delay.o CC coreutils/tail.o CC libbb/bb_pwd.o CC coreutils/tee.o CC libbb/bb_strtonum.o CC coreutils/test.o CC libbb/change_identity.o CC coreutils/touch.o CC libbb/chomp.o CC coreutils/tr.o CC coreutils/true.o CC libbb/compare_string_array.o CC coreutils/tty.o CC libbb/concat_path_file.o CC coreutils/uname.o CC libbb/concat_subpath_file.o CC coreutils/uniq.o CC libbb/copy_file.o CC coreutils/usleep.o CC libbb/copyfd.o CC coreutils/wc.o CC libbb/correct_password.o CC coreutils/who.o CC libbb/crc32.o CC coreutils/whoami.o CC libbb/create_icmp6_socket.o CC coreutils/yes.o CC libbb/create_icmp_socket.o AR coreutils/lib.a CC libbb/crypt_make_salt.o LD libpwdgrp/built-in.o CC libpwdgrp/pwd_grp.o CC libbb/default_error_retval.o CC libpwdgrp/uidgid_get.o CC libbb/device_open.o AR libpwdgrp/lib.a LD loginutils/built-in.o CC loginutils/addgroup.o CC libbb/dump.o CC loginutils/adduser.o CC libbb/error_msg.o CC loginutils/chpasswd.o CC libbb/error_msg_and_die.o CC loginutils/cryptpw.o CC libbb/execable.o CC loginutils/deluser.o CC libbb/fclose_nonstdin.o CC loginutils/getty.o CC libbb/fflush_stdout_and_exit.o CC loginutils/login.o CC libbb/fgets_str.o CC loginutils/passwd.o CC libbb/find_mount_point.o CC loginutils/su.o CC libbb/find_pid_by_name.o CC loginutils/vlock.o CC libbb/find_root_device.o AR loginutils/lib.a CC libbb/full_write.o LD miscutils/built-in.o CC miscutils/adjtimex.o CC libbb/get_console.o CC miscutils/bbconfig.o CC libbb/get_last_path_component.o CC miscutils/chrt.o CC libbb/get_line_from_file.o CC miscutils/crond.o CC libbb/getopt32.o CC miscutils/devfsd.o CC libbb/herror_msg.o CC miscutils/eject.o CC libbb/herror_msg_and_die.o CC miscutils/hdparm.o CC libbb/human_readable.o CC miscutils/last.o CC libbb/inet_common.o CC miscutils/less.o CC libbb/info_msg.o CC miscutils/makedevs.o CC libbb/inode_hash.o CC miscutils/microcom.o CC libbb/isdirectory.o CC miscutils/mountpoint.o CC libbb/kernel_version.o CC miscutils/mt.o CC libbb/last_char_is.o CC miscutils/raidautorun.o CC libbb/lineedit.o CC miscutils/readahead.o CC libbb/llist.o miscutils/readahead.c: In function 'readahead_main': miscutils/readahead.c:27: warning: implicit declaration of function 'readahead' CC miscutils/runlevel.o CC libbb/login.o CC miscutils/rx.o CC libbb/loop.o CC miscutils/setsid.o CC libbb/make_directory.o CC miscutils/strings.o CC libbb/makedev.o CC libbb/match_fstype.o CC miscutils/time.o CC libbb/md5.o CC miscutils/ttysize.o CC libbb/messages.o CC miscutils/watchdog.o AR miscutils/lib.a CC libbb/mode_string.o LD modutils/built-in.o CC modutils/insmod.o CC libbb/mtab.o CC modutils/lsmod.o CC libbb/mtab_file.o CC modutils/modprobe.o CC libbb/obscure.o CC modutils/rmmod.o CC libbb/parse_mode.o AR modutils/lib.a LD networking/built-in.o CC networking/arp.o CC libbb/perror_msg.o CC networking/arping.o CC libbb/perror_msg_and_die.o CC networking/dnsd.o CC libbb/perror_nomsg.o CC libbb/perror_nomsg_and_die.o CC libbb/pidfile.o CC networking/ether-wake.o CC libbb/process_escape_sequence.o CC networking/hostname.o CC libbb/procps.o CC networking/httpd.o CC libbb/pw_encrypt.o CC networking/ifconfig.o CC libbb/read.o CC networking/ifupdown.o CC libbb/recursive_action.o CC networking/interface.o CC libbb/remove_file.o CC networking/ip.o CC libbb/restricted_shell.o CC networking/isrv.o CC libbb/run_shell.o CC networking/isrv_identd.o CC libbb/safe_poll.o CC networking/nameif.o CC libbb/safe_strncpy.o CC networking/nc.o CC libbb/safe_write.o CC networking/netstat.o CC libbb/setup_environment.o CC networking/nslookup.o CC libbb/sha1.o CC networking/ping.o CC libbb/simplify_path.o CC networking/pscan.o CC libbb/skip_whitespace.o CC networking/route.o CC libbb/speed_table.o CC networking/slattach.o CC libbb/str_tolower.o CC networking/telnet.o CC libbb/time.o CC networking/telnetd.o libbb/time.c: In function 'monotonic_us': libbb/time.c:20: error: '__NR_clock_gettime' undeclared (first use in this function) libbb/time.c:20: error: (Each undeclared identifier is reported only once libbb/time.c:20: error: for each function it appears in.) libbb/time.c: In function 'monotonic_sec': libbb/time.c:27: error: '__NR_clock_gettime' undeclared (first use in this function) make[1]: *** [libbb/time.o] Error 1 make: *** [libbb] Error 2 make: *** Waiting for unfinished jobs.... CC networking/traceroute.o CC networking/vconfig.o CC networking/wget.o CC networking/zcip.o AR networking/lib.a * * ERROR: sys-apps/busybox-1.8.2 failed. * Call stack: * ebuild.sh, line 1701: Called dyn_compile * ebuild.sh, line 1039: Called qa_call 'src_compile' * ebuild.sh, line 44: Called src_compile * busybox-1.8.2.ebuild, line 159: Called die * The specific snippet of code: * emake busybox || die "build failed" * The die message: * build failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/sys-apps/busybox-1.8.2/temp/build.log'. * Portage 2.1.3.19 (uclibc/x86/2005.1, gcc-4.1.2, uclibc-0.9.28.3-r0, 2.6.23-gentoo-r6 i686) ================================================================= System uname: 2.6.23-gentoo-r6 i686 AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 Timestamp of tree: Thu, 07 Feb 2008 14:30:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p17-r1 dev-lang/python: 2.4.4-r6 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.10-r5 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.61-r1 sys-devel/automake: 1.6.3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="x86" CBUILD="i586-gentoo-linux-uclibc" CFLAGS="-march=i586 -Os -pipe -fomit-frame-pointer -mmmx" CHOST="i586-gentoo-linux-uclibc" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=i586 -Os -pipe -fomit-frame-pointer -mmmx" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig buildpkg ccache distlocks metadata-transfer nodoc noinfo noman parallel-fetch sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="bitmap-fonts cli cracklib dri midi minimal mmx mudflap ncurses openmp pcre png readline reflection session sockets spl truetype-fonts type1-fonts uclibc x86 xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="uclibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="chips" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 02-07-08 15:38 cedric New Issue 02-07-08 15:38 cedric Status new => assigned 02-07-08 15:38 cedric Assigned To => BusyBox 02-07-08 15:38 cedric File Added: build.log ====================================================================== From bugs at busybox.net Thu Feb 7 16:29:29 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Thu, 7 Feb 2008 16:29:29 -0800 Subject: [BusyBox 0002054]: error: '__NR_clock_gettime' undeclared (first use in this function) Message-ID: <2eb452dfc45851df40ce9b62799742b8@busybox.net> The following issue has been CLOSED ====================================================================== http://busybox.net/bugs/view.php?id=2054 ====================================================================== Reported By: cedric Assigned To: BusyBox ====================================================================== Project: BusyBox Issue ID: 2054 Category: Documentation Reproducibility: always Severity: minor Priority: normal Status: closed Resolution: no change required Fixed in Version: ====================================================================== Date Submitted: 02-07-2008 15:38 PST Last Modified: 02-07-2008 16:29 PST ====================================================================== Summary: error: '__NR_clock_gettime' undeclared (first use in this function) Description: >>> Unpacking source... >>> Unpacking busybox-1.8.2.tar.bz2 to /var/tmp/portage/sys-apps/busybox-1.8.2/work * Applying busybox-1.7.0-bb.patch ...  [ ok ] * Applying busybox-1.7.4-signal-hack.patch ...  [ ok ] * Could not locate user configfile, so we will save a default one scripts/kconfig/mconf.c: In function 'main': scripts/kconfig/mconf.c:1048: warning: statement with no effect scripts/kconfig/mconf.c:1049: warning: statement with no effect * # CONFIG_DMALLOC is not set * # CONFIG_FEATURE_SUID_CONFIG is not set * * # CONFIG_BUILD_LIBBUSYBOX is not set * CONFIG_FEATURE_SH_IS_ASH=y * # CONFIG_FEATURE_SH_IS_NONE is not set * # CONFIG_PAM is not set * # CONFIG_STATIC is not set * # CONFIG_DEBUG is not set * # CONFIG_SELINUX is not set * # CONFIG_LOCALE_SUPPORT is not set * # CONFIG_TFTP is not set * # CONFIG_FTPGET is not set * # CONFIG_FTPPUT is not set * # CONFIG_IPCALC is not set * # CONFIG_TFTP is not set * # CONFIG_HUSH is not set * # CONFIG_LASH is not set * # CONFIG_MSH is not set * # CONFIG_INETD is not set * # CONFIG_DPKG is not set * # CONFIG_RPM2CPIO is not set * # CONFIG_RPM is not set * # CONFIG_FOLD is not set * # CONFIG_LOGNAME is not set * # CONFIG_OD is not set * # CONFIG_CRONTAB is not set * # CONFIG_UUDECODE is not set * # CONFIG_UUENCODE is not set * # CONFIG_SULOGIN is not set * # CONFIG_DC is not set * * # CONFIG_DEBUG_INIT is not set * # CONFIG_DEBUG_CROND_OPTION is not set * # CONFIG_FEATURE_UDHCP_DEBUG is not set * # CONFIG_TASKSET is not set >>> Source unpacked. >>> Compiling source in /var/tmp/portage/sys-apps/busybox-1.8.2/work/busybox-1.8.2 ... HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/split-include HOSTCC scripts/basic/docproc SPLIT include/autoconf.h -> include/config/* GEN include/bbconfigopts.h HOSTCC applets/usage LD archival/built-in.o CC archival/ar.o GEN include/usage_compressed.h CC archival/bbunzip.o CC applets/applets.o CC archival/bzip2.o LD applets/built-in.o LD archival/libunarchive/built-in.o CC archival/cpio.o CC archival/libunarchive/archive_xread_all_eof.o CC archival/dpkg_deb.o CC archival/libunarchive/data_align.o CC archival/gzip.o CC archival/libunarchive/data_extract_all.o CC archival/libunarchive/data_extract_to_buffer.o CC archival/tar.o CC archival/libunarchive/data_extract_to_stdout.o CC archival/unzip.o CC archival/libunarchive/data_skip.o AR archival/lib.a LD console-tools/built-in.o CC console-tools/chvt.o CC archival/libunarchive/decompress_bunzip2.o CC console-tools/clear.o CC archival/libunarchive/decompress_uncompress.o CC console-tools/deallocvt.o CC archival/libunarchive/decompress_unlzma.o CC console-tools/dumpkmap.o CC archival/libunarchive/decompress_unzip.o CC console-tools/kbd_mode.o CC archival/libunarchive/filter_accept_all.o CC console-tools/loadfont.o CC archival/libunarchive/filter_accept_list.o CC console-tools/loadkmap.o CC archival/libunarchive/filter_accept_list_reassign.o CC console-tools/openvt.o CC archival/libunarchive/filter_accept_reject_list.o CC console-tools/reset.o CC archival/libunarchive/find_list_entry.o CC console-tools/resize.o CC archival/libunarchive/get_header_ar.o CC console-tools/setconsole.o CC archival/libunarchive/get_header_cpio.o CC console-tools/setkeycodes.o CC archival/libunarchive/get_header_tar.o CC console-tools/setlogcons.o CC archival/libunarchive/get_header_tar_bz2.o AR console-tools/lib.a LD coreutils/built-in.o CC coreutils/basename.o CC archival/libunarchive/get_header_tar_gz.o CC coreutils/cal.o CC archival/libunarchive/get_header_tar_lzma.o CC coreutils/cat.o CC archival/libunarchive/header_list.o CC coreutils/catv.o CC archival/libunarchive/header_skip.o CC coreutils/chgrp.o CC archival/libunarchive/header_verbose_list.o CC coreutils/chmod.o CC archival/libunarchive/init_handle.o CC coreutils/chown.o CC archival/libunarchive/open_transformer.o CC coreutils/chroot.o CC archival/libunarchive/seek_by_jump.o CC coreutils/cksum.o CC archival/libunarchive/seek_by_read.o CC coreutils/comm.o CC archival/libunarchive/unpack_ar_archive.o CC coreutils/cp.o AR archival/libunarchive/lib.a LD coreutils/libcoreutils/built-in.o CC coreutils/libcoreutils/cp_mv_stat.o CC coreutils/cut.o CC coreutils/libcoreutils/getopt_mk_fifo_nod.o CC coreutils/date.o AR coreutils/libcoreutils/lib.a LD debianutils/built-in.o CC debianutils/mktemp.o CC coreutils/dd.o CC debianutils/pipe_progress.o CC coreutils/df.o CC debianutils/run_parts.o CC coreutils/dirname.o CC debianutils/start_stop_daemon.o CC coreutils/dos2unix.o CC debianutils/which.o CC coreutils/du.o AR debianutils/lib.a LD e2fsprogs/built-in.o CC e2fsprogs/chattr.o CC coreutils/echo.o CC e2fsprogs/e2fs_lib.o CC coreutils/env.o CC e2fsprogs/fsck.o CC coreutils/expand.o CC coreutils/expr.o CC coreutils/false.o CC coreutils/head.o CC e2fsprogs/lsattr.o CC coreutils/hostid.o AR e2fsprogs/lib.a LD editors/built-in.o CC editors/awk.o CC coreutils/id.o CC editors/cmp.o CC coreutils/install.o CC editors/diff.o CC coreutils/length.o CC editors/ed.o CC coreutils/ln.o CC editors/patch.o CC coreutils/ls.o CC editors/sed.o CC coreutils/md5_sha1_sum.o CC editors/vi.o CC coreutils/mkdir.o CC coreutils/mkfifo.o CC coreutils/mknod.o CC coreutils/mv.o CC coreutils/nice.o CC coreutils/nohup.o CC coreutils/printenv.o AR editors/lib.a LD findutils/built-in.o CC findutils/find.o CC coreutils/printf.o CC findutils/grep.o CC coreutils/pwd.o CC findutils/xargs.o CC coreutils/readlink.o AR findutils/lib.a CC coreutils/realpath.o LD init/built-in.o CC init/halt.o CC coreutils/rm.o CC init/init.o CC coreutils/rmdir.o CC init/mesg.o CC coreutils/seq.o AR init/lib.a LD ipsvd/built-in.o CC ipsvd/ipsvd_perhost.o CC coreutils/sleep.o CC ipsvd/tcpudp.o CC coreutils/sort.o AR ipsvd/lib.a CC coreutils/split.o LD libbb/built-in.o CC libbb/appletlib.o CC coreutils/stat.o CC libbb/ask_confirmation.o CC coreutils/stty.o CC libbb/bb_askpass.o CC coreutils/sum.o CC libbb/bb_basename.o CC coreutils/sync.o CC libbb/bb_do_delay.o CC coreutils/tail.o CC libbb/bb_pwd.o CC coreutils/tee.o CC libbb/bb_strtonum.o CC coreutils/test.o CC libbb/change_identity.o CC coreutils/touch.o CC libbb/chomp.o CC coreutils/tr.o CC coreutils/true.o CC libbb/compare_string_array.o CC coreutils/tty.o CC libbb/concat_path_file.o CC coreutils/uname.o CC libbb/concat_subpath_file.o CC coreutils/uniq.o CC libbb/copy_file.o CC coreutils/usleep.o CC libbb/copyfd.o CC coreutils/wc.o CC libbb/correct_password.o CC coreutils/who.o CC libbb/crc32.o CC coreutils/whoami.o CC libbb/create_icmp6_socket.o CC coreutils/yes.o CC libbb/create_icmp_socket.o AR coreutils/lib.a CC libbb/crypt_make_salt.o LD libpwdgrp/built-in.o CC libpwdgrp/pwd_grp.o CC libbb/default_error_retval.o CC libpwdgrp/uidgid_get.o CC libbb/device_open.o AR libpwdgrp/lib.a LD loginutils/built-in.o CC loginutils/addgroup.o CC libbb/dump.o CC loginutils/adduser.o CC libbb/error_msg.o CC loginutils/chpasswd.o CC libbb/error_msg_and_die.o CC loginutils/cryptpw.o CC libbb/execable.o CC loginutils/deluser.o CC libbb/fclose_nonstdin.o CC loginutils/getty.o CC libbb/fflush_stdout_and_exit.o CC loginutils/login.o CC libbb/fgets_str.o CC loginutils/passwd.o CC libbb/find_mount_point.o CC loginutils/su.o CC libbb/find_pid_by_name.o CC loginutils/vlock.o CC libbb/find_root_device.o AR loginutils/lib.a CC libbb/full_write.o LD miscutils/built-in.o CC miscutils/adjtimex.o CC libbb/get_console.o CC miscutils/bbconfig.o CC libbb/get_last_path_component.o CC miscutils/chrt.o CC libbb/get_line_from_file.o CC miscutils/crond.o CC libbb/getopt32.o CC miscutils/devfsd.o CC libbb/herror_msg.o CC miscutils/eject.o CC libbb/herror_msg_and_die.o CC miscutils/hdparm.o CC libbb/human_readable.o CC miscutils/last.o CC libbb/inet_common.o CC miscutils/less.o