Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-08 Thread Marko Kreen
On Thu, Dec 07, 2000 at 09:59:18PM -0500, Alexander Viro wrote: > On Fri, 8 Dec 2000 [EMAIL PROTECTED] wrote: > > > BTW, could we finally lose mpx(2)? > > > > Maybe we lost it - I find sys_mpx only in a comment in arch/arm/kernel/calls.S > > Sure, but man2/mpx.2 is alive and well...

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Alexander Viro
On Fri, 8 Dec 2000 [EMAIL PROTECTED] wrote: > > BTW, if you still have 1.7, 1.10, 1.13 and 1.14... > > See ftp://ftp.cwi.nl/pub/aeb/manpages/ (will soon disappear again). Got them, thanks. > > BTW, could we finally lose mpx(2)? > > Maybe we lost it - I find sys_mpx only in a comment in

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Alexander Viro
On Thu, 7 Dec 2000, Andries Brouwer wrote: > On Thu, Dec 07, 2000 at 10:24:31AM -0500, Alexander Viro wrote: > > > Al, currently walking through the /usr/share/man/man2 and swearing silently... > > Swearing? At the POSIX decisions or at the man page quality? Mostly at the

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Andries Brouwer
On Thu, Dec 07, 2000 at 10:24:31AM -0500, Alexander Viro wrote: > Al, currently walking through the /usr/share/man/man2 and swearing silently... Swearing? At the POSIX decisions or at the man page quality? In the latter case, additions and corrections are very welcome. Make sure that you have

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Andries Brouwer
On Thu, Dec 07, 2000 at 08:23:59AM -0500, Alexander Viro wrote: > > Oh, lovely - where the hell had the following come from? > % man truncate > ... >EINVAL The pathname contains a character with the high- > order bit set. > ... > Andries, would you mind removing that,

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Alexander Viro
On Thu, 7 Dec 2000, Tigran Aivazian wrote: > yet. So far you only said that a different implementation, i.e. a > different place to put the checks, is preferrable. -EPERM returned by permission() if we ask for write access to immutable. Al, currently walking through the /usr/share/man/man2

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Tigran Aivazian
On Thu, 7 Dec 2000, Alexander Viro wrote: > On Thu, 7 Dec 2000, Tigran Aivazian wrote: > > > The rationale for being compatible with 4.4BSD on append-only but not on > > immutable is -- for immutable we can do the test by means of permission() > > fast but for append-only we would need an extra

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Tigran Aivazian
On Thu, 7 Dec 2000, Alexander Viro wrote: > So correct solution may very well be to change the return value of > permission(9). FWIW, MAY_TRUNCATE might be a good idea - notice that > knfsd already has something like that. It makes sense for directories, > BTW - having may_delete() drop the

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Alexander Viro
On Thu, 7 Dec 2000, Tigran Aivazian wrote: > The rationale for being compatible with 4.4BSD on append-only but not on > immutable is -- for immutable we can do the test by means of permission() > fast but for append-only we would need an extra if() above permission so > let's just be

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Tigran Aivazian
On Thu, 7 Dec 2000, Tigran Aivazian wrote: > a) we don't hit that test because permission takes care of it (for > regulars/dirs/symlinks but here only regulars are important) omit what is in brackets but everything in email and the patch itself are valid and tested. The detail in bracket above

[patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Tigran Aivazian
On Wed, 6 Dec 2000, Alexander Viro wrote: > On Wed, 6 Dec 2000, Linus Torvalds wrote: > > Why remove the EROFS test? > > there, so if it's not a regular file we die before the call of permission(), > if it is and fs is readonly - we get -EROFS from permission() and die > there. In either case we

[patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Tigran Aivazian
On Wed, 6 Dec 2000, Alexander Viro wrote: On Wed, 6 Dec 2000, Linus Torvalds wrote: Why remove the EROFS test? there, so if it's not a regular file we die before the call of permission(), if it is and fs is readonly - we get -EROFS from permission() and die there. In either case we don't

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Alexander Viro
On Thu, 7 Dec 2000, Tigran Aivazian wrote: The rationale for being compatible with 4.4BSD on append-only but not on immutable is -- for immutable we can do the test by means of permission() fast but for append-only we would need an extra if() above permission so let's just be

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Tigran Aivazian
On Thu, 7 Dec 2000, Alexander Viro wrote: So correct solution may very well be to change the return value of permission(9). FWIW, MAY_TRUNCATE might be a good idea - notice that knfsd already has something like that. It makes sense for directories, BTW - having may_delete() drop the

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Tigran Aivazian
On Thu, 7 Dec 2000, Alexander Viro wrote: On Thu, 7 Dec 2000, Tigran Aivazian wrote: The rationale for being compatible with 4.4BSD on append-only but not on immutable is -- for immutable we can do the test by means of permission() fast but for append-only we would need an extra if()

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Alexander Viro
On Thu, 7 Dec 2000, Tigran Aivazian wrote: yet. So far you only said that a different implementation, i.e. a different place to put the checks, is preferrable. -EPERM returned by permission() if we ask for write access to immutable. Al, currently walking through the /usr/share/man/man2 and

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Andries Brouwer
On Thu, Dec 07, 2000 at 08:23:59AM -0500, Alexander Viro wrote: looking at the truncate(2) manpage Oh, lovely - where the hell had the following come from? % man truncate ... EINVAL The pathname contains a character with the high- order bit set. ... Andries, would

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Andries Brouwer
On Thu, Dec 07, 2000 at 10:24:31AM -0500, Alexander Viro wrote: Al, currently walking through the /usr/share/man/man2 and swearing silently... Swearing? At the POSIX decisions or at the man page quality? In the latter case, additions and corrections are very welcome. Make sure that you have

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Alexander Viro
On Thu, 7 Dec 2000, Andries Brouwer wrote: On Thu, Dec 07, 2000 at 10:24:31AM -0500, Alexander Viro wrote: Al, currently walking through the /usr/share/man/man2 and swearing silently... Swearing? At the POSIX decisions or at the man page quality? Mostly at the

Re: [patch] Re: [patch-2.4.0-test12-pre6] truncate(2) permissions

2000-12-07 Thread Alexander Viro
On Fri, 8 Dec 2000 [EMAIL PROTECTED] wrote: BTW, if you still have 1.7, 1.10, 1.13 and 1.14... See ftp://ftp.cwi.nl/pub/aeb/manpages/ (will soon disappear again). Got them, thanks. BTW, could we finally lose mpx(2)? Maybe we lost it - I find sys_mpx only in a comment in