Download raw body.
[PATCH] link.2: POSIX.1 does not, in fact, mandate file1 to not be a directory
[PATCH] link.2: POSIX.1 does not, in fact, mandate file1 to not be a directory
[PATCH] link.2: POSIX.1 does not, in fact, mandate file1 to not be a directory
[PATCH] link.2: POSIX.1 does not, in fact, mandate file1 to not be a directory
On Wed, Jul 17, 2024 at 03:58:53PM -0600, Theo de Raadt wrote: > Your advice is poor. Cool reply to "you're lying about the standard in your manual, here's standard quotes that prove this". Also, what advice? > If people write code which tries to do this behaviour, it will not > just fail on OpenBSD. Sure. It will fail on many other systems as well, but not on all of them. > It is not an operating system detail. Rather, it is a filesystem detail. This is an outright lie. Again. Unless you mean to tell me that this doesn't return -EPERM if the source is a directory, even /before/ it hits the VFS link() callback? https://github.com/openbsd/src/commit/6cb92a3c9e9a3bfd60629a34e900e1c88285e838#diff-e63ba21e5c15a2393d15d40b62577519d8286cba7b5878259c52844869675623L1720 https://github.com/openbsd/src/blob/de9520ece7231f124544220ac8fb819bb56aa877/sys/kern/vfs_syscalls.c#L1715 > How many filesystems is that? The vast majority. Then write that instead of lying about what the standard says. > So, it will fail all over the place on 99% of unix systems. Then write that instead of lying about what the standard says. Also, note that even you didn't say 100%. Wonder what happens if someone believes the lie you have in your manual and then runs their program on a standards-compliant system that's in the 1% :/ Also also, this /used to/ be able to happen on OpenBSD if you had an NFS mount. > So should someone try to wrote any userland code which plays with this? > No. Because if they do, they also need an alternative of meeting their > goals. It is clear they should always use an alternative means of > doing so. What in god's name are you smoking, my guy? What alternative means? Achieving what? Userland code that plays with what? Linking files? Yeah, userland code should be "playing with" linking when using link(2), and it should understand that that link(2) may actually do something instead of failing if the source is a directory. > Frankly, your proposal is not serious. cool response. lovely talk. this explains a lot about openbsd, too me. > It is trying to encourage useless > flexibility where it is dangerous and unneccessary. Well, personally I was trying to make your manual not lie to the user in a dangerous and unneccessary manner but I see the OpenBSD stance is that the more lying the better it is actually. So. > The words are fine. lol
[PATCH] link.2: POSIX.1 does not, in fact, mandate file1 to not be a directory
[PATCH] link.2: POSIX.1 does not, in fact, mandate file1 to not be a directory
[PATCH] link.2: POSIX.1 does not, in fact, mandate file1 to not be a directory
[PATCH] link.2: POSIX.1 does not, in fact, mandate file1 to not be a directory