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

prevent System.exit() calls #409

Merged
merged 1 commit into from Oct 1, 2018
Merged

prevent System.exit() calls #409

merged 1 commit into from Oct 1, 2018

Conversation

kaikreuzer
Copy link
Member

This PR prevents openHAB from being shut down by System.exit() calls as long as the core bundle is started (we obviously do not want to prevent the container from ever shutting down).

This is specifically meant as a workaround for eclipse-archived/smarthome#6291, but
makes the server in general more robust wrt malicious third party code.

Signed-off-by: Kai Kreuzer kai@openhab.org

Signed-off-by: Kai Kreuzer <kai@openhab.org>
Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this annoying problem!
I gave it a brief test with a local build and it worked as expected.
The Karaf shutdown command also still works.

@wborn wborn merged commit d3ffb2d into openhab:master Oct 1, 2018
@kaikreuzer kaikreuzer deleted the sysexit branch October 14, 2018 21:59
@martinvw martinvw added this to the 2.4 milestone Dec 9, 2018
wborn added a commit to wborn/openhab-core that referenced this pull request Apr 17, 2019
Xtext 2.17 allows for configuring the LanguageServer exit behavior so the SecurityManager workaround can be removed.

Fixes: eclipse-archived/smarthome#6291
Undos: openhab#409

See also:
* "Configurable Server Exit Behavior" in the Xtext 2.16.0 release notes:
  https://www.eclipse.org/Xtext/releasenotes.html#/releasenotes/2018/12/04/version-2-16-0
* eclipse/xtext-core#885

Signed-off-by: Wouter Born <github@maindrain.net>
maggu2810 pushed a commit that referenced this pull request Apr 17, 2019
Xtext 2.17 allows for configuring the LanguageServer exit behavior so the SecurityManager workaround can be removed.

Fixes: eclipse-archived/smarthome#6291
Undos: #409

See also:
* "Configurable Server Exit Behavior" in the Xtext 2.16.0 release notes:
  https://www.eclipse.org/Xtext/releasenotes.html#/releasenotes/2018/12/04/version-2-16-0
* eclipse/xtext-core#885

Signed-off-by: Wouter Born <github@maindrain.net>
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 11, 2023
Signed-off-by: Kai Kreuzer <kai@openhab.org>
GitOrigin-RevId: d3ffb2d
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 11, 2023
Xtext 2.17 allows for configuring the LanguageServer exit behavior so the SecurityManager workaround can be removed.

Fixes: eclipse-archived/smarthome#6291
Undos: openhab#409

See also:
* "Configurable Server Exit Behavior" in the Xtext 2.16.0 release notes:
  https://www.eclipse.org/Xtext/releasenotes.html#/releasenotes/2018/12/04/version-2-16-0
* eclipse/xtext-core#885

Signed-off-by: Wouter Born <github@maindrain.net>
GitOrigin-RevId: fb972f3
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

Successfully merging this pull request may close these issues.

None yet

3 participants