summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-05-04 06:20:26 +0000
committerGitHub <noreply@github.com>2021-05-04 06:20:26 +0000
commit77c79724e396a11fcd61fbac931f64f7b99e2712 (patch)
tree7f31046839dfa34b7c68c504b3cc6fc4a3144a14 /nixos
parent456c63ebc00b24b9259b0aa0e45bbd5b270a701e (diff)
parent7c372af9bd26cecdb946d4833bfcdaf9db334c80 (diff)
downloadnixpkgs-77c79724e396a11fcd61fbac931f64f7b99e2712.tar
nixpkgs-77c79724e396a11fcd61fbac931f64f7b99e2712.tar.gz
nixpkgs-77c79724e396a11fcd61fbac931f64f7b99e2712.tar.bz2
nixpkgs-77c79724e396a11fcd61fbac931f64f7b99e2712.tar.lz
nixpkgs-77c79724e396a11fcd61fbac931f64f7b99e2712.tar.xz
nixpkgs-77c79724e396a11fcd61fbac931f64f7b99e2712.tar.zst
nixpkgs-77c79724e396a11fcd61fbac931f64f7b99e2712.zip
Merge staging-next into staging
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/virtualisation/ec2-metadata-fetcher.nix2
-rw-r--r--nixos/modules/virtualisation/openstack-metadata-fetcher.nix2
2 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/virtualisation/ec2-metadata-fetcher.nix b/nixos/modules/virtualisation/ec2-metadata-fetcher.nix
index dca5c2abd4e..760f024f33f 100644
--- a/nixos/modules/virtualisation/ec2-metadata-fetcher.nix
+++ b/nixos/modules/virtualisation/ec2-metadata-fetcher.nix
@@ -71,7 +71,7 @@
   }
 
   wget_imds -O "$metaDir/ami-manifest-path" http://169.254.169.254/1.0/meta-data/ami-manifest-path
-  wget_imds -O "$metaDir/user-data" http://169.254.169.254/1.0/user-data && chmod 600 "$metaDir/user-data"
+  (umask 077 && wget_imds -O "$metaDir/user-data" http://169.254.169.254/1.0/user-data)
   wget_imds -O "$metaDir/hostname" http://169.254.169.254/1.0/meta-data/hostname
   wget_imds -O "$metaDir/public-keys-0-openssh-key" http://169.254.169.254/1.0/meta-data/public-keys/0/openssh-key
 ''
diff --git a/nixos/modules/virtualisation/openstack-metadata-fetcher.nix b/nixos/modules/virtualisation/openstack-metadata-fetcher.nix
index 8c191397cf9..133cd4c0e9f 100644
--- a/nixos/modules/virtualisation/openstack-metadata-fetcher.nix
+++ b/nixos/modules/virtualisation/openstack-metadata-fetcher.nix
@@ -15,7 +15,7 @@
   }
 
   wget_imds -O "$metaDir/ami-manifest-path" http://169.254.169.254/1.0/meta-data/ami-manifest-path
-  wget_imds -O "$metaDir/user-data" http://169.254.169.254/1.0/user-data && chmod 600 "$metaDir/user-data"
+  (umask 077 && wget_imds -O "$metaDir/user-data" http://169.254.169.254/1.0/user-data)
   wget_imds -O "$metaDir/hostname" http://169.254.169.254/1.0/meta-data/hostname
   wget_imds -O "$metaDir/public-keys-0-openssh-key" http://169.254.169.254/1.0/meta-data/public-keys/0/openssh-key
 ''