Skip to content
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

Fix apparmor config. #864

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix apparmor config. #864

wants to merge 1 commit into from

Conversation

rumpeltux
Copy link

Related bugs:

src/config-ini.c still looks for $HOME/.config/redshift.conf which
fails to open because the apparmor profile doesn’t allow it.

src/config-ini.c also does this:

   struct passwd *pwd = getpwuid(getuid());
   char *home = pwd->pw_dir;

Since getpwuid doesn’t have access to /etc/passwd* it returns NULL,
causing a segmentation fault in the line thereafter.
This code is not triggered if a config is specified (e.g.
-c redshift.conf) or $HOME/.config/redshift.conf exists.

Related bugs:
 * https://bugzilla.suse.com/show_bug.cgi?id=1111906
 * https://bugs.debian.org/988068
 * jonls#672
 * jonls#860

src/config-ini.c still looks for $HOME/.config/redshift.conf which
fails to open because the apparmor profile doesn’t allow it.

src/config-ini.c also does this:
   struct passwd *pwd = getpwuid(getuid());
   char *home = pwd->pw_dir;

Since getpwuid doesn’t have access to /etc/passwd* it returns NULL,
causing a segmentation fault in the line thereafter.
This code is not triggered if a config is specified (e.g.
-c redshift.conf) or $HOME/.config/redshift.conf exists.
@CameronNemo
Copy link
Contributor

CameronNemo commented Jul 6, 2022

I will remind everyone at Debian that Gammastep is a fork of Redshift that is maintained and accepting pull requests. It still supports all of the FOSS backends that Redshift supports (only Windows and macOS support were removed, not X or DRM; Wayland support was added).

You may also find this fix, that has been included in gammastep for over 2 years, helpful:

https://gitlab.com/chinstrap/gammastep/-/commit/9db19f5ccfad20ab7b501daedcfd5ef137860dd2

Gammastep in Debian could use an update, from 2.0.2 to 2.0.9. There have been some relevant fixes since the last version was uploaded to Sid. https://gitlab.com/chinstrap/gammastep/-/blob/master/NEWS.md

@NeatNit NeatNit mentioned this pull request Feb 14, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants