mirror of
https://github.com/gravitational/teleport.git
synced 2026-09-19 01:58:44 +08:00
Prior to this patch `tctl` would create new AWS config files with filemode `0666` globally readable). In most cases this is not a security issue as Teleport would create the file's destinaton directory with `0700` (only readable by the owner). This becomes an issue in the rare case where the destination directory already exists AND has weak permissions; in this case the AWS config files may be read by other users on the owner's machine. This change bypasses the ini file library's `SaveTo` method and writes the file with known permissions.