Re: [PATCH] wget: don't silently ignore certificate validation

2018-05-27 Thread Ralf Friedl
Denys Vlasenko wrote: wget should work for common use cases. Such as downloading sources of kernels, gcc and such. From build scripts, not only by hand. Without having to modify said scripts. Your patch breaks that. NAK. I don't care that security people are upset. They are paranoid, it's part

Re: ASH: why ash_ptr_to_globals_misc is declared as const pointer

2018-01-22 Thread Ralf Friedl
Mike Frysinger schrieb: On 22 Jan 2018 22:54, Ralf Friedl wrote: Mike Frysinger schrieb: On 22 Jan 2018 09:23, Yunlian Jiang wrote: On Fri, Jan 19, 2018 at 3:32 PM, Mike Frysinger wrote: is it that busybox is crashing ? is clang/lld placing this pointer in const memory (even though we have

Re: ASH: why ash_ptr_to_globals_misc is declared as const pointer

2018-01-22 Thread Ralf Friedl
Mike Frysinger wrote: On 20 Jan 2018 19:03, Ralf Friedl wrote: Mike Frysinger wrote: the pointer itself is the thing that is const, not the memory it points to. this lets the compiler optimize the loads by generating relocations via the pointer ... there's the fixup at the initial load time

Re: ASH: why ash_ptr_to_globals_misc is declared as const pointer

2018-01-22 Thread Ralf Friedl
Mike Frysinger schrieb: On 22 Jan 2018 09:23, Yunlian Jiang wrote: On Fri, Jan 19, 2018 at 3:32 PM, Mike Frysinger wrote: is it that busybox is crashing ? is clang/lld placing this pointer in const memory (even though we have section(".data")) ? or is it generating an abort when it reaches

Re: ASH: why ash_ptr_to_globals_misc is declared as const pointer

2018-01-20 Thread Ralf Friedl
Mike Frysinger wrote: the pointer itself is the thing that is const, not the memory it points to. this lets the compiler optimize the loads by generating relocations via the pointer ... there's the fixup at the initial load time, but after that, it's just offsets to a constant memory location.

Re: [**EXTERNAL**] SV: Re: [PATCH] Fix runsvdir so it reaps children and avoid zombi processes when killed.

2018-01-04 Thread Ralf Friedl
Cathey, Jim wrote: The rule is pretty simple: If you die, and your parent is still in the process list (regardless of its state), then you're a zombie until your parent reaps you. If you die and your parent is not in the process list, then init(8) reaps you at its earliest convenience. If

Re: [PATCH] Fix runsvdir so it reaps children and avoid zombi processes when killed.

2018-01-04 Thread Ralf Friedl
Markus Gothe wrote: Well, just to be sure we all talk about the same children that needs to be reaped are those of runsvdir, the bug manifests without using the inittab, surely init will reap the dead process of runsvdir but not the children themselves of runsvdir. To be sure we all talk

Re: [PATCH] Fix runsvdir so it reaps children and avoid zombi processes when killed.

2018-01-03 Thread Ralf Friedl
Markus Gothe wrote: Can you run strace on a process invoked from the inittab? I surely have issues with doing that. As far as killing the processes it doesnt matter which signal you use; processes will become zombified forever without the patch. Yes, I can run strace on a process invoked from

Re: [PATCH] Fix runsvdir so it reaps children and avoid zombi processes when killed.

2018-01-03 Thread Ralf Friedl
Markus Gothe wrote: Without this fix it will create zombies that might cause deadlocks, especially when respawned from the inittab and it dies because of a signal (e.g. ‘killall -9 runsvdir'). Installing a simple SIGCHLD-handler makes the problem go away. Signed-off-by: Markus Gothe

Re: nandump options

2017-12-01 Thread Ralf Friedl
A.W.C. wrote: What is correct syntax of a nanddump command? As has been already hinted to you, none of your questions are related to busybox in any way, and from what you wrote, I'm not sure you know what busybox actually is. The nanddump command is not part of your version of busybox. As

Re: [PATCH] dd: fix corrupted/incomplete reads/skips.

2017-11-09 Thread Ralf Friedl
Nicholas Clark wrote: Busybox dd expects that read() calls (as provided by safe_read) will always return the requested amount of data unless at EOF. This isn't true for safe_read(), but it is true for full_read() (which loops over safe_read until enough data has been retrieved). This patch

Re: NOEXEC environment bug

2017-11-02 Thread Ralf Friedl
Jack Schmidt wrote: On 2017-11-02, at 08:26 , Denys Vlasenko wrote: On Wed, Nov 1, 2017 at 2:28 AM, Jack Schmidt wrote: I believe I have found a bug in the current version of busybox. When: * an applet is marked NOEXEC, * busybox is configured

Re: [PATCH 2/7] df: Use statvfs instead of non-standard statfs

2017-10-28 Thread Ralf Friedl
Waldemar Brodkorb wrote: Ralf Friedl wrote, I just want to point out that while uClibc statvfs does always set f_frsize, currently on MIPS at least it doesn't use the value returned by the kernel, instead it copies the value from f_bsize, thus negating commit https://git.busybox.net/busybox

Re: [PATCH 2/7] df: Use statvfs instead of non-standard statfs

2017-10-23 Thread Ralf Friedl
Eugene Rudoy wrote: just wanted to point out that besides making the code more portable the change suggested by James has another positive side effect. It eliminates the need for the uClibc related and as of now unreliable workaround added in the second hunk of e184a88 [1]. Why unreliable?

Re: [PATCH 1/2] fix O_CLOEXEC related build problems with kernel versions < 2.6.23

2017-10-18 Thread Ralf Friedl
Eugene Rudoy wrote: Do not use O_CLOEXEC flags (available since 2.6.23), use close_on_exec_on provided by libbb instead (like everywhere else) Signed-off-by: Eugene Rudoy --- miscutils/time.c | 6 -- modutils/modprobe-small.c | 3 ++- modutils/modutils.c

Re: Race in reboot/poweroff path at init?

2017-10-11 Thread Ralf Friedl
Laurent Bercot wrote: That is true, I hadn't thought of abstract sockets, and it would work. However, changing the way poweroff signals init is a big change, and in particular, making init listen to a socket is very significant: you know need to multiplex reaping zombies with listening to

Re: [PATCH 4/7] xfuncs: Handle missing non-POSIX termios constants

2017-10-08 Thread Ralf Friedl
Kang-Che Sung wrote: 2017年10月8日 18:50,"James Clarke" >寫道: On 8 Oct 2017, at 02:34, Kang-Che Sung > wrote: > On Sun, Oct 8, 2017 at 1:53 AM, James Clarke

Re: [PATCH v2] Silence misguided GCC warning about alignment issues

2017-08-10 Thread Ralf Friedl
Denys Vlasenko schrieb: On Mon, Aug 7, 2017 at 10:58 PM, Johannes Schindelin wrote: +++ b/archival/libarchive/decompress_unxz.c @@ -37,6 +37,11 @@ static uint32_t xz_crc32(const uint8_t *buf, size_t size, uint32_t crc) || !defined(put_unaligned_be32) # error

Re: [PATCH] Silence misguided GCC warning about alignment issues

2017-08-08 Thread Ralf Friedl
Johannes Schindelin wrote: When compiling xz_dec_stream.c with GCC 7.1.0, it complains thusly: In function 'dec_stream_footer': error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] if (xz_crc32(s->temp.buf +

Re: [PATCH] Re: ash fails to read $HOME/.profile

2017-06-27 Thread Ralf Friedl
Denys Vlasenko schrieb: On Mon, Jun 26, 2017 at 10:11 PM, Tito wrote: Hi, the attached patch should fix the "ash fails to read $HOME/.profile" bug when ENABLE_ASH_EXPAND_PRMT is not set. Kp could you please test if it fixes your problem when ENABLE_ASH_EXPAND_PRMT is not

Re: [PATCH 1/1] makedevs: set path size to match linux

2017-06-27 Thread Ralf Friedl
Michael Conrad wrote: If you ask for large enough allocations on the stack, GCC will secretly give you malloc/free instead, which adds to code size. It might be that 4096 triggers this effect, and perhaps that was the reason for the original small-ish static buffer. Do you have a reference for

Re: mdev change no longer supporting v2.6.2x kernels by using /sys/dev

2017-03-23 Thread Ralf Friedl
Mattias Schlenker wrote: Am 23.03.2017 um 17:32 schrieb Ralf Friedl: Busybox is often used in embedded devices, where kernels (and other software) are not changed that often. Firmware may contain kernel modules without full source, so a change to a newer kernel is not an option

Re: mdev change no longer supporting v2.6.2x kernels by using /sys/dev

2017-03-23 Thread Ralf Friedl
Peter Korsgaard wrote: "Richard" == Richard Moore writes: > Hi, > Would it be possible to please make the recent mdev change in v1.26 an > option? > * mdev (mdev: create devices from /sys/dev) commit 20a3262 (Sep 7, 2016) > I am stuck with a v2.6.2x kernel and I am

Re: copying multiple files

2016-11-21 Thread Ralf Friedl
David Henderson wrote: Good afternoon. I have several files in two different directories that I'm trying to copy in a destination using: cp -f /tmp/test/{a.txt,b.txt,c.txt} /tmp/test2/{1.txt,2.txt,3.txt} /tmp/dest This keeps failing. Is this implemented in BB? In general, and here in

Re: Shell script silently exits. Why?

2016-11-18 Thread Ralf Friedl
Arnout Vandecappelle wrote: I guess you have a 'set -e' somewhere in your script? let returns the value it computed, so if $foo is different from 0, it will return non-0. This causes the shell to exit. It's POSIX behaviour. Bash "let" returns 1 if there is a sytax error within the

Re: Parallel make bug in busybox

2016-08-13 Thread Ralf Friedl
Arnout Vandecappelle wrote: As an aside, there may be a second issue: applets/Kbuild.src specifies the same command for both include/applet_tables.h and include/NUM_APPLETS.h, but that command will always generate both files. So if the rules for the two files are launched in parallel, there is

Re: busybox sed, 'r' command

2016-03-23 Thread Ralf Friedl
Cristian Ionescu-Idbohrn wrote: sed (GNU sed) 4.2.2 can do this: $ printf 'foo bar baz' | sed r - foo bar baz or, after storing the text in a file: $ printf 'foo bar baz' >/tmp/bar $ sed r /tmp/bar foo

Re: why are init's arguments wiped ?

2016-02-01 Thread Ralf Friedl
Nicolas CARRIER schrieb: "/proc/1/cmdline is not a standard Unix ..." I absolutely don't know any other OS, be it Unix or not... But don't they provide a way to access the command-line used to launch a program ? In busybox's code at least, I see only one implementation of read_cmdline, which

Re: [PATCH] Config: select PLATFORM_LINUX if using sendfile()

2014-12-10 Thread Ralf Friedl
Bartosz Golaszewski wrote: Man entry for sendfile: Not specified in POSIX.1-2001, or other standards. Other UNIX systems implement sendfile() with different semantics and prototypes. It should not be used in portable programs. Select PLATFORM_LINUX if enabling FEATURE_USE_SENDFILE.

Re: [PATCH 2/3] zcip: allow our own class B range to be used for ZeroConf

2014-10-15 Thread Ralf Friedl
Michel Stam wrote: 169.254 may already be used by a local network. This patch allows specifying your own IP range. Why would you want to use a different range? You would have to specify it to each client, which seems against the idea of ZeroConf. ___

Re: In regard to CVE-2014-7169 CVE-2014-6271

2014-09-27 Thread Ralf Friedl
Sean Mathews wrote: In regard to CVE-2014-7169 CVE-2014-6271 looking at busybox-1.22.1/networking/udhcp/dhcpc.c line 403 fill_envp() it seems as if it would be trivial to mess with bootfile and inject a packet that has garbage in the bootfile and exploit this vulnerability. We should keep in

Re: rm -r fails to delete entire hierarchy when path goes in and out of it

2014-09-17 Thread Ralf Friedl
Gian Ntzik wrote: It seems that using rm -r with a path that goes into the hierarchy intended for removal (and back up e.g. using dot-dots) fails to remove the entire hierarchy. For example, $ mkdir -p /tmp/a/b/c $ mkdir -p /tmp/a/e $ rm -r /tmp/a/b/../../a rm: can't remove 'a/b/../../a/e': No

Re: Reg: Busybox mount fails to mount ntfs file system

2014-09-12 Thread Ralf Friedl
Indira Valmiki wrote: I am using debian wheezy. Kernel version - 3.4.74. busybox version - 1.21.1 I am trying to mount a NTFS filesystem USB by using following command. mount -t ntfs-3g /dev/sda1 mount location But i'm getting below error, mount: mounting /dev/sda1 on /var/local/devices/ntfs

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-05 Thread Ralf Friedl
Xabier Oneca -- xOneca wrote: Hello again, 2014-09-05 18:19 GMT+02:00 Xabier Oneca -- xOneca xon...@gmail.com: Hello list, I want to highlight what GNU coreutils' help docs (info coreutils 'false invocation') says about false when invoked with --help: Note that `false' (unlike all other

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-05 Thread Ralf Friedl
Xabier Oneca -- xOneca wrote: And I want to add that --help will only be used ever in an interactive shell by a person, so the return value may be dispensable. (i.e. doesn't mind to the user how does --help return as soon as the help text is printed in screen) Actually this is the

Re: [PATCH v2] top: fix and merge code to parse /proc/meminfo

2014-07-28 Thread Ralf Friedl
Timo Teras wrote: On Sun, 27 Jul 2014 21:50:28 +0200 Denys Vlasenko vda.li...@googlemail.com wrote: Applied, thanks! Thanks, though I noticed now a weirdness that did not happen before. +static void parse_meminfo(unsigned long meminfo[MI_MAX]) +{ ... + memset(meminfo, 0,

Re: Info for Rich Felker, as I have permanent failure to deliver mail to him

2014-07-01 Thread Ralf Friedl
Harald Becker wrote: Hi Rich, you told me dal...@libc.org had an intermediate problem, but shall work normal. Since my first question to this, I have continued trouble to send mail to your address. I always get an error reply, like this: Harald This is an error in the DNS of libc.org. As

Re: ftpd authentication [PATCH] ftpd: NOMMU/chroot fix

2014-06-26 Thread Ralf Friedl
Denys Vlasenko wrote: On Thu, Jun 26, 2014 at 11:45 AM, Morten Kvistgaard m...@pch-engineering.dk wrote: I've attached my strace. I'm not sure that it tells me anything though. I've run: sudo strace -pinetd_pid -f -o ftpd.strace Is there a better way? Anyway, the current code will exit jail

Re: [PATCH 1/2] find: use sysconf(_SC_ARG_MAX) to determine the command-line size limit

2014-06-23 Thread Ralf Friedl
Bartosz Gołaszewski wrote: 2014-06-22 13:49 GMT+02:00 Denys Vlasenko vda.li...@googlemail.com: + IF_FEATURE_FIND_EXEC_PLUS(G.max_argv_len = BB_ARG_MAX;) \ The - 2048 part should be here, not inside BB_ARG_MAX (not all users will want that subtraction). But then the user would substract

Re: setting a default LANG option for unicode, ash shell - patch

2014-06-12 Thread Ralf Friedl
Richard Moore wrote: I am just posting this in case it helps someone else out. I had trouble creating a small live boot system to run an ncurses program requiring unicode support, running straight from rcS. Without the LANG env set it didn't display any unicode. Exporting LANG in rcS didnt

Re: Proposition: use a hashtable instead of bsearch to locate applets

2014-05-30 Thread Ralf Friedl
Rich Felker wrote: On Fri, May 30, 2014 at 12:13:41PM +0100, Laurent Bercot wrote: On 05/30/2014 10:16 AM, Bartosz Gołaszewski wrote: I've checked the times just by looking up all the applets in a loop and measuring the time using gettimeofday() - the results are: ~220 microseconds for bsearch

Re: Changing the user name

2014-05-14 Thread Ralf Friedl
Laszlo Papp wrote: is this possible? I am looking for something like usermod -l on desktop. Alternatively, I have to look into the get/setpwent syscalls? You can also use sed to change /etc/passwd sed -i -e /s^olduser:/newuser:/ /etc/passwd ___

Re: Changing the user name

2014-05-14 Thread Ralf Friedl
Laszlo Papp wrote: On Wed, May 14, 2014 at 7:28 AM, Ralf Friedl ralf.fri...@online.de wrote: Laszlo Papp wrote: is this possible? I am looking for something like usermod -l on desktop. Alternatively, I have to look into the get/setpwent syscalls? You can also use sed to change /etc/passwd

Re: [PATCH 1/1] hwclock: Verify RTC file descriptor; use reentrant functions

2014-05-06 Thread Ralf Friedl
Bryan Evenson wrote: Well, this is leading into some interesting questions about responsibility. I reported my results on the linux-arm-kernel mailing list, and it is possible I uncovered a bug in the Atmel RTC driver. I'll know a little more by this time tomorrow on that issue. I'd say

Re: [PATCH 0/2] fix find_execable function and which code cleanup

2014-05-02 Thread Ralf Friedl
Tito wrote: On Thursday 01 May 2014 21:30:25 Ralf Friedl wrote: Tito wrote: while trying to cleanup the debianutils/which command I've spotted a minor glitch in bb's find_execable function as it is not able to handle zero lenght prefixes in the PATH variable: http://pubs.opengroup.org

Re: [PATCH 0/2] fix find_execable function and which code cleanup

2014-05-02 Thread Ralf Friedl
Tito wrote: That's it about PATCH 1. There is still PATCH 2 Your patch searches in PATH for dir/file if dir/file is not executable. The normal behavior is to not search PATH if the argument contains a '/'. If you rewrite which anyway, you could also change the following points: - Remove

Re: [PATCH 0/2] fix find_execable function and which code cleanup

2014-05-01 Thread Ralf Friedl
Tito wrote: while trying to cleanup the debianutils/which command I've spotted a minor glitch in bb's find_execable function as it is not able to handle zero lenght prefixes in the PATH variable: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html 8.3 Other Environment

Re: [PATCH 1/1] hwclock: Verify RTC file descriptor; use reentrant functions

2014-04-29 Thread Ralf Friedl
Bryan Evenson wrote: Similarly, the returned pointer of ctime and localtime was being used without checking if the pointer was valid. One of these calls was causing a call to hwclock to enter an uninterruptable sleep when the invalid hwclock access occurred. An uninterruptable sleep is a

Re: Receiving two REMOVE actions for the same USB drive

2014-04-28 Thread Ralf Friedl
Mason wrote: Mason wrote: Hello everyone, I'm using a vendor-supplied software stack which includes a customized Linux kernel (2.6.28) along with busybox v1.20.2 I'm seeing something strange from mdev when I unplug my USB mass storage device: the REMOVE action is notified twice with two

Re: dc hitting a compiler bug, or undefined behavior

2014-03-31 Thread Ralf Friedl
Lauri Kasanen wrote: On Mon, Mar 31, 2014, at 0:37, Ralf Friedl wrote: Are you using some special compiler options, especially regarding parameter passing in registers and stack alignment? None, I'm afraid. CFLAGS etc are all unset. See later on for the gcc defaults too. Thanks

Re: dc hitting a compiler bug, or undefined behavior

2014-03-30 Thread Ralf Friedl
Lauri Kasanen wrote: I'm seeing busybox dc acting funny when compiled with some versions of gcc. This is on busybox git. The x86 binary busybox_unstripped and config are attached. gcc 4.2.2 - ok gcc 4.7.2: nc 10 1 add p 2.738e+93 So either bb is hitting a compiler bug, or undefined behavior

Re: dc hitting a compiler bug, or undefined behavior

2014-03-30 Thread Ralf Friedl
Lauri Kasanen schrieb: On Sun, Mar 30, 2014, at 15:05, Ralf Friedl wrote: I'm seeing busybox dc acting funny when compiled with some versions of gcc. This is on busybox git. The x86 binary busybox_unstripped and config are attached. gcc 4.2.2 - ok gcc 4.7.2: nc 10 1 add p 2.738e+93 So either

Re: dc hitting a compiler bug, or undefined behavior

2014-03-30 Thread Ralf Friedl
Lauri Kasanen wrote: On Sun, Mar 30, 2014, at 18:26, Ralf Friedl wrote: What's even worse is that adding any output to push(), even a puts(hi) that does not print the argument or any of the stack vars, fixes it. So something magic is going on inside the GCC optimization, I'm afraid

Re: /proc/pid/cmdline and udhcpcd

2014-03-26 Thread Ralf Friedl
Matt Whitlock wrote: On Tuesday, 25 March 2014, at 10:52 pm, Cristian Ionescu-Idbohrn wrote: I find out that using that option: -x hostname:foo ^ shows up in /proc/pid/cmdline as: -x hostname foo ^ /proc/pid/cmdline reflects any changes

Re: Ntpd config file support

2014-03-22 Thread Ralf Friedl
Mike Dean wrote: You mentioned earlier that code is never freed from memory. If you're this concerned with bloat, why don't you fix your problem of never deallocating the init code instead of worrying about some small feature like this? The Linux kernel does this; that's why you see the

Re: [PATCH] Ntpd config file support

2014-03-22 Thread Ralf Friedl
Harald Becker wrote: Your program will fail on lines starting with the word server (eg. serverxyz), that is it does not check for clear word boundary and gives wrong results in that case. The program will not fail for serverxyz, it will add a server xyz. This may be a bug or a feature :-)

Re: Ntpd config file support

2014-03-18 Thread Ralf Friedl
Hi Laszlo First, please either write your message below the quotes, or omit the quotes. Especially don't quote parts that are not relevant to your message. Laszlo Papp wrote: At least three people expressed that it is about convenience, a useful one. Well, all of them didn't provide a

Re: Ntpd config file support

2014-03-18 Thread Ralf Friedl
Laszlo Papp wrote: On Tue, Mar 18, 2014 at 9:17 PM, Ralf Friedl ralf.fri...@online.de wrote: First, please either write your message below the quotes, or omit the quotes. Especially don't quote parts that are not relevant to your message. I have no idea what point you are trying to make

Re: [PATCH] correct_password: Handle NULL from crypt

2014-02-04 Thread Ralf Friedl
Lauri Kasanen wrote: As with many other software, busybox was also broken by the glibc = 2.17 behavior change. Now crypt() returns NULL if either salt or password is invalid. This causes busybox 1.21, 1.22, and git su to segfault, when you just press enter at the password prompt (configured to

Re: set_loop tries to create 1048575 loop devices

2014-01-21 Thread Ralf Friedl
Lauri Kasanen wrote: On Mon, Jan 20, 2014, at 18:52, Ralf Friedl wrote: Hi I just had mount create a large number of loop devices before I interrupted it. The reason is that the loop module is not loaded in the kernel, but it would be better to have an error message instead. ... I don't know

Re: set_loop tries to create 1048575 loop devices

2014-01-21 Thread Ralf Friedl
Denys Vlasenko schrieb: Yes, good idea. Please try current git, I pushed a fix there. Works very well, thank you. Ralf ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox

set_loop tries to create 1048575 loop devices

2014-01-20 Thread Ralf Friedl
Hi I just had mount create a large number of loop devices before I interrupted it. The reason is that the loop module is not loaded in the kernel, but it would be better to have an error message instead. Here ist the strace output: stat64(/dev/loop0, 0x7ffd8840)= -1 ENOENT (No such

Re: [PATCH] udhcpc6 source address is null, should be link-local address

2013-08-21 Thread Ralf Friedl
Denys Vlasenko wrote: But what if interface has no IPv6 addresses? Isn't the whole purpose of DHCP is to *acquire an address*? For example, I don't use or need IPv6 for now. I just checked, and as expected, none of my interfaces have any IPv6 addresses. What should happen in this case? Does an

Re: [PATCH] guess_fstype applet

2013-08-21 Thread Ralf Friedl
James B wrote: klibc has fstype binary to detect filesystem types during boot time. util-linux mount has mount -guess-fstype to do the same. Why not use printf? It's already used in busybox, so it wont be included just for this applet. I'm sure it would also make the code shorter. (I do hope

Re: Cross-compilation

2013-06-04 Thread Ralf Friedl
Laurent Bercot wrote: Autotools-based can be good or bad for cross-compiling. The biggest issue is that lots of people write broken tests that need to run test programs to get the results they want. As long as there are differences between systems, build-time tests will be necessary to check

Re: [PATCH] ubimkvol: add -m option to create volume of maximum size

2013-06-04 Thread Ralf Friedl
walter harms schrieb: Am 03.06.2013 20:45, schrieb Paul B. Henson: On 6/3/2013 3:48 AM, walter harms wrote: +p = path + sprintf(path, /sys/class/ubi/ubi%d/, num); + +strcpy(p, avail_eraseblocks); you can use xasprintf() here ? I dunno, Mike said to use

Re: [PATCH] sulogin: allow system maintenance login if root password is empty

2013-05-20 Thread Ralf Friedl
Jonathan Liu wrote: The current password checking is unable to distinguish between the user entering an empty password or pressing Control-D. As a result, an empty password always results in normal startup. We modify bb_ask to store the EOF status after the null terminator if the password is

Re: CTRL-ALT-DEL not working as expected. Seeking for advices

2013-03-30 Thread Ralf Friedl
Laurent Bercot wrote: kernel (hd0,0)/vmlinuz-... root=/dev/sda2 init=/root/a.out Depending on your kernel, it may be a little more complicated than that. If your kernel has been compiled with an initramfs, the first userland process won't be /root/a.out, but the /init file in the

Re: [git commit] hostid: do not output sign-extended host id. Closes 6056

2013-03-15 Thread Ralf Friedl
Denys Vlasenko wrote: On Wednesday 06 March 2013 08:27, Thierry Reding wrote: On Mon, Mar 04, 2013 at 03:04:38AM +0100, Denys Vlasenko wrote: commit: http://git.busybox.net/busybox/commit/?id=9bbf6b98c42a212b8a4b1aa02975ac18bb612922 branch:

Re: Telnet and carriage return.

2012-09-13 Thread Ralf Friedl
Arnaud Rébillout wrote: Also, any SMTP server I've ever used accepts NL-only (with no CR) input, so for interactive use rather than script use (wherein the latter you would want to be fully robust against strict servers), it probably doesn't matter anyway... I'm experimenting with a gmail server

Re: Telnet and carriage return.

2012-09-13 Thread Ralf Friedl
Denys Vlasenko wrote: Changed it to this in git: else if (c == '\r') - outbuf[j++] = '\0'; /* CR - CR NUL */ + /* See RFC 1123 3.3.1 Telnet End-of-Line Convention. +* Using CR LF instead of other allowed

Re: Telnet and carriage return.

2012-09-13 Thread Ralf Friedl
Denys Vlasenko wrote: On Thu, Sep 13, 2012 at 2:55 PM, Ralf Friedl ralf.fri...@online.de wrote: Denys Vlasenko wrote: Changed it to this in git: else if (c == '\r') - outbuf[j++] = '\0'; /* CR - CR NUL */ + /* See RFC 1123

Re: shell parsing bug with

2012-09-02 Thread Ralf Friedl
Rich Felker wrote: On Sun, Sep 02, 2012 at 11:35:04PM +0200, Yann E. MORIN wrote: On Sunday 02 September 2012 23:21:36 Rich Felker wrote: It seems busybox ash is misinterpreting as having some special meaning rather than being a token followed by a token. Okay. The problem

Re: [PATCH] refactor correct_password.c to avoid one #if

2012-08-01 Thread Ralf Friedl
Tito wrote: On Tuesday 31 July 2012 18:08:15 walter harms wrote: @@ -55,7 +49,10 @@ int FAST_FUNC correct_password(const struct passwd *pw) } correct = pw-pw_passwd; #if ENABLE_FEATURE_SHADOWPASSWDS + /* Using _r function to avoid pulling in static buffers */

Re: Copyright message for 1.20.2?

2012-07-13 Thread Ralf Friedl
ra...@gmx.de wrote: IMO it may be a personal decision on many different aspects if we include a lengthy copyright notice within the binary or not. We can have a configuration option to select between a full list of all copyright holders (automatically generated from special /* Copyright: header

Re: [PATCH] new applet gethostbyname

2012-07-08 Thread Ralf Friedl
Eial Czerwacki wrote: system 1: nslookup skynet Server: 10.200.10.20 Address:10.200.10.20#53 Name: skynet Address: 10.200.10.20 system 2: nslookup skynet Server:10.200.10.20 Address 1: 10.200.10.20 skynet Name: skynet Address 1: 10.200.10.20 skynet both use the

Re: [PATCH] new applet gethostbyname

2012-07-08 Thread Ralf Friedl
Eial Czerwacki wrote: On 07/08/2012 01:27 PM, Ralf Friedl wrote: Looking at the source busybox-1.19.2/networking/nslookup.c it's simply not possible that the output of system 1 comes from busybox 1.19.2. but still I do see two distinct outputs on the same busybox. Please verify

Re: [PATCH] new applet gethostbyname

2012-07-08 Thread Ralf Friedl
Harald Becker wrote: By the way, the applet nslookup is misleading, because it uses getaddrinfo instead of a DNS query. As a consequence, there are even answers from non existing DNS-servers. Whops ... so Busybox nslookup does the job of 'getent hosts' (or one of its alikes) ... and not

Re: [PATCH] new applet gethostbyname

2012-07-08 Thread Ralf Friedl
Eial Czerwacki wrote: On 07/08/2012 01:57 PM, Ralf Friedl wrote: Eial Czerwacki wrote: On 07/08/2012 01:27 PM, Ralf Friedl wrote: Looking at the source busybox-1.19.2/networking/nslookup.c it's simply not possible that the output of system 1 comes from busybox 1.19.2

Re: Mounting Filesystem over existing directory

2012-05-30 Thread Ralf Friedl
What you are looking for is sometimes called union file system. There exist some variations of such file systems, unfortunately there is none in the official kernel. It seems that Linus doesn't like the idea. Of course this is not related to busybox. You may want to look at the implementation

Re: `netstat -ntp` odd 'Program name' presentation

2012-04-22 Thread Ralf Friedl
Cristian Ionescu-Idbohrn wrote: The 'Program name' part is fetched from /proc/pid/cmdline, then mangled before presentation. Mangling is done in netstat.c, function 'dir_act'. The function assumes cmdline is a file path and extracts the basename. Obviously that assumption is not always correct.

Re: [ra...@gmx.de: computer phenomena: output of tty applet]

2012-04-02 Thread Ralf Friedl
ra...@gmx.de wrote: I think reading /proc/self/fd/1 (we want to test stdout, not stdin or stderr) is the right thing to do for the tty command, As far as I know is tty specified to test the stdin so fd 0 is the right one (fd 2 was a typo of mine, sorry). Currently Busybox and GNU tty test

Re: Compiling Busybox for gcov coverage testing

2012-03-08 Thread Ralf Friedl
Jiaqi Tan wrote: Hi, I'm sorry if this has been asked before, but has anyone tried compiling Busybox on x86 for gcov coverage testing before? I tried using CFLAGS=-fprofile-arcs -ftest-coverage but the compilation failed with the following errors: HOSTLD scripts/kconfig/conf

Re: BusyBox ash as subshell for mc (midnight commander)?

2012-03-01 Thread Ralf Friedl
ra...@gmx.de schrieb: http://freetz.org Are you going to add mc to freetz? ... wow ... that may swap some of my priorities. Mc has been in Freetz for a long time (at least five years). ___ busybox mailing list busybox@busybox.net

Re: Amusing article about busybox

2012-02-28 Thread Ralf Friedl
Felipe Contreras wrote: On Wed, Feb 15, 2012 at 5:46 PM, Ralf Friedl ralf.fri...@online.de wrote: Let's get some facts straight. Sony wants to avoid the GPL busybox not because of busybox itself, but because they fear that they can be forced to comply with the GPL on Linux, and they want

Re: [Patch] fix unsigned long fast_strtoul_10(char **endptr) for Linux 2.4

2012-02-28 Thread Ralf Friedl
walter harms wrote: Enabling the fast proc scan code for linux2.4 causes top to display strange numbers [see:possible bug in proc fast scan code] the reason for this is that the last char in proc/$$/stat is \n. This is no problem for 2.4 since the stats line contains additional chars. Please

Re: Amusing article about busybox

2012-02-15 Thread Ralf Friedl
Felipe Contreras wrote: On Sun, Feb 12, 2012 at 4:47 AM, Ralf Friedl ralf.fri...@online.de wrote: Felipe Contreras wrote: True, there are exceptions. There are more exceptions. You seem to imply that without enforcement of the GPL, there would magically appear more companies who

Re: Amusing article about busybox

2012-02-11 Thread Ralf Friedl
Felipe Contreras wrote: On Sat, Feb 11, 2012 at 8:19 PM, Bradley M. Kuhn bk...@ebb.org wrote: Felipe Contreras wrote at 15:16 (EST) yesterday: Enforcement only ensures that we would get the bare minimum (legal) from the company, and IMO that doesn't help much. OpenWRT and

Help text for pivot_root

2011-11-06 Thread Ralf Friedl
Could you add something like this to the help text for pivot_root? It would have saved me quite some time when I removed pivot_root from a 2.6 system that needed it. Ralf Signed-off-by: Ralf Friedl ralf.fri...@online.de diff --git a/util-linux/Config.src b/util-linux/Config.src index 888bc8f

Re: [PATCH] ifupdown: support post-up / pre-down hooks

2011-10-06 Thread Ralf Friedl
Peter Korsgaard wrote: diff --git a/networking/ifupdown.c b/networking/ifupdown.c index 3820330..abc6b58 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c @@ -891,6 +891,8 @@ static struct interfaces_file_t *read_interfaces(const char *filename) if

Re: [PATCH] improve checks on usernames V3.

2011-08-04 Thread Ralf Friedl
Harald Becker wrote: Tar never creates user when extracting. It should just treat whatever comes as a string and pass it to getpwnam, which should also not care and use something like strcmp. I would just call that tar program broken. Call them broken, but still such implementations exist

Re: [PATCH] improve checks on usernames V3.

2011-08-03 Thread Ralf Friedl
Harald Becker wrote: On 02.08.2011 22:16, Ralf Friedl wrote: What is the problem with locale-specific characters? Portability is the problem. Especially if tar files of such users and untar it on other systems those none-portable user names may produce trouble. Sometimes serious

Re: [PATCH] improve checks on usernames V3.

2011-08-02 Thread Ralf Friedl
Tito wrote: Hi, minor improvements vs. v2 patch: 1) some more comments added. 2) we now print the position of the illegal character. ... /* We don't use isalnum as it will allow locale-specific non-ASCII */ /* letters in legacy 8-bit locales. * What is the

Re: [PATCH] users: new applet

2011-07-27 Thread Ralf Friedl
gotru...@gmail.com wrote: On Wed, Jul 27, 2011 at 11:29 AM, Matthias Andree mand...@freebsd.org wrote: Re printf, adding a format string (%s) is absolutely necessary. Else use fputs(ut-ut_user, stdout) It was about saving bytes but ok, revised patch attached. You can probably get those

[PATCH] df option -P

2011-07-19 Thread Ralf Friedl
Hi In coreutils df, one of the effects of the option -P is to output everything in one line. This makes it much easier for a script to parse the output of df. This patch adds the same behavior to busybox df. Ralf diff --git a/coreutils/df.c b/coreutils/df.c index 846cb38..63dbd61 100644 ---

Re: [PATCH] ash: add support for history buffer

2011-07-14 Thread Ralf Friedl
Dennis Groenen wrote: Ash writes to ~/.ash_history after every command, causing excessive wear on devices which use a flash-based device as their storage medium (i.e. one erase block cycle per command). This patch allows you to set a temporary location where ash's history will be saved until the

Re: [1.16.2] reboot - No such file or directory?

2011-07-01 Thread Ralf Friedl
Ed W wrote: On 30/06/2011 16:19, Gilles wrote: However when I run /bin/reboot, I get this: root:/bin ./reboot reboot: No such file or directory I might be on the wrong track, but just a heads up: You get this error message when you run some script

Re: Significant performance problem with modprobe

2011-06-14 Thread Ralf Friedl
Ed W wrote: On 14/06/2011 11:31, Lauri Kasanen wrote: While fixing this issue wouldn't make a huge difference in my case, it would seem to have a measurable effect nonetheless. I guess for the big effect I should wait for the mentioned module loader work. A quick way to benchmark the

Re: Significant performance problem with modprobe

2011-06-14 Thread Ralf Friedl
Ed W wrote: On 14/06/2011 13:19, Ralf Friedl wrote: You wrote earlier that your modules.alias is 137KB. How many modules do you have in that file? I have just 34kB for a full PC Linux. Hmm, curious. I only have a couple of modules, basically wireless drivers and serial to usb drivers

Re: busybox with single applet enabled

2011-05-20 Thread Ralf Friedl
Sergey Naumov wrote: Let's imagine a typical situation: you changed some applet and now you want to test it. You call make allnoconfig, then in menuconfig you enable desired applet, make busybox and call applet as usual: ./busybox applet parameters And... your parameters are treated differently

  1   2   >