diff options
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/cloud-init.postinst | 17 |
2 files changed, 19 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 8f56f528..3a14c22d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,6 @@ cloud-init (21.1-19-gbad84ad4-0ubuntu1~16.04.1) UNRELEASED; urgency=medium + * d/cloud-init.postinst: Change output log permissions on upgrade + (LP: #1918303) * d/cloud-init.manpages: include upstream manpages in package (LP: #1908548) * drop the following cherry-picks now included: + cpick-4f62ae8d-Fix-regression-with-handling-of-IMDS-ssh-keys-760 diff --git a/debian/cloud-init.postinst b/debian/cloud-init.postinst index 9dd506dc..69f53c0c 100644 --- a/debian/cloud-init.postinst +++ b/debian/cloud-init.postinst @@ -318,6 +318,22 @@ fix_lp1889555() { db_set grub-pc/install_devices_empty "false" } +change_cloud_init_output_log_permissions() { + # As a consequence of LP: #1918303 + local oldver="$1" last_bad_ver="20.4.1-0ubuntu1~16.04.1" + dpkg --compare-versions "$oldver" le-nl "$last_bad_ver" || return 0 + + output_file="/var/log/cloud-init-output.log" + if [ -f "$output_file" ]; then + if getent group adm > /dev/null; then + chown root:adm $output_file + else + chown root $output_file + fi + chmod 640 $output_file + fi +} + if [ "$1" = "configure" ]; then # disable ureadahead (LP: #499520) @@ -351,6 +367,7 @@ EOF fix_azure_upgrade_1611074 "$2" fix_lp1889555 "$2" + change_cloud_init_output_log_permissions "$2" fi #DEBHELPER# |