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

SBIE1241 Cannot mount registry hive #50

Closed
Lumute opened this issue Jun 12, 2020 · 5 comments
Closed

SBIE1241 Cannot mount registry hive #50

Lumute opened this issue Jun 12, 2020 · 5 comments
Labels
Feature request New feature or idea

Comments

@Lumute
Copy link

Lumute commented Jun 12, 2020

Hi all,

I'm new to Sandboxie and trying to use it to sanbdbox an application in a terminal server, sorry if this is a dumb question...

I built the sandbox, configured it, tested and everything was fine until 2 users were logged in at the same time and tried to use the same sandboxed application, the second user gets the "SBIE1241 Cannot mount registry hive" error.

Does this mean that a sandbox can only be used by one user at a time? is there any workaround for this? will I need to duplicate the sandbox for every user to avoid this problem?

Thanks!

@Lumute
Copy link
Author

Lumute commented Jun 12, 2020

Ok, I think I figured out a solution for this, indeed seems lime multiple users using the same sandbox is not suppoterd.

I was saving all sandboxes to a common path for all users. Putting the %USER% variable back in the FileRootPath makes it create create a separate instances of the same sandbox configuration for each user. That solves one problem but the next is that I prep each sandbox by installing one or more applications so when another user runs that sandbox a blank one is created, mmm...

I fixed this with a logon script that duplicates my user sandboxes in the right folders for each user that logs in, which brings me to the following suggestion which I think should be fairly simple to implement:

Would it be possible to add a Sandbox Setting called something like TemplateSandboxPath with a path to another sandbox, so when you start a sandbox, if Sandboxie detects it does not exists instead of creating a blank one then it copies the one in the TemplateSandboxPath instead of creating a blank one. If that path is invalid or not a sandbox the create the blank one as it does now...

I think this would be really useful.

BTW, it is amazing to see the community picking up on this code and now being open source. I would love to help and although I don't have much time I would be happy to add something like what I just suggested above... is the project open to other contributors? what would be the process to do this? or if not, is there a way to at least make a donation?

@DavidXanatos DavidXanatos added the Feature request New feature or idea label Jun 18, 2020
@DavidXanatos
Copy link
Member

Yes indeed a sandbox can currently be used by one user,
a feature like suggested could be relatively easily added.
Although it may be worth looking into the possibility of allowing multiple users to use the same sandbox.

I will take a look into it.

You can donate on my homepage https://xanasoft.com (using paypal) or through patreon: https://www.patreon.com/DavidXanatos

@DavidXanatos
Copy link
Member

mmh...

There is the setting KeyRootPath=\REGISTRY\USER\Sandbox_%SANDBOX%
what can be used to specify where to mount the registry file and using it this way changes the behavior such that for all users it will expect the hive to be mounted in the same place.

Unfortunately it sill fails as it than tries to mount the reg file. The expected behavior would be to realize that the file is already mounted and jut use it.

I Will look into how to fix that.

@DavidXanatos
Copy link
Member

hah that was easy... it actually works, you just need to also use
FileRootPath=C:\Sandbox%SANDBOX%
to ensure its expecting the same file path to be mouned

So with this two parameters you can make any sandbox be usable by multiple users.

Cheers
David X.

@DavidXanatos
Copy link
Member

There is one more potential issue... sandboxie uses separated folders fort user data,
having multiple users use the same sandbox will result on their sand boxed files to be mangled together.

You could add open path settigns such that all user files are not sandboxed.

I will add to the next build the option SeparateUserFolders=n that will disable this behavior and just keep the user files under drives/c/users/[username]...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request New feature or idea
Projects
None yet
Development

No branches or pull requests

2 participants