Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 179448 Details for
Bug 323347
jmxPermissions.vbs sets no permissions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
cacls replacement for the VB script
Removed-VisualBasic-script-and-replaced-it-with-command-line-utilities.patch (text/plain), 4.08 KB, created by
Hristo Iliev
on 2010-09-23 07:46:40 EDT
(
hide
)
Description:
cacls replacement for the VB script
Filename:
MIME Type:
Creator:
Hristo Iliev
Created:
2010-09-23 07:46:40 EDT
Size:
4.08 KB
patch
obsolete
>From 97dedfe9ac54c37eb8b95a869e5bcdd8334d8af3 Mon Sep 17 00:00:00 2001 >From: Hristo Iliev <hristo.iliev@sap.com> >Date: Thu, 23 Sep 2010 14:17:37 +0300 >Subject: [PATCH] Removed VisualBasic script and replaced it with command line utilities > >--- > build-kernel/bin/dmk.bat | 9 +--- > build-kernel/bin/jmxPermissions.vbs | 70 ----------------------------------- > 2 files changed, 2 insertions(+), 77 deletions(-) > delete mode 100644 build-kernel/bin/jmxPermissions.vbs > >diff --git a/build-kernel/bin/dmk.bat b/build-kernel/bin/dmk.bat >index 108ed05..421fe17 100755 >--- a/build-kernel/bin/dmk.bat >+++ b/build-kernel/bin/dmk.bat >@@ -49,12 +49,6 @@ rem ------------------------------ > shift > rem The shift must be here :() > >- rem Check further file that needs to exist >- for %%I in ("%KERNEL_HOME%\bin\jmxPermissions.vbs") do if not exist "%%~I" ( >- echo File "%%~I" does not exist but is required to continue. >- exit /B 1 >- ) >- > rem Set defaults > set CONFIG_DIR=%KERNEL_HOME%\config > set CLEAN_FLAG= >@@ -125,7 +119,8 @@ rem ------------------------------ > > > rem Adjust permissions if necessary >- cscript //NoLogo "%KERNEL_HOME%\bin\jmxPermissions.vbs" "%CONFIG_DIR%\" >+ takeown /F "%CONFIG_DIR%\org.eclipse.virgo.kernel.jmxremote.access.properties" > nul >+ echo Y| cacls "%CONFIG_DIR%\org.eclipse.virgo.kernel.jmxremote.access.properties" /G "%USERDOMAIN%\%USERNAME%":F > nul > > rem Adjust options now all are known > if "%KEYSTORE_PATH%"=="" set KEYSTORE_PATH=%CONFIG_DIR%\keystore >diff --git a/build-kernel/bin/jmxPermissions.vbs b/build-kernel/bin/jmxPermissions.vbs >deleted file mode 100644 >index c50031b..0000000 >--- a/build-kernel/bin/jmxPermissions.vbs >+++ /dev/null >@@ -1,70 +0,0 @@ >-configFolder = Wscript.Arguments.Item(0) >- >-'WScript.Echo "Fixing permissions on " & configFolder >- >-Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") 'Load up WMI with the right dll >- >-Dim files(0) >-files(0) = "org.eclipse.virgo.kernel.jmxremote.access.properties" >- >-For Each file In files >- updateInheritance(configFolder & file) >- updateOwnership(configFolder & file) >- updatePermissions(configFolder & file) >-Next >- >-Sub updateInheritance(file) >- 'WScript.Echo "Updating inheritance of " & file >- >- Const SE_DACL_PRESENT = 4 >- Const SE_DACL_PROTECTED = 4096 >- Const SE_SELF_RELATIVE = 32768 >- >- Set objFileSecSetting = objWMIService.Get("Win32_LogicalFileSecuritySetting.Path='" & file & "'") >- objFileSecSetting.GetSecurityDescriptor objSecurityDescriptor >- >- objSecurityDescriptor.ControlFlags = SE_DACL_PRESENT + SE_DACL_PROTECTED + SE_SELF_RELATIVE >- >- Set objMethod = objFileSecSetting.Methods_("SetSecurityDescriptor") >- Set objInParam = objMethod.inParameters.SpawnInstance_() >- objInParam.Properties_.item("Descriptor") = objSecurityDescriptor >- objFileSecSetting.ExecMethod_ "SetSecurityDescriptor", objInParam >- >- 'WScript.Echo "Updated inheritance of " & file >-End Sub >- >-Sub updateOwnership(file) >- 'WScript.Echo "Updating ownership of " & file >- Set objDataFile = objWMIService.Get("CIM_DataFile.Name='" & file & "'") >- >- Set objMethod = objDataFile.Methods_("TakeOwnerShipEx") >- Set objInParam = objMethod.inParameters.SpawnInstance_() >- >- objDataFile.ExecMethod_ "TakeOwnerShipEx", objInParam >- >- 'WScript.Echo "Updated ownership of " & file >-End Sub >- >-Sub updatePermissions(file) >- 'WScript.Echo "Updating permissions of " & file >- >- Set objFileSecSetting = objWMIService.Get("Win32_LogicalFileSecuritySetting.Path='" & file & "'") >- objFileSecSetting.GetSecurityDescriptor objSecurityDescriptor >- >- Set WshNetwork = WScript.CreateObject("WScript.Network") >- Dim specificAce(0) >- For Each ace in objSecurityDescriptor.DACL >- If ace.Trustee.Name = WshNetwork.UserName Then >- Set specificAce(0) = ace >- End If >- Next >- >- objSecurityDescriptor.DACL = specificAce >- >- Set objMethod = objFileSecSetting.Methods_("SetSecurityDescriptor") >- Set objInParam = objMethod.inParameters.SpawnInstance_() >- objInParam.Properties_.item("Descriptor") = objSecurityDescriptor >- objFileSecSetting.ExecMethod_ "SetSecurityDescriptor", objInParam >- >- 'WScript.Echo "Updated permissions of " & file >-End Sub >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 323347
:
179447
|
179448