The branch stable/13 has been updated by kib:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=e8b0f76b613033298b07570391b5885346f358d7

commit e8b0f76b613033298b07570391b5885346f358d7
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2021-02-28 23:59:12 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2021-03-04 19:11:15 +0000

    O_RELATIVE_BENEATH: return ENOTCAPABLE instead of EINVAL for abs path
    
    (cherry picked from commit 28cd3a673e0e32b009fd573764956b280d1affe1)
---
 sys/kern/vfs_lookup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index b4280f85c5b6..e881e8f909a4 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -405,7 +405,7 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, 
struct pwd **pwdp)
        }
        if (error == 0 && (cnp->cn_flags & RBENEATH) != 0) {
                if (cnp->cn_pnbuf[0] == '/') {
-                       error = EINVAL;
+                       error = ENOTCAPABLE;
                } else if ((ndp->ni_lcf & NI_LCF_STRICTRELATIVE) == 0) {
                        ndp->ni_lcf |= NI_LCF_STRICTRELATIVE |
                            NI_LCF_CAP_DOTDOT;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to