Skip to content
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

Big thank you - permissions suggestion #14

Open
iongion opened this issue Oct 3, 2024 · 0 comments
Open

Big thank you - permissions suggestion #14

iongion opened this issue Oct 3, 2024 · 0 comments

Comments

@iongion
Copy link

iongion commented Oct 3, 2024

Hi, just a huge thank you, I think I will embed it in https://container-desktop.com

Being struggling with this problem for the last few weeks in golang in a project that tries to achieve to do what yours is doing (https://github.com/iongion/container-desktop-wsl-relay), but only for WSL unix sockets. I am failing, mine is not working yet. I wanted golang so that it is a small self-contained binary that is easy to ship in the app itself, although not at al expert in it.

One suggestion is for you to add support for ACLs permissions over the named pipe, through a parameter/expression.

// AllowEveryone grants full access permissions for everyone.
AllowEveryone = "S:(ML;;NW;;;LW)D:(A;;0x12019f;;;WD)"
// AllowCurrentUser grants full access permissions for the current user.
AllowCurrentUser = "D:P(A;;GA;;;$SID)"
// AllowServiceSystemAdmin grants full access permissions for Service, System, Administrator group and account.
AllowServiceSystemAdmin = "D:(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;LA)(A;ID;FA;;;LS)"
// Custom String
"anything-let-the-user-decide"

For current user you need to interpolate $SID of current user, in golang I do something like this:

if strings.Contains(securityDescriptor, "$SID") {
	currentUser, err := user.Current()
	if err != nil {
		log.Println("Relay server error retrieving current user:", err)
		return
	}
	securityDescriptor = strings.Replace(securityDescriptor, "$SID", currentUser.Uid, 1)
}

I only need to support Windows 10+ onwards, do you think it is safe to distribute the smaller .net binary and not the one with the runtime included ?

I have created 2 PRs, do what you want with them of course

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant