Commit Graph

16 Commits

Author SHA1 Message Date
Christopher Michael 194f1c77b5 e_system_main: Fix resource leak
Coverity reports a leak here because we are not closing the previously
opened file. Fix that.

fixes CID1427985
2020-04-28 11:31:24 -04:00
Carsten Haitzler 91c003100e e system - allow the per system permit/deny rules to work 2020-04-23 13:43:45 +01:00
Carsten Haitzler 3d490704ca e system - check chdir return
chdir to / will never fail... it's the root dir.. but let's make
coverity happy.

fix CID 1425454
2020-04-23 01:05:00 +01:00
Carsten Haitzler 089051af9e e system main - check getgrid return like elsewhere to maake cov happy
fix CID 1425457
2020-04-23 00:54:35 +01:00
Carsten Haitzler dfed5c2718 e sys storage - also address media dirs to have to be user named
only allow media dirs to be /media/username/xxx ...

fixes T8672
2020-04-22 14:27:21 +01:00
Carsten Haitzler 027095b68e e system - use ERR - its not the eina log - it's already a custom one
i already made ERR do fprintf to stderr... so use it :)
2020-04-22 13:44:01 +01:00
Carsten Haitzler fc6c423a9f e system main - fix system.conf parsing to parse all of it
forgot my for loop.. :)

fixes T8675
2020-04-22 13:42:32 +01:00
Carsten Haitzler 2e75a9410e e sys man - double check root homedir to be paranoid 2020-04-22 13:15:08 +01:00
Carsten Haitzler 5fb2fccd70 e sys main - double check return from getpwent homedir 2020-04-22 12:37:51 +01:00
Carsten Haitzler d42605f5c0 e sys main - change cwd to avoid loading .so's in ./
fixes T8676
2020-04-22 12:35:32 +01:00
Alastair Poole d0b2f3db0c e_system: When setuid, set home also.
This ensures we have a matching $HOME when using setuid, without
which can potentially cause issues in eina_vpath on some
systems (FreeBSD as example).
2020-04-21 15:56:26 +01:00
Carsten Haitzler bd97c74492 e alert - in case of crash use e system in new alert mode
this forces all ddc/backlight devices to max when discovered so you
can always see the alert.
2020-04-21 03:01:54 +01:00
Carsten Haitzler b5fa86e7f5 e system - disable singleton mode code - fewer pluses than minuses 2020-04-08 09:39:23 +01:00
Carsten Haitzler eab2a34ef3 backlight - add ddc support via libddcutil
This adds ddc monitor control and glues it into the backlight system.
A result of this is now backlgiht control gadgets work screen by
screen and even on desktop monitors as well as on a laptop panel. If
you now put a backlight gadget on a shelf on each screen... it will
control THAT screen's backlight.

This requires libddcutil to be installed. That will require i2c
modules (i2c-dev specifically). This means that this is likely not
going to do anything useful on bsd's... unless libddcutil happens to
work there by chance.

so install ddcutil/libddcutil. ensure it's in ld.so.conf so setuid
root processes find it (as LD_LIBRARY_PATH won't help) and enjoy your
new funcky per-screen backlight controls... :)

@feature
2020-02-06 18:41:23 +00:00
Carsten Haitzler 5b5c7c3cb3 e system - force a malloc trim regularly to keep back-end proc minimal 2020-01-16 12:09:49 +00:00
Carsten Haitzler f57572b678 e system - add new uber setuid tool to replace all the previous ones
so e has had a bit of a mess of setuid root tools to do things that
are essential to maintaing a functioning desktop/laptop/tablet/phone
like device like shutting it down or suspending or sqizzling the cpu
governor or messing with the backlight or... you get the idea.

this has been spread around enlightenment_sys and other special
purpose tools. this now unifies it into a single "always there"
enlightenment_system backend setuid root slave process whose job it is
to do all these things via a stdio protocol in an organized way. this
means latency to do something is lower, but at the expense of
consuming ram and a lurking process. unfortunately the lurking will be
needed soon when i add ddc support to make it even vaguely efficient,
so it's a cost i guess we have to pay now. we'll need this in future
as well for some stats collection and more.

still need to port existing code to use this instead of the existing stuff,
and then remove of the old stuff.
2020-01-15 11:33:49 +00:00