Re: Fix for mountpath lenght

2001-02-16 Thread Robert Watson
On Fri, 16 Feb 2001, Bruce Evans wrote: What is it you're trying to accomplish here, exactly? Is it prevent paths MNAMELEN to be used as targets of mounting operations? Or is it to truncate strings reported via statfs to some arbitrary bound? If it's the It is to not permit mount()

Fix for mountpath lenght

2001-02-15 Thread Martin Blapp
In mount.h, we have a #define MNAMELEN80 and in struct statfs {} we have: charf_mntonname[MNAMELEN]; /* directory on which mounted */ but the kernel does no check to see if the mountpath is longer than MNAMELEN, it just accepts it ? It's impossible to umount(8) it, because

Re: Fix for mountpath lenght

2001-02-15 Thread Alfred Perlstein
This looks right, except that Bruce says that SCARG isn't to be used, instead just use uap-path. -Alfred * Martin Blapp [EMAIL PROTECTED] [010215 09:46] wrote: In mount.h, we have a #define MNAMELEN80 and in struct statfs {} we have: charf_mntonname[MNAMELEN]; /* directory

Re: Fix for mountpath lenght

2001-02-15 Thread Alfred Perlstein
* Alfred Perlstein [EMAIL PROTECTED] [010215 10:15] wrote: This looks right, except that Bruce says that SCARG isn't to be used, instead just use uap-path. Also, you can't call strlen on a userland pointer. please test patches before submitting them! -Alfred * Martin Blapp [EMAIL

Re: Fix for mountpath lenght

2001-02-15 Thread Robert Watson
As has been pointed out, this is simply incorrect due to an attempt to use kernel string operators on a string in the kernel address space. Generally speaking, it's a bad idea to explicitly perform string activities on userland strings, instead, to rely on the bounds checking in copyinstr() and

Re: Fix for mountpath lenght

2001-02-15 Thread Bruce Evans
On Thu, 15 Feb 2001, Robert Watson wrote: As has been pointed out, this is simply incorrect due to an attempt to use kernel string operators on a string in the kernel address space. Generally speaking, it's a bad idea to explicitly perform string activities on userland strings, instead, to