Re: [9fans] `test -x` returns wrong results for directories

2020-06-09 Thread Ethan Gardener
On Mon, Jun 8, 2020, at 3:13 AM, Charles Forsyth wrote: >> "search" is exactly the wrong word for what this bit does, because if you >> don't have "search" permission, the one thing you can still do is look at >> the names. > > in ramfs, but that's a bug that no-one had noticed oh it's the sam

Re: [9fans] `test -x` returns wrong results for directories

2020-06-07 Thread Charles Forsyth
I see I'd misapplied the rule in walk(5) so fossil is fine. It has to do with searching from . when you are there, which makes sense, not when entering the directory from its parent, so ignore that part of my earlier post. On Mon, Jun 8, 2020 at 3:13 AM Charles Forsyth wrote: > "search" is exac

Re: [9fans] `test -x` returns wrong results for directories

2020-06-07 Thread Charles Forsyth
> > "search" is exactly the wrong word for what this bit does, because if you > don't have "search" permission, the one thing you can still do is look at > the names. in ramfs, but that's a bug that no-one had noticed On Mon, Jun 8, 2020 at 3:05 AM wrote: > >>> So, cd'ing into a directory with

Re: [9fans] `test -x` returns wrong results for directories

2020-06-07 Thread ori
>>> So, cd'ing into a directory withut +x leads >>> to an inescapabler trap. >> ... >> fossil just moved up another notch in my estimation because directory search >> restriction is so broken. > > o...@eigenstate.org, what version of fossil were your experiments done on? > My observations are dif

Re: [9fans] `test -x` returns wrong results for directories

2020-06-07 Thread Richard Miller
>> So, cd'ing into a directory withut +x leads >> to an inescapabler trap. > ... > fossil just moved up another notch in my estimation because directory search > restriction is so broken. o...@eigenstate.org, what version of fossil were your experiments done on? My observations are different: te

Re: [9fans] `test -x` returns wrong results for directories

2020-06-07 Thread Ethan Gardener
On Sat, Jun 6, 2020, at 10:13 PM, o...@eigenstate.org wrote: > > it's open() which is failing. i suppose it should. > > > > if the open fails, maybe access should stat the file, and if it's a > > directory, try dirread(2). or maybe just opening it for reading will > > work. i don't know, i'm new t

Re: [9fans] `test -x` returns wrong results for directories

2020-06-07 Thread Ethan Gardener
On Sat, Jun 6, 2020, at 2:25 PM, Charles Forsyth wrote: > execute permission on files, meaning here non-directories, is a special > variant of read. a file with mode 0111 can be opened with OEXEC and read(2) > will work as well as exec(2), > but can't be opened with OREAD, because it's not got an

Re: [9fans] `test -x` returns wrong results for directories

2020-06-06 Thread ori
> it's open() which is failing. i suppose it should. > > if the open fails, maybe access should stat the file, and if it's a > directory, try dirread(2). or maybe just opening it for reading will > work. i don't know, i'm new to this bit of plan 9 & i haven't slept. This is a bit subtle, though -

Re: [9fans] `test -x` returns wrong results for directories

2020-06-06 Thread Charles Forsyth
execute permission on files, meaning here non-directories, is a special variant of read. a file with mode 0111 can be opened with OEXEC and read(2) will work as well as exec(2), but can't be opened with OREAD, because it's not got any of 0444 set. bits 0111 distinguish a file with contents that are

Re: [9fans] `test -x` returns wrong results for directories

2020-06-06 Thread Alexander Kapshuk
On Sat, Jun 6, 2020 at 9:38 AM Ethan Gardener wrote: > > On Fri, Jun 5, 2020, at 8:22 PM, Richard Miller wrote: > > Looks to me like access(2) is not doing the right thing for directory > > execute (=search) permission. > > thanks for the tip. access is a very simple function. it doesn't do the ri

Re: [9fans] `test -x` returns wrong results for directories

2020-06-05 Thread Ethan Gardener
On Fri, Jun 5, 2020, at 8:22 PM, Richard Miller wrote: > Looks to me like access(2) is not doing the right thing for directory > execute (=search) permission. thanks for the tip. access is a very simple function. it doesn't do the right thing, but there's a reason: BUGS Since file

Re: [9fans] `test -x` returns wrong results for directories

2020-06-05 Thread Richard Miller
Looks to me like access(2) is not doing the right thing for directory execute (=search) permission. -- 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Tdd7a9b1b32d01f54-M4da73ba68bd93f0827b0a15c Delivery options: https://9fans.topicbox.com/

Re: [9fans] test(1) support for string length (-l) in p9p?

2018-04-10 Thread Kurt H Maier
On Tue, Apr 10, 2018 at 09:28:42AM +0200, dexen deVries wrote: > the man page of test(1) mentions "-l string" as string length operator > for -eq, -gt, etc. > but there seems to be nothing in the plan9port's src/cmd/test.c, nor > in 9p.io/sources/cmd/test.c > > is there any implementation of this

Re: [9fans] test

2015-05-18 Thread Sergey Zhilkin
test number two :) 2015-05-18 7:46 GMT+03:00 : > Seems to work! > > -- > Veety > > -- С наилучшими пожеланиями Жилкин Сергей With best regards Zhilkin Sergey

Re: [9fans] test

2015-05-17 Thread mveety
Seems to work! -- Veety

Re: [9fans] test

2015-04-23 Thread Conor Williams
p > Tavakkolian [skip.tavakkol...@gmail.com] > Sent: Wednesday, April 22, 2015 11:24 AM > To: Fans of the OS Plan 9 from Bell Labs > Subject: Re: [9fans] test > > a kernel may not work, due to unknown trap > lack of wifi drivers and other such crap > don't feel flaccid, fi

Re: [9fans] test

2015-04-22 Thread Skip Tavakkolian
a kernel may not work, due to unknown trap lack of wifi drivers and other such crap don't feel flaccid, fire up acid debug it yourself, and spare us the yap On Wed, Apr 22, 2015 at 11:03 AM Conor Williams wrote: > the kernel does not work in an internet cafe > what shall i do about the internet

Re: [9fans] test

2015-04-22 Thread Benjamin Huntsman
Nice! From: 9fans-boun...@9fans.net [9fans-boun...@9fans.net] on behalf of Skip Tavakkolian [skip.tavakkol...@gmail.com] Sent: Wednesday, April 22, 2015 11:24 AM To: Fans of the OS Plan 9 from Bell Labs Subject: Re: [9fans] test a kernel may not work, due

Re: [9fans] test

2015-04-22 Thread Conor Williams
the kernel does not work in an internet cafe what shall i do about the internet cafe ignore the kernel ignore the kernel ignore the kernel . . . ad infinium... On Mon, Apr 20, 2015 at 2:16 AM, Shane Morris wrote: > Love the limerick! =P > > On Mon, Apr 20, 2015 at 11:08 AM, Skip Tavakkolian <9..

Re: [9fans] test

2015-04-19 Thread Shane Morris
Love the limerick! =P On Mon, Apr 20, 2015 at 11:08 AM, Skip Tavakkolian <9...@9netics.com> wrote: > please ignore... > > there was once a mascot named glenda > for an operating system that's kinda splenda > until, that is, a bunch of kids > ripped off its front fenda > > > >

Re: [9fans] test

2013-11-11 Thread Matthew Veety
> On Nov 12, 2013, at 2:20, cinap_len...@felloff.net wrote: > > testing... > > -- > cinap > Works.

Re: [9fans] test(1) -older bug?

2013-06-03 Thread erik quanstrom
On Mon Jun 3 08:00:20 EDT 2013, arn...@skeeve.com wrote: > Richard Miller <9f...@hamnavoe.com> wrote: > > > And the consequences of not freeing a few bytes of memory, in a command > > which will exit a few microseconds later, would be ... ? > > The Code Correctness Police come and collect you an

Re: [9fans] test(1) -older bug?

2013-06-03 Thread arnold
Richard Miller <9f...@hamnavoe.com> wrote: > And the consequences of not freeing a few bytes of memory, in a command > which will exit a few microseconds later, would be ... ? The Code Correctness Police come and collect you and force you to program on Windows... :-) Arnold

Re: [9fans] test(1) -older bug?

2013-06-03 Thread Richard Miller
> bad taste. I agree - better style is to free memory always, or never. But the choice might not be as obvious as one first thinks.

Re: [9fans] test(1) -older bug?

2013-06-03 Thread Jacob Todd
On Jun 3, 2013 6:49 AM, "Richard Miller" <9f...@hamnavoe.com> wrote: > And the consequences of not freeing a few bytes of memory, in a command > which will exit a few microseconds later, would be ... ? > > bad taste.

Re: [9fans] test(1) -older bug?

2013-06-03 Thread Richard Miller
>> its /n/sources/patch/testolder, also leaks dir in the case: >> >> if(rel) >> n = time(0) - n; >> if(n < 0) >> return 0; <- HERE >> r = dir->mtime < n; >> >> free(dir); >> return r; And the consequences of not freeing a few bytes of memor

Re: [9fans] test(1) -older bug?

2013-06-02 Thread erik quanstrom
On Sun Jun 2 17:31:05 EDT 2013, cinap_len...@gmx.de wrote: > its /n/sources/patch/testolder, also leaks dir in the case: > > if(rel) > n = time(0) - n; > if(n < 0) > return 0; <- HERE > r = dir->mtime < n; > > free(dir); > return r;

Re: [9fans] test(1) -older bug?

2013-06-02 Thread cinap_lenrek
its /n/sources/patch/testolder, also leaks dir in the case: if(rel) n = time(0) - n; if(n < 0) return 0; <- HERE r = dir->mtime < n; free(dir); return r; -- cinap

Re: [9fans] test(1) -older bug?

2013-06-01 Thread erik quanstrom
yup. i think it's a bug: /n/sources/patch/older /n/atom/patch/older - erik

Re: [9fans] test -w on directory

2012-05-25 Thread Charles Forsyth
> > >kb=4096 > > say what!? fittingly, it's unused. > > i'd suppose it was probably going to reduce the buffer size on a wirelessly-connected ipaq

Re: [9fans] test -w on directory

2012-05-24 Thread erik quanstrom
> some rc scripts seem to assume that test -w should work on > directories. examples are /rc/bin/lp which tests for /tmp > being writable. another is /rc/bin/juke that tests on > /mnt/juke. in both cases, the test returning the wrong result won't easily be noticed. lp just mounts somthing else on

Re: [9fans] test

2012-04-16 Thread John Floren
Obvious solution, switch to reading comp.os.plan9 and sending replies to the list :-) On Apr 16, 2012 11:48 AM, wrote: > can't receive mail from 9fans anymore. but can i > still send? > > -- > cinap > >

Re: [9fans] test

2012-04-16 Thread Nemo
got it clear. -- iphone kbd. excuse typos :) On Apr 16, 2012, at 6:46 PM, cinap_len...@gmx.de wrote: > can't receive mail from 9fans anymore. but can i > still send? > > -- > cinap

Re: [9fans] test

2012-04-16 Thread Matthew Veety
On Apr 16, 2012 2:48 PM, wrote: > > can't receive mail from 9fans anymore. but can i > still send? > > -- > cinap > Yes. -- Veety

Re: [9fans] test command

2008-09-11 Thread Kenji Arisawa
Hello, On 2008/09/11, at 11:38, Russ Cox wrote: there are certainly better ways to do this, but this works: as does /bin/mtime. I didn't know this command. thanks russ and erik. Kenji Arisawa

Re: [9fans] test command

2008-09-10 Thread Russ Cox
> there are certainly better ways to do this, but this works: as does /bin/mtime.

Re: [9fans] test command

2008-09-10 Thread erik quanstrom
> > But then there is = and != for strings (for example), so this argument > > is thin :-). > > if we can easily get modified time of a file in the format of UNIX time, > where "easily" means "in the set of plan 9 commands". there are certainly better ways to do this, but this works: - erik #!/

Re: [9fans] test command

2008-09-10 Thread Kenji Arisawa
Hello, On 2008/09/11, at 1:15, Gorka Guardiola wrote: yes, but !older is the same as younger or equal. yes. But then there is = and != for strings (for example), so this argument is thin :-). if we can easily get modified time of a file in the format of UNIX time, where "easily" means "in

Re: [9fans] test command

2008-09-10 Thread Gorka Guardiola
On Wed, Sep 10, 2008 at 5:27 PM, Juan Céspedes <[EMAIL PROTECTED]> wrote: > Maybe I'm confused, but what Kenji said is that: > >> "test" command of plan 9 has a operator "older", the usage is: >>test f -older t >> where f is a file and t is a time. > > If f is a file ant t is a *time*, you

Re: [9fans] test command

2008-09-10 Thread Juan Céspedes
Maybe I'm confused, but what Kenji said is that: > "test" command of plan 9 has a operator "older", the usage is: >test f -older t > where f is a file and t is a time. If f is a file ant t is a *time*, you can't do test t -older f Juan

Re: [9fans] test command

2008-09-10 Thread David Leimbach
On Wed, Sep 10, 2008 at 6:38 AM, ron minnich <[EMAIL PROTECTED]> wrote: > On Wed, Sep 10, 2008 at 3:19 AM, Kenji Arisawa <[EMAIL PROTECTED]> > wrote: > > Hello, > > > > "test" command of plan 9 has a operator "older", the usage is: > >test f -older t > > where f is a file and t is a time.

Re: [9fans] test command

2008-09-10 Thread Rodolfo kix García
a < b = !(a > b) + (a = b) > On Wed, Sep 10, 2008 at 3:19 AM, Kenji Arisawa <[EMAIL PROTECTED]> > wrote: >> Hello, >> >> "test" command of plan 9 has a operator "older", the usage is: >>test f -older t >> where f is a file and t is a time. >> however the command does not have "newer" oper

Re: [9fans] test command

2008-09-10 Thread ron minnich
On Wed, Sep 10, 2008 at 3:19 AM, Kenji Arisawa <[EMAIL PROTECTED]> wrote: > Hello, > > "test" command of plan 9 has a operator "older", the usage is: >test f -older t > where f is a file and t is a time. > however the command does not have "newer" operator. > why? > If a < b, and you want