[opensuse] A user writable directory in /run, security implications?
For years, I have been using a user run script that globally adjusts the display for various lighting conditions (reproduced below). It writes a couple of files in the users home directory to save state, and it has always annoyed me that the globally saved state is not globally available. My thought is to write to a user writable directory in /run, perhaps /run/users, right next to /run/user, but I thought I should check with the experts as to possible security implications. I would also have to instantiate that directory on every boot, and I don't know how off the top of my head. That state is not saved across reboots is a plus. Thoughts? Perhaps such a directory should be available on every system. Here is /usr/local/bin/invert-display: #!/bin/sh if test -f ~/.altered-display; then xcalib -c; if test -f ~/.inverted-display; then rm ~/.altered-display ~/.inverted-display; #normal display else xcalib -red 0.75 0 100 -green 0.75 0 78 -blue 0.75 0 55 -i -a; mv ~/.altered-display ~/.inverted-display; #inverted display fi else if test -f ~/.inverted-display; then xcalib -co 60 -a; #nighttime away from city lights else xcalib -gc 2.2 -a; #high gamma for incident sunlight fi; touch ~/.altered-display; fi; I've used it for years on a laptop that rides around mounted in my car, where it helps deal with varying lighting such as direct sunlight and nighttime use. The idea at night is to minimize total light output so that my eyes can remain dark adapted, so it works best with light background colors. I have lightened the dark parts of the Breeze theme colors to suit, e.g., the active titlebar color matches the color for "Hover Decoration", etc. The script is run by clicking a panel button. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
11.06.2019 3:55, Robert Hardy пишет:
For years, I have been using a user run script that globally adjusts the display for various lighting conditions (reproduced below). It writes a couple of files in the users home directory to save state, and it has always annoyed me that the globally saved state is not globally available. My thought is to write to a user writable directory in /run, perhaps /run/users, right next to /run/user, but I thought I should check with the experts as to possible security implications. I would also have to instantiate that directory on every boot, and I don't know how off the top of my head. That state is not saved across reboots is a plus.
Thoughts?
Perhaps such a directory should be available on every system.
What's wrong with /tmp? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Andrei Borzenkov
-
Robert Hardy