mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
18.28.2007 08d62ab30082bc0feb209c8de443b8ec9a419dd6
refs
author jvergara <jvergara@localhost>
Wednesday, July 18, 2007 23:28 +0200
committer jvergara <jvergara@localhost>
Wednesday, July 18, 2007 23:28 +0200
commit08d62ab30082bc0feb209c8de443b8ec9a419dd6
tree 67d2e8716d218868b3bf2b98f5a10c0d3dd73d71 tree | zip | gz
parent a69c39928f09bdf0370bd97d69e407882e3dfba4 view | diff
Fix for issue 1603 (quickInstall fails to register service on vista)

With the new user access control of Vista, even if we are administrators we are not allowed to do certain operations (such as writing in the service registry) in some circumstances. For instance if we launch net start <service_name> from a normal command prompt this will fail systematically. In order to be able to execute these "privileged" operations we have different alternatives:

Execute the binary that will do the operations using the "Run as Administrator" option in Vista (or launching them from a command prompt that has been started using that same option).
Add a manifest to the binary informing that the binary requires administrator privileges.

The first alternative is one of the workarounds for the bug, however it does not apply to the case of the Java Web Start Installer.

The second alternative is in what consists the bug fix. A new binary has been created. This binary has a manifest informing that it requires administrator privileges. This binary will be used in Vista as a wrapper to call operations that require administrator privileges (modifying the registry in windows-services.bat command line and calling "net start" and "net stop").

If the user is running the setup, the status-panel using the "Run as Administrator" option or is using the command lines from a command prompt launched with that option the behavior in Vista does not change with the behavior in previous versions of Windows.

If the UAC is enabled and the user is not using the "Run as Administrator" options, (s)he will be prompted for confirmation each time the registry is modified and the server is started or stopped as a service. The wrapper is called on any of the individual operations. An alternative would be to call the wrapper when we launch the setup or the status-panel but this generates some issues:
1. This does not work (directly) with the Java Web Start installer.
2. This would force users that are not administrators to provide administrator credentials even to install/run an OpenDS that does not require to do privileged operations (an OpenDS that does not run as a service).
3 files added
16 files modified
580 ■■■■ changed files
opendj-sdk/opends/lib/launcher_administrator.exe diff | view | raw | blame | history
opendj-sdk/opends/lib/opends_service.exe diff | view | raw | blame | history
opendj-sdk/opends/lib/winlauncher.exe diff | view | raw | blame | history
opendj-sdk/opends/resource/bin/_client-script.bat 2 ●●● diff | view | raw | blame | history
opendj-sdk/opends/resource/bin/start-ds.bat 4 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/resource/bin/status-panel.bat 2 ●●● diff | view | raw | blame | history
opendj-sdk/opends/resource/setup.bat 2 ●●● diff | view | raw | blame | history
opendj-sdk/opends/resource/uninstall.bat 2 ●●● diff | view | raw | blame | history
opendj-sdk/opends/src/build-tools/windows/Makefile 20 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/build-tools/windows/README 12 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/build-tools/windows/common.c 12 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/build-tools/windows/launcher_administrator.exe.manifest 16 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/build-tools/windows/opends_service.exe.manifest 16 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/build-tools/windows/service.c 135 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/build-tools/windows/winlauncher.c 130 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/ConfigureWindowsService.java 153 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/StartWindowsService.java 27 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/StopWindowsService.java 27 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/util/SetupUtils.java 20 ●●●●● diff | view | raw | blame | history