-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upstream fix for LP #2040924 #198
upstream fix for LP #2040924 #198
Conversation
/var/lib/landscape-sysinfo.cache to prevent permissions errors when executing update-motd.
debian/landscape-common.postinst
Outdated
|
||
touch $STAMP_LOCATION | ||
chown landscape:root $STAMP_LOCATION | ||
chmod 666 $STAMP_LOCATION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why perms 666
? That's world writable. Didn't you mean 0644
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file is written (or really, replaced) when motd is executed. I'd assumed it would need to be world writable for that to happen. Is that assumption incorrect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The /etc/update-motd.d/50-landscape-sysinfo
script runs as root at login time. Maybe the original bug was misdiagnosed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original bug was related to the show-motd
package, which I think is intended to be executed by non-root users as well, but that's just my interpretation based on the bug report and the description of the package (sic):
This package installs a script in /etc/profile.d that dynamically
generates and shows a message-of-the-day in inteactive shells by
running scripts installed in /etc/update-motd.d.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then why did it start happening just now? Something else changed. But creating a world writable file in /var/lib
is not the solution. The way it is now, any user can write to it, and that will be displayed on login.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why it would suddenly have changed, but I agree with you that permissions would be better off as 0644
here. Changing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to understand what is going on, and why this fix or change is even needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a comment to the original bug: https://bugs.launchpad.net/ubuntu/+source/landscape-client/+bug/2040924/comments/2
If I had the time, I'd go digging myself for the root cause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I troubleshooted it: https://bugs.launchpad.net/ubuntu/+source/landscape-client/+bug/2040924/comments/3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a revert of this change and a fix to https://code.launchpad.net/~mitchburton/ubuntu/+source/landscape-client/+git/landscape-client/+merge/454434
Once that's past review, I will contribute the resulting fix here as well.
Upstreaming fix contributed to ubuntu: https://code.launchpad.net/~mitchburton/ubuntu/+source/landscape-client/+git/landscape-client/+merge/456212
bug: https://bugs.launchpad.net/ubuntu/+source/landscape-client/+bug/2040924