mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +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
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 New Issue
Block a user