Re: ksh: expr 2147483648 / 2 = -1073741824 expected behavior or bug?

2014-02-25 Thread Fabian Raetz
On Tue, Feb 25, 2014 at 02:00:49AM +0100, Ingo Schwarze wrote: Hi Fabian, Fabian Raetz wrote on Mon, Feb 24, 2014 at 10:59:34PM +0100: while calculating my phys. memory (mb) with the folllowing shellsript i get as a result -424. sysctl -n hw.physmem returns 3849830400

Re: More OpenBSD on Hacker News -- RBAC and jails anyone?

2014-02-25 Thread Kevin Chadwick
previously on this list Matthew Weigel contributed: 1. Why doesn't OpenBSD have something like RBAC? RBAC has a lot more knobs to tweak, so you can always go back after a security incident and say aha! I need to tweak *that* knob to prevent this next time! But it has a steep learning

ksh reopening stdin

2014-02-25 Thread LEVAI Daniel
Hi! I'm doing this: --- script.sh --- #!/bin/ksh for word in $(tr '\n' ' ');do # ^^ tr(1) reads from standard input ... some stuff ... done read FOO case ${FOO} in ... ... ... esac --- script.sh --- $ script.sh /foo/bar The problem with this of course, is

Re: ksh: expr 2147483648 / 2 = -1073741824 expected behavior or bug?

2014-02-25 Thread pae3
On 02/25/2014 15:43, Fabian Raetz wrote: On Tue, Feb 25, 2014 at 02:00:49AM +0100, Ingo Schwarze wrote: Hi Fabian, Fabian Raetz wrote on Mon, Feb 24, 2014 at 10:59:34PM +0100: while calculating my phys. memory (mb) with the folllowing shellsript i get as a result -424. sysctl -n hw.physmem

Re: ksh reopening stdin

2014-02-25 Thread Jérémie Courrèges-Anglas
LEVAI Daniel l...@ecentrum.hu writes: Hi! Hi Daniel, I'm doing this: --- script.sh --- #!/bin/ksh for word in $(tr '\n' ' ');do # ^^ tr(1) reads from standard input ... some stuff ... done read FOO case ${FOO} in ... ... ... esac --- script.sh ---

Re: ksh reopening stdin

2014-02-25 Thread LEVAI Daniel
On k, febr 25, 2014 at 14:19:44 +0100, Jérémie Courrèges-Anglas wrote: LEVAI Daniel l...@ecentrum.hu writes: Hi! Hi Daniel, [...] Try using ''read /dev/tty'' for your interactive user input. Cheers, Jérémie! I can even use `exec 0/dev/tty' before any read! Daniel -- LÉVAI Dániel

Re: ksh: expr 2147483648 / 2 = -1073741824 expected behavior or bug?

2014-02-25 Thread Ingo Schwarze
Hi, pae3 wrote on Tue, Feb 25, 2014 at 04:52:52PM +0400: on my i386 system: $expr 2147483648 + 0 -2147483648 $sh -c 'echo $((2147483648 + 0))' -2147483648 $bash -c 'echo $((2147483648 + 0))' 2147483648 $zsh -c 'echo $((2147483648 + 0))' 2147483648 bug in ksh? No. Assuming you are

Re: ksh: expr 2147483648 / 2 = -1073741824 expected behavior or bug?

2014-02-25 Thread Theo de Raadt
I'm pretty new to shell programming and the behavior required by POSIX makes no sense to me at all how could i ever trust in expr with unknown numbers? Indeed. Sometimes you just can't trust decisions set in stone by POSIX. Sometimes they are just plain broken. If an architecture

How to mount_udf -o rw ?

2014-02-25 Thread Jens A. Griepentrog
Dear OpenBSD misc listeners! How to mount UDF file systems on DVD-RAM media with read and write access? $ sudo disklabel cd0 # /dev/rcd0c: type: ATAPI disk: MEI_UDF label: fictitious duid: flags: bytes/sector: 2048 sectors/track: 100 tracks/cylinder: 1 sectors/cylinder: 100

Re: How to mount_udf -o rw ?

2014-02-25 Thread Theo de Raadt
How to mount UDF file systems on DVD-RAM media with read and write access? You don't. Our ISOFS and UDF support is readonly.

Re: How to mount_udf -o rw ?

2014-02-25 Thread Jens A. Griepentrog
Theo de Raadt wrote: How to mount UDF file systems on DVD-RAM media with read and write access? You don't. Our ISOFS and UDF support is readonly. Thank you for confirmation! Sorry for the noise, only one look into the sources src/sbin/mount_udf/mount_udf.c would have been enough to answer

Re: How to mount_udf -o rw ?

2014-02-25 Thread Ted Unangst
On Wed, Feb 26, 2014 at 00:36, Jens A. Griepentrog wrote: Theo de Raadt wrote: How to mount UDF file systems on DVD-RAM media with read and write access? You don't. Our ISOFS and UDF support is readonly. Thank you for confirmation! Sorry for the noise, only one look into the sources