~sircmpwn/hare-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
5 3

[PATCH hare] os+linux: Fix resolve_flag values

Details
Message ID
<20240403124456.9978-1-yyp@disroot.org>
DKIM signature
pass
Download raw message
Patch: +6 -6
Signed-off-by: Alexey Yerin <yyp@disroot.org>
---
 os/+linux/dirfdfs.ha | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/os/+linux/dirfdfs.ha b/os/+linux/dirfdfs.ha
index 8ed155d8..538a4399 100644
--- a/os/+linux/dirfdfs.ha
+++ b/os/+linux/dirfdfs.ha
@@ -17,27 +17,27 @@ use types::c;
//
// Note that on Linux, specifying BENEATH or IN_ROOT will also disable magic
// symlinks.
export type resolve_flag = enum {
	NORMAL,
export type resolve_flag = enum uint {
	NORMAL = 0,

	// Does not allow symlink resolution to occur for any symlinks which
	// would refer to any anscestor of the fd directory. This disables all
	// absolute symlinks, and any call to open or create with an absolute
	// path.
	BENEATH,
	BENEATH = 1 << 0,

	// Treat the directory fd as the root directory. This affects
	// open/create for absolute paths, as well as absolute path resolution
	// of symlinks. The effects are similar to chroot.
	IN_ROOT,
	IN_ROOT = 1 << 1,

	// Disables symlink resolution entirely.
	NO_SYMLINKS,
	NO_SYMLINKS = 1 << 2,

	// Disallows traversal of mountpoints during path resolution. This is
	// not recommended for general use, as bind mounts are extensively used
	// on many systems.
	NO_XDEV,
	NO_XDEV = 1 << 3,
};

type os_filesystem = struct {
-- 
2.44.0

[hare/patches] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<D0AHXV51PBFK.2HVXNIYLYBM1G@fra01>
In-Reply-To
<20240403124456.9978-1-yyp@disroot.org> (view parent)
DKIM signature
missing
Download raw message
hare/patches: SUCCESS in 1m0s

[os+linux: Fix resolve_flag values][0] from [Alexey Yerin][1]

[0]: https://lists.sr.ht/~sircmpwn/hare-dev/patches/50705
[1]: yyp@disroot.org

✓ #1186080 SUCCESS hare/patches/freebsd.yml https://builds.sr.ht/~sircmpwn/job/1186080
✓ #1186081 SUCCESS hare/patches/openbsd.yml https://builds.sr.ht/~sircmpwn/job/1186081
✓ #1186079 SUCCESS hare/patches/alpine.yml  https://builds.sr.ht/~sircmpwn/job/1186079
Details
Message ID
<D0IDHINRDGZ4.2F275KKWB26PM@turminal.net>
In-Reply-To
<20240403124456.9978-1-yyp@disroot.org> (view parent)
DKIM signature
pass
Download raw message
Should these values match the values defined in linux/openat2.h?
I can see arguments against making them match, but then we should document
that in the definition of this type.
Details
Message ID
<D0IDJDTTTUCN.18SO3IJ1MGLRI@disroot.org>
In-Reply-To
<D0IDHINRDGZ4.2F275KKWB26PM@turminal.net> (view parent)
DKIM signature
pass
Download raw message
On Fri Apr 12, 2024 at 20:57 +0200, Bor Grošelj Simić wrote:
> Should these values match the values defined in linux/openat2.h?
> I can see arguments against making them match, but then we should document
> that in the definition of this type.


Those flags are converted to Linux-specific flags in _fs_open so they don't
have to match.
Details
Message ID
<D0IEN2OA3RTV.WQNRGM85WWSK@turminal.net>
In-Reply-To
<D0IDJDTTTUCN.18SO3IJ1MGLRI@disroot.org> (view parent)
DKIM signature
pass
Download raw message
On Fri Apr 12, 2024 at 9:00 PM CEST, Alexey Yerin wrote:
> On Fri Apr 12, 2024 at 20:57 +0200, Bor Grošelj Simić wrote:
> > Should these values match the values defined in linux/openat2.h?
> > I can see arguments against making them match, but then we should document
> > that in the definition of this type.
>
>
> Those flags are converted to Linux-specific flags in _fs_open so they don't
> have to match.

Yeah, I'm just asking you to document that, if you believe it is the correct
way.
Details
Message ID
<D0IF3NPRCAMV.3KITCGHPZ1R67@disroot.org>
In-Reply-To
<D0IEN2OA3RTV.WQNRGM85WWSK@turminal.net> (view parent)
DKIM signature
pass
Download raw message
On Fri Apr 12, 2024 at 21:52 +0200, Bor Grošelj Simić wrote:
> On Fri Apr 12, 2024 at 9:00 PM CEST, Alexey Yerin wrote:
> > On Fri Apr 12, 2024 at 20:57 +0200, Bor Grošelj Simić wrote:
> > > Should these values match the values defined in linux/openat2.h?
> > > I can see arguments against making them match, but then we should document
> > > that in the definition of this type.
> >
> >
> > Those flags are converted to Linux-specific flags in _fs_open so they don't
> > have to match.
>
> Yeah, I'm just asking you to document that, if you believe it is the correct
> way.

I don't know, honestly. Maybe we should just make resolve_flags match OS flags
after all.
Reply to thread Export thread (mbox)