Terry Lambert wrote:
Joe Kelsey wrote:/* name must start with a '/' but not contain one. */ if (*name != '/' || len < 2 || index(name + 1, '/') != NULL) { free(ret, M_SEM); return (EINVAL); } The comment makes it look like this code allows a 14-character named semaphore which *must* start with a slash and cannot contain embedded slashes. In other words, it does *not* conform to pathname semantics.OK, this is a bug. The semantics don't conform to POSIX.
...
I think that it *is* a two-line fix. Remove the maximum length (or impose a maximum length of MAX_PATHNAMELEN), and simply remove the whole '/' checking. Then, the private namespace correctly emulates posix semantics, except for the rooted versus relative stuff, which would be *really* hard to do in a private namespace and of questionable value anyway.I rather imagine the correct thing to do is to root it in the FS, and, without a leading '/', treat it as relative to the process current directory. Basically, this is not a two line fix... it's a lot of work, to get a filesystem object to use.
/Joe
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message