Skip to content

Commit fcd9b71

Browse files
authored
Merge pull request #798 from devagupt/3.0
Reverting changes in hubble windows config permissions.
2 parents c80dcba + 5b97d8e commit fcd9b71

File tree

3 files changed

+17
-54
lines changed

3 files changed

+17
-54
lines changed

pkg/windows/dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ CMD powershell.exe -Command Push-Location C:/temp/hubble; \
8787
If (Test-Path C:/data/hubble.conf) {Copy-Item C:/data/hubble.conf -Destination ./hubble/dist/hubble/etc/hubble/ -Force}; \
8888
If (Test-Path C:/data/opt) {Copy-Item C:/data/opt -Destination './hubble/dist/hubble/' -Recurse -Force}; \
8989
Move-Item 'C:/temp/hubble/pkg/windows/osqueryd_safe_permissions.ps1' -Destination './hubble/dist/hubble/' -Force; \
90-
Move-Item 'C:/temp/hubble/pkg/windows/hubble_config_permissions.ps1' -Destination './hubble/dist/hubble/' -Force; \
9190
Move-Item 'C:/temp/hubble/pkg/windows/prerequisites.ps1' -Destination './hubble/dist/hubble/' -Force; \
9291
#Build the installer
9392
Push-Location 'C:/Program Files (x86)/NSIS'; \

pkg/windows/hubble-Setup.nsi

+17-18
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@
4646
;Name and File
4747
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
4848
OutFile "Hubble-${PRODUCT_VERSION}-Setup.exe"
49-
49+
5050
;Default Installation folder
5151
InstallDir "C:\${PFILES}\Hubble"
52-
52+
5353
;Get installation folder from registry if available
5454
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
5555
ShowInstDetails show
5656
ShowUnInstDetails show
57-
57+
5858
;Request application privileges for Windows Vista
5959
RequestExecutionLevel highest
6060

@@ -136,7 +136,7 @@
136136

137137
${NSD_CreateText} 0 43u 100% 12u $IndexName_State
138138
Pop $IndexName
139-
139+
140140
${NSD_CreateLabel} 0 60u 100% 12u "Indexer:"
141141
Pop $Label
142142

@@ -146,7 +146,7 @@
146146
nsDialogs::Show
147147

148148
FunctionEnd
149-
149+
150150
Function pageHubbleConfig_Leave
151151

152152
${NSD_GetText} $HECToken $HECToken_State
@@ -172,7 +172,7 @@
172172
SetCtlColors $CheckBox_Hubble_Start "" "ffffff"
173173
# This command required to bring the checkbox to the front
174174
System::Call "User32::SetWindowPos(i, i, i, i, i, i, i) b ($CheckBox_Hubble_Start, ${HWND_TOP}, 0, 0, 0, 0, ${SWP_NOSIZE}|${SWP_NOMOVE})"
175-
175+
176176
# Create Start Hubble Delayed Checkbox
177177
${NSD_CreateCheckbox} 130u 102u 100% 12u "&Delayed Start"
178178
Pop $CheckBox_Hubble_Start_Delayed
@@ -241,13 +241,13 @@
241241
Section "MainSection" SEC01
242242

243243
SetOutPath "$INSTDIR\"
244-
SetOverwrite ifdiff
244+
SetOverwrite ifdiff
245245
CreateDirectory $INSTDIR\var
246246
CreateDirectory $INSTDIR\etc\hubble\hubble.d
247247
File /r "..\..\dist\hubble\"
248248

249249
SectionEnd
250-
250+
251251
Section -Post
252252

253253
WriteUninstaller "$INSTDIR\uninst.exe"
@@ -287,21 +287,20 @@
287287

288288
ExecWait 'powershell -ExecutionPolicy Bypass -WindowStyle Hidden -File .\prerequisites.ps1 "$INSTDIR" -FFFeatureOff'
289289
ExecWait 'powershell -ExecutionPolicy Bypass -WindowStyle Hidden -File .\osqueryd_safe_permissions.ps1 "$INSTDIR" -FFFeatureOff'
290-
ExecWait 'powershell -ExecutionPolicy Bypass -WindowStyle Hidden -File .\hubble_config_permissions.ps1 "$INSTDIR" -FFFeatureOff'
291290
RMDir /R "$INSTDIR\var\cache" ; removing cache from old version
292291

293292
${if} $HECToken_State != "xxxxx-xxx-xxx-xxx-xxxxxx"
294293
${AndIf} $HECToken_State != ""
295294
Call makeUserConfig
296295
${endif}
297-
296+
298297
Push "C:\${PFILES}\Hubble"
299298
Call AddToPath
300299

301300
Delete "$INSTDIR\vcredist.exe"
302301

303302
SectionEnd
304-
303+
305304
Section Uninstall
306305

307306
Call un.uninstallHubble
@@ -388,7 +387,7 @@
388387
"$(^Name) was successfully removed from your computer." \
389388
/SD IDOK
390389
FunctionEnd
391-
390+
392391

393392
;--------------------------------
394393
;functions
@@ -447,7 +446,7 @@
447446
skipUninstall:
448447

449448
FunctionEnd
450-
449+
451450
Function .onInstSuccess
452451

453452
; If StartHubbleDelayed is 1, then set the service to start delayed
@@ -461,7 +460,7 @@
461460
${EndIf}
462461

463462
FunctionEnd
464-
463+
465464
;--------------------------------
466465
;Helper Functions Section
467466

@@ -707,11 +706,11 @@
707706
!macroend
708707
!insertmacro RemoveFromPath ""
709708
!insertmacro RemoveFromPath "un."
710-
709+
711710
;--------------------------------
712711
;Specialty Fuctions
713712
Function makeUserConfig
714-
713+
715714
confFind:
716715
IfFileExists "$INSTDIR\etc\hubble\hubble.d\user.conf" confFound confNotFound
717716

@@ -726,7 +725,7 @@
726725
goto confFind
727726

728727
confLoop:
729-
728+
730729
FileWrite $9 "hubblestack:$\r$\n"
731730
FileWrite $9 " returner:$\r$\n"
732731
FileWrite $9 " splunk:$\r$\n"
@@ -790,7 +789,7 @@ Function parseCommandLineSwitches
790789
${ElseIf} $IndexName_State == ""
791790
StrCpy $IndexName_State "index"
792791
${EndIf}
793-
792+
794793
# Hubble Config: Indexer
795794
${GetOptions} $R0 "/indexer=" $R1
796795
${IfNot} $R1 == ""

pkg/windows/hubble_config_permissions.ps1

-35
This file was deleted.

0 commit comments

Comments
 (0)