mirror of
https://github.com/fleetdm/fleet
synced 2026-05-05 22:39:17 +00:00
Use Group SID on fleetctl on Windows (#7854)
This is intended to allow packages to be built on localizations other than English. See #5065. Co-authored-by: Lucas Rodriguez <lucas@fleetdm.com>
This commit is contained in:
parent
cde973293b
commit
bdad9ac1d3
2 changed files with 8 additions and 3 deletions
1
changes/5065-fleetctl-package-language
Normal file
1
changes/5065-fleetctl-package-language
Normal file
|
|
@ -0,0 +1 @@
|
|||
* Fix an error generating Windows packages with `fleetctl package` on non-English localizations of Windows.
|
||||
|
|
@ -92,9 +92,13 @@ func BuildMSI(opt Options) (string, error) {
|
|||
}
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
// Explicitly grant read access, otherwise within the Docker container there are permissions
|
||||
// errors.
|
||||
out, err := exec.Command("icacls", tmpDir, "/grant", "everyone:R", "/t").CombinedOutput()
|
||||
// Explicitly grant read access, otherwise within the Docker
|
||||
// container there are permissions errors.
|
||||
// "S-1-1-0" is the SID for the World/Everyone group
|
||||
// (a group that includes all users).
|
||||
out, err := exec.Command(
|
||||
"icacls", tmpDir, "/grant", "*S-1-1-0:R", "/t",
|
||||
).CombinedOutput()
|
||||
if err != nil {
|
||||
fmt.Println(string(out))
|
||||
return "", fmt.Errorf("icacls: %w", err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue