aboutsummaryrefslogtreecommitdiff
path: root/networking/nc.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-02-18 11:08:33 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-02-18 11:08:33 +0000
commitc9ca0a32745a43eaa6cb6b7b460718de8ccb84f2 (patch)
tree2b4bdf035b3a3c0436ce823e137d969af4d3a06f /networking/nc.c
parent56244736ec7d0a3c338f542204aae83fb0200346 (diff)
downloadbusybox-w32-c9ca0a32745a43eaa6cb6b7b460718de8ccb84f2.tar.gz
busybox-w32-c9ca0a32745a43eaa6cb6b7b460718de8ccb84f2.tar.bz2
busybox-w32-c9ca0a32745a43eaa6cb6b7b460718de8ccb84f2.zip
mount: recognize "dirsync" (closes bug 835)
mount: sanitize environ if called by non-root *: adjust for slightly different sanitize routine
Diffstat (limited to 'networking/nc.c')
-rw-r--r--networking/nc.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/networking/nc.c b/networking/nc.c
index feb9c5db6..7c2aafaf6 100644
--- a/networking/nc.c
+++ b/networking/nc.c
@@ -44,14 +44,17 @@ int nc_main(int argc, char **argv)
44 while ((opt = getopt(argc, argv, 44 while ((opt = getopt(argc, argv,
45 "" USE_NC_SERVER("lp:") USE_NC_EXTRA("w:i:f:e:") )) > 0 45 "" USE_NC_SERVER("lp:") USE_NC_EXTRA("w:i:f:e:") )) > 0
46 ) { 46 ) {
47 if (ENABLE_NC_SERVER && opt=='l') USE_NC_SERVER(do_listen++); 47 if (ENABLE_NC_SERVER && opt=='l')
48 else if (ENABLE_NC_SERVER && opt=='p') { 48 USE_NC_SERVER(do_listen++);
49 else if (ENABLE_NC_SERVER && opt=='p')
49 USE_NC_SERVER(lport = bb_lookup_port(optarg, "tcp", 0)); 50 USE_NC_SERVER(lport = bb_lookup_port(optarg, "tcp", 0));
50 } 51 else if (ENABLE_NC_EXTRA && opt=='w')
51 else if (ENABLE_NC_EXTRA && opt=='w') USE_NC_EXTRA( wsecs = xatou(optarg)); 52 USE_NC_EXTRA( wsecs = xatou(optarg));
52 else if (ENABLE_NC_EXTRA && opt=='i') USE_NC_EXTRA( delay = xatou(optarg)); 53 else if (ENABLE_NC_EXTRA && opt=='i')
53 else if (ENABLE_NC_EXTRA && opt=='f') USE_NC_EXTRA( cfd = xopen(optarg, O_RDWR)); 54 USE_NC_EXTRA( delay = xatou(optarg));
54 else if (ENABLE_NC_EXTRA && opt=='e' && optind<=argc) { 55 else if (ENABLE_NC_EXTRA && opt=='f')
56 USE_NC_EXTRA( cfd = xopen(optarg, O_RDWR));
57 else if (ENABLE_NC_EXTRA && opt=='e' && optind <= argc) {
55 /* We cannot just 'break'. We should let getopt finish. 58 /* We cannot just 'break'. We should let getopt finish.
56 ** Or else we won't be able to find where 59 ** Or else we won't be able to find where
57 ** 'host' and 'port' params are 60 ** 'host' and 'port' params are