Changeset 17726
- Timestamp:
- 10/08/11 15:43:28 (20 months ago)
- Location:
- src/router/busybox
- Files:
-
- 10 edited
-
.config_laguna (modified) (1 diff)
-
applets/applet_tables.c (modified) (1 diff)
-
coreutils/tail.c (modified) (3 diffs)
-
include/platform.h (modified) (1 diff)
-
loginutils/chpasswd.c (modified) (5 diffs)
-
miscutils/crond.c (modified) (1 diff)
-
networking/inetd.c (modified) (4 diffs)
-
networking/tftp.c (modified) (1 diff)
-
sysklogd/syslogd.c (modified) (2 diffs)
-
testsuite/tail.tests (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/router/busybox/.config_laguna
r17649 r17726 813 813 CONFIG_FEATURE_TFTP_PUT=y 814 814 CONFIG_FEATURE_TFTP_BLOCKSIZE=y 815 # CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set 815 CONFIG_FEATURE_TFTP_PROGRESS_BAR=y 816 816 # CONFIG_TFTP_DEBUG is not set 817 817 CONFIG_TRACEROUTE=y -
src/router/busybox/applets/applet_tables.c
r17628 r17726 81 81 printf("#define NUM_APPLETS %u\n", NUM_APPLETS); 82 82 if (NUM_APPLETS == 1) { 83 char *dash_to_underscore, *p; 83 84 printf("#define SINGLE_APPLET_STR \"%s\"\n", applets[0].name); 84 printf("#define SINGLE_APPLET_MAIN %s_main\n", applets[0].name); 85 /* Example: "ether-wake" -> "ether_wake" */ 86 p = dash_to_underscore = strdup(applets[0].name); 87 p--; 88 while (*++p) 89 if (*p == '-') 90 *p = '_'; 91 printf("#define SINGLE_APPLET_MAIN %s_main\n", dash_to_underscore); 85 92 } 86 93 printf("\n"); -
src/router/busybox/coreutils/tail.c
r17628 r17726 204 204 205 205 if (ENABLE_FEATURE_FANCY_TAIL && fd < 0) 206 continue; /* may happen with - E*/206 continue; /* may happen with -F */ 207 207 208 208 if (nfiles > header_threshhold) { … … 253 253 seen = 1; 254 254 newlines_seen = 0; 255 while ((nread = tail_read(fd, buf, tailbufsize -taillen)) > 0) {255 while ((nread = tail_read(fd, buf, tailbufsize - taillen)) > 0) { 256 256 if (G.from_top) { 257 257 int nwrite = nread; … … 260 260 if (COUNT_BYTES) { 261 261 nwrite -= (count - seen); 262 seen = count;262 seen += nread; 263 263 } else { 264 264 char *s = buf; -
src/router/busybox/include/platform.h
r17628 r17726 434 434 #endif 435 435 436 #if defined(ANDROID) 436 #if defined(ANDROID) || defined(__ANDROID__) 437 437 # undef HAVE_DPRINTF 438 438 # undef HAVE_GETLINE -
src/router/busybox/loginutils/chpasswd.c
r17628 r17726 34 34 int chpasswd_main(int argc UNUSED_PARAM, char **argv) 35 35 { 36 char *name, *pass; 37 char salt[sizeof("$N$XXXXXXXX")]; 38 int opt, rc; 36 char *name; 37 int opt; 39 38 40 39 if (getuid() != 0) … … 46 45 47 46 while ((name = xmalloc_fgetline(stdin)) != NULL) { 47 char *free_me; 48 char *pass; 49 int rc; 50 48 51 pass = strchr(name, ':'); 49 52 if (!pass) … … 53 56 xuname2uid(name); /* dies if there is no such user */ 54 57 58 free_me = NULL; 55 59 if (!(opt & OPT_ENC)) { 60 char salt[sizeof("$N$XXXXXXXX")]; 61 56 62 crypt_make_salt(salt, 1); 57 63 if (opt & OPT_MD5) { … … 61 67 crypt_make_salt(salt + 3, 4); 62 68 } 63 pass = pw_encrypt(pass, salt, 0);69 free_me = pass = pw_encrypt(pass, salt, 0); 64 70 } 65 71 … … 82 88 logmode = LOGMODE_STDIO; 83 89 free(name); 84 if (!(opt & OPT_ENC)) 85 free(pass); 90 free(free_me); 86 91 } 87 92 return EXIT_SUCCESS; -
src/router/busybox/miscutils/crond.c
r17628 r17726 862 862 /* "-b after -f is ignored", and so on for every pair a-b */ 863 863 opt_complementary = "f-b:b-f:S-L:L-S" IF_FEATURE_CROND_D(":d-l") 864 ":l+:d+"; /* -l and -d have numeric param */ 864 /* -l and -d have numeric param */ 865 ":l+" IF_FEATURE_CROND_D(":d+"); 865 866 opts = getopt32(argv, "l:L:fbSc:" IF_FEATURE_CROND_D("d:"), 866 867 &G.log_level, &G.log_filename, &G.crontab_dir_name -
src/router/busybox/networking/inetd.c
r17628 r17726 1279 1279 rearm_alarm(); /* will revive it in RETRYTIME sec */ 1280 1280 restore_sigmask(&omask); 1281 maybe_close(new_udp_fd); 1281 1282 maybe_close(accepted_fd); 1282 1283 continue; /* -> check next fd in fd set */ … … 1299 1300 sleep(1); 1300 1301 restore_sigmask(&omask); 1302 maybe_close(new_udp_fd); 1301 1303 maybe_close(accepted_fd); 1302 1304 continue; /* -> check next fd in fd set */ … … 1305 1307 pid--; /* -1: "we did fork and we are child" */ 1306 1308 } 1307 /* if pid == 0 here, we never forked*/1309 /* if pid == 0 here, we didn't fork */ 1308 1310 1309 1311 if (pid > 0) { /* parent */ 1310 1312 if (sep->se_wait) { 1311 /* tcp wait: we passed listeningsocket to child,1313 /* wait: we passed socket to child, 1312 1314 * will wait for child to terminate */ 1313 1315 sep->se_wait = pid; … … 1346 1348 /* "nowait" udp */ 1347 1349 if (new_udp_fd >= 0) { 1348 len_and_sockaddr *lsa = xzalloc_lsa(sep->se_family); 1350 len_and_sockaddr *lsa; 1351 int r; 1352 1353 close(new_udp_fd); 1354 lsa = xzalloc_lsa(sep->se_family); 1349 1355 /* peek at the packet and remember peer addr */ 1350 intr = recvfrom(ctrl, NULL, 0, MSG_PEEK|MSG_DONTWAIT,1356 r = recvfrom(ctrl, NULL, 0, MSG_PEEK|MSG_DONTWAIT, 1351 1357 &lsa->u.sa, &lsa->len); 1352 1358 if (r < 0) -
src/router/busybox/networking/tftp.c
r17628 r17726 814 814 } 815 815 mode = local_file + strlen(local_file) + 1; 816 if (mode >= block_buf + result || strcmp(mode, "octet") != 0) { 816 /* RFC 1350 says mode string is case independent */ 817 if (mode >= block_buf + result || strcasecmp(mode, "octet") != 0) { 817 818 goto err; 818 819 } -
src/router/busybox/sysklogd/syslogd.c
r17628 r17726 279 279 280 280 parser = config_open2(file ? file : "/etc/syslog.conf", 281 file ? xfopen_for_read : fopen_ or_warn_stdin);281 file ? xfopen_for_read : fopen_for_read); 282 282 if (!parser) 283 283 /* didn't find default /etc/syslog.conf */ … … 679 679 #if ENABLE_FEATURE_IPC_SYSLOG 680 680 if ((option_mask32 & OPT_circularlog) && G.shbuf) { 681 log_to_shmem( msg);681 log_to_shmem(G.printbuf); 682 682 return; 683 683 } -
src/router/busybox/testsuite/tail.tests
r17628 r17726 15 15 "" "qw" 16 16 17 testing "tail: -c +N with largish N" \ 18 " 19 dd if=/dev/zero bs=16k count=1 2>/dev/null | tail -c +8200 | wc -c; 20 dd if=/dev/zero bs=16k count=1 2>/dev/null | tail -c +8208 | wc -c; 21 " \ 22 "8185\n8177\n" \ 23 "" "" 24 17 25 exit $FAILCOUNT
Note: See TracChangeset
for help on using the changeset viewer.
