Messages in this thread | | | Date | Thu, 15 Apr 2004 13:02:36 -0700 | From | Chris Wright <> | Subject | Re: [PATCH] mq_open() honor leading slash |
| |
* Jakub Jelinek (jakub@redhat.com) wrote: > On Thu, Apr 15, 2004 at 11:39:51AM -0700, Chris Wright wrote: > > Patch below simply eats all leading slashes before passing name to > > lookup_one_len() in mq_open() and mq_unlink(). > > glibc already strips the leading slash in userland.
Ah, OK. I'm just using the kernel interfaces directly.
> If you want to do it in the kernel instead, it shouldn't IMHO be silent if it > doesn't see a leading slash or sees more than one. I.e. > error = -EINVAL; > if (name[0] != '/') > goto out_err;
Given it's implementation defined what happens w/out leading slash, I see no trouble with allowing names w/out leading slashes to be looked up as well as names with leading slash (in kernel rather than glibc). But I don't feel strongly either way.
thanks, -chris -- Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |