-
-
Notifications
You must be signed in to change notification settings - Fork 15
Address review comments on libuv patch #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
191cb5e to
5efeb45
Compare
| * we're building, the `SetNamedSecurityInfoW()` function call below will | ||
| * place all DENY entries first, and all `ALLOW` entries second. This |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you mean SetEntriesInAcl, which we should perhaps just avoid due to this (like cygwin)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my initial explorations, if we don't use SetEntriesInAcl, it's a lot more work. We have to manually merge entries and such that I would much prefer not to do. The Cygwin function to do this is many hundreds of lines of code; not counting their ACL datatype abstraction. I don't actually care about this case (others with more permissions than group) very much, so I'm alright with just not supporting it and doing something less-broken than before.
|
Does this solve issues like the following: |
|
bump |
1 similar comment
|
bump |
5efeb45 to
9759885
Compare
|
With the latest commit on windows: mktempdir() do dir
foo = joinpath(dir, "foo")
@info("default")
touch(foo)
run(`icacls $(foo)`)
for perm in (0o777, 0o757, 0o750, 0o600)
@info(string(perm, base=8))
chmod(foo, perm)
run(`icacls $(foo)`)
@show Sys.isexecutable(foo)
end
endResults in: Which I think all looks good to me. I also added some mktempdir() do dir
foo = joinpath(dir, "foo")
@info("default")
touch(foo)
run(`icacls $(foo)`)
@info("NULL")
run(`icacls $(foo) /inheritance:d`)
run(`icacls $(foo) /remove "NT AUTHORITY\\SYSTEM"`)
run(`icacls $(foo) /remove BUILTIN\\Administrators`)
run(`icacls $(foo) /remove Administrator`)
run(`icacls $(foo)`)
for perm in (0o777, 0o757, 0o750, 0o600)
@info(string(perm, base=8))
chmod(foo, perm)
run(`icacls $(foo)`)
@show Sys.isexecutable(foo)
end
end |
|
CI is unhappy with this currently: |
|
we can merge once CI passes |
|
I can't tell if CI is passing 😅 |
|
Fair point, but let's say at least "builds" even if it does not then pass all tests |
|
It does build on our windows CI machines, which is where I tested it. What build status should I pay attention to here that says it doesn't build? |
|
The console here for GitHub actions splits up the jobs by stage. FWIW, it is an MSVC thing, probably where the definitions are supposed to have a leading |
b0b7947 to
7718e99
Compare
|
I tried using |
|
still failing CI |
|
Hmmm, should I |
|
yep |
|
bump? |
No longer shy away from using `AccessCheck()` for simple `W_OK`/`R_OK` checks; use it for all calls unconditionally.
Because our ACL implementation does not have the required flexibility to represent situations such as `0o757` due to the permissions ordering that Windows naturally applies, we simply do not allow the `other` entity to have permissions that the `group` entity does not have. This causes `chmod(0o757)` to be transparently mapped to `chmod(0o755)`, as an example.
Previously, we would apply permissions only to groups that we were a part of, but we should apply our "other" permissions to groups that we are not a part of.
It's not needed to use `mode_t` here, and it just confuses VS.
7718e99 to
4f92483
Compare
|
bump? |
1 similar comment
|
bump? |
|
What more needs to be done here? I |
|
I was hoping you could tell me 😅. Is it ready? |
|
Closed by #41 |
This hopefully addresses the two actionable comments from
@erw7. In particular:We use
AccessCheck()unconditionally on duringaccess().I don't allow
otherto have more permissions thangroup. This is necessary because in cases likechmod("foo", 0o757), theDENYentry forgroup(necessary becauseotherhas more permissions thangroup) ends up blocking the user, due to the fact thatuserbelongs togroup. So I just mask out any bits thatotherhas thatgroupdoesn't, so0o757turns into0o755. You can still have0o057, or0o700or whatever, it's just the case whereotherhas bits thatgroupdoesn't that gets fixed up.