Commit Graph

55 Commits

Author SHA1 Message Date
Carsten Haitzler 3faf1a4627 move to eina's new fnmatch 2021-05-03 20:59:27 +01:00
Carsten Haitzler 5cc02d6467 Bring back e_sys just for mount, unmount and eject
This reverts commit a43869cdc0.

I still need this for efm... i forgot... :( So bring back the bits we
need until it's no longer needed...
2020-01-16 23:13:52 +00:00
Carsten Haitzler a43869cdc0 e_sys -> move from enlightenment_sys to e_system 2020-01-15 11:33:55 +00:00
Carsten Haitzler 959b041e12 e_sys - fix l2ping code to work and actually properly ping
it wasn't working. first response may not be a 200 ident so keep
looking for them. also send a bit more than 1 byte to be sure, and
chekc the response is what we sent to be sure. also enforce a timeout
(10sec here) where we give up so it doesn't hang possibly forever.
all in all l2ping in e_sys works again. now. in the process i added a
timeout param too.

@fix
2018-12-15 16:13:23 +00:00
Carsten Haitzler 4723f7e4a7 add rfkill actions to sysactions.conf - necessary for bluez
so bluez itself wont go rfkill block or unblock the bt device. you
have to rfkill unblock separately if it's blocked. this is needed to
make bluez at a minimum work right. possibly should be added to
connman too. but this is the first step.
2018-05-18 21:45:20 +09:00
Carsten Haitzler 51cb454993 e auth - move all auth to child process only (e_ckpasswd).
this should fix T6211 ensuring no drivers can cause a segfault at exit
time. this also happens to remove the enlightenment_sys -z option for
openbsd and unifies all the passwd checking into the single
enlightenment_ckpasswd binary util (that has ifdefs for openbsd,
freebsd and linux pam in it).

this simplifies code removing a mess of auth being done in multiple
places, removes special fork vs run 1 exe or a different exe in
different cases making it more maintainable. yes - this requires
enlightenment_ckpasswd to be setuid root, but it already was when it
was built.

@fix
2018-02-26 19:01:46 +09:00
Carsten Haitzler dd9a6637e4 e sys - frix warning for less noise
though act will not be set unless mnt is also true... this means less
noise from compiler wanrings so we can focus on real errors.
2017-11-06 10:24:37 +09:00
Carsten Haitzler ef6c178a17 enlightenment_sys - eina_init BEFORE switching uid - safer
in case eina_init uses env vars, move it to befor setuid() so it can
detect. you normally would setuid only for a limited op and we do it
for "the rest of the running" as e_sys is fairly simple.
2017-02-10 08:33:34 +09:00
Al Poole fddcaa43c4 OpenBSD non-PAM lokker authentication.
Reviewers: ManMower, zmike!

Subscribers: raster, ManMower, cedric

Differential Revision: https://phab.enlightenment.org/D4204
2016-09-08 10:18:10 -04:00
Carsten Haitzler 077474adcb e - warning fix - fix SVID_SOURCE complaint warning
reduces useless warnings so we see the real issues, not noise
2014-11-25 17:24:19 +09:00
Daniel Juyung Seo eeedb6a9d8 sys: Add /sbin and /usr/sbin to sys env path.
Now suspend and hibernate work well on some distributions like Ubuntu.
It was broken at some point. Now it works well.

@fix
2014-07-07 11:58:52 +09:00
Carsten Haitzler 9456e88504 e_sys - fix busy spin problem with security clamp-down 2013-12-06 09:19:08 +09:00
Carsten Haitzler 666df815cd e_sys - address security concerns with environment - more
add more environment variables to nuke and add alternate envrionment
nuke method to raise security level.
2013-12-01 11:50:51 +09:00
Carsten Haitzler bb4a21e986 e_sys - address security concerns with environment and gdb
1. clear out environment as best is possible before executing
anything. especially PATH and IFS are set to minimal base defaults.
also use clearenv() if available and unsetenv()

2. remove gdb method as it's just too dangerous. run it as normal as
the user and if the kernel / distro dny that - then sorry. too bad.
2013-11-30 22:26:30 +09:00
Bertrand Jacquin 19281cfd47 BUG/MINOR: avoid bashism in system() call
Other shell than >=bash-4 and dash does not support '&>' I/O redirection.

Introduce in commit v0.17.0-1871-g18cbd6f

 « While at it, I also fixed the piping of stdout and stderr to be nicer. »
2013-11-06 01:24:28 +01:00
Tom Hacohen 18cbd6f59a wsod: Fixed gdb hangs when generating backtraces.
After a long and hard battle with the gods of bugs I finally fixed
this stupid hang. I had to dig into the gdb source code, and gdb the
hell out of gdb, but it's now solved.

First of all, we should call gdb with -batch which exits automatically.
This however is not enough to fix it. The bug was that gdb was haning
while trying to set attributes on stdin because it was waiting for input.
This is obviously problematic when running in non-interactive mode, so
I had to pipe /dev/zero to stdin to fix it.
While at it, I also fixed the piping of stdout and stderr to be nicer.
2013-11-05 15:54:15 +00:00
Cedric BAIL 07b5d9fe6c dear Mike,
If you just want to silence your warning remove all -W from your CFLAGS and
take your revenge back to your compiler. Introducing bugs to just silent warning
is not gona help any one.

The borker,
  Cedric
2013-03-21 10:04:32 +09:00
Mike Blumenkrantz 605f781e36 dear cedric,
fucking compile things before you commit.

your vengeful buddy,
mike
2013-03-20 08:36:14 +00:00
Cedric Bail 2f6fcf4228 e: add automatic desktop lock/unlock when a bluetooth device disapear.
This use a custom implementation of l2ping to ping known device and do
proper action when they go away. I don't recommend to use the auto unlonck,
but it is there if someone need it.
2013-03-18 00:07:34 +09:00
Mike Blumenkrantz d4f30b24ad fix possible null deref in e_sys when debugging
SVN revision: 83157
2013-01-23 10:53:26 +00:00
Mike Blumenkrantz 9e8e755cdf formatting: all at once
SVN revision: 82625
2013-01-11 10:34:29 +00:00
Carsten Haitzler dae7d45236 add small detail to error printf on e_sys.
SVN revision: 80799
2012-12-13 08:32:37 +00:00
Cedric BAIL 0b5db2653e e: simplify logic.
SVN revision: 78737
2012-11-01 01:09:22 +00:00
Mike Blumenkrantz 78967eac38 patch from Maxime Villard with some minor changes and openbsd fixes
SVN revision: 78711
2012-10-31 15:40:53 +00:00
Cedric BAIL ab5767eac7 e: add gdb support to enlightenment_sys to work around Ubuntu crappy kernel patch.
SVN revision: 78640
2012-10-30 08:36:26 +00:00
Mike Blumenkrantz 121fe0f8c7 remove some e_sys code which prevented umounting user-mounted devices when devices were not mounted as /media/$dev
SVN revision: 77252
2012-10-01 08:35:03 +00:00
Maxime Villard eb5cd99f6b From: Maxime Villard <rustyBSD@gmx.fr>
Hi,
 we should check the permissions of the conf file.

 For example (really stupid situation):
 If the user mischmoded his conf file, a guy who have
 physical access could obtain root access by launching
 a program in root (after having modified paths in conf
 file); or a guy with ssh access, ...


SVN revision: 76519
2012-09-12 11:49:46 +00:00
Mike Blumenkrantz 4e4c7b258c some trivial changes suggested by Maxime Villard <rustyBSD@gmx.fr>
SVN revision: 76104
2012-09-04 05:19:49 +00:00
Christopher Michael c02739d6c0 E: Fix uninitialized variable warning.
SVN revision: 75112
2012-08-10 16:00:38 +00:00
Mike Blumenkrantz 2b9279ba81 convert some ints to size_t in e_sys_main
suggestion by rustyBSD@gmx.fr


SVN revision: 75084
2012-08-10 10:14:23 +00:00
Mike Blumenkrantz 45a7a3e283 fix shadow warnings
patch by rustyBSD@gmx.fr


SVN revision: 75083
2012-08-10 10:11:34 +00:00
Mike Blumenkrantz 98284d14da fix eject arg parsing
SVN revision: 74782
2012-08-02 06:58:41 +00:00
Mike Blumenkrantz eb9dca9177 null check from rustyBSD
SVN revision: 74777
2012-08-02 06:31:50 +00:00
Mike Blumenkrantz 416f69ef48 fix e_sys mount exit codes and only compile eeze mount parts when eeze mount is enabled
SVN revision: 74577
2012-07-30 10:28:25 +00:00
Mike Blumenkrantz c956092990 e_sys now fails to perform any mount-related activity if there is even the slightest amount of monkey business occurring. orangutans and chimpanzees are included.
SVN revision: 74571
2012-07-30 10:13:06 +00:00
Vincent Torri c3b0637802 e17: whitespaces--
SVN revision: 72561
2012-06-21 06:19:43 +00:00
Mike Blumenkrantz 694b58f985 I guess make this explicit even though it will never happen
SVN revision: 64887
2011-11-07 22:37:20 +00:00
Christopher Michael 0fe304a4bc E: e_sys_main: Fix 'mp may be used uninitialized' warning.
SVN revision: 59601
2011-05-22 17:08:07 +00:00
Mike Blumenkrantz d45b04109b also allow eject
SVN revision: 59444
2011-05-16 11:03:45 +00:00
Mike Blumenkrantz 7a53690aee add some rudimentary dir management for mounting (creation/deletion of /media/$uuid dirs)
SVN revision: 59440
2011-05-16 10:33:57 +00:00
Mike Blumenkrantz 686b349731 eeze mount prep: allow enlightenment_sys to run mount/umount commands when properly formatted and specified in sysactions.conf
SVN revision: 59424
2011-05-15 23:47:42 +00:00
Mike Blumenkrantz c7a60fd7e5 fix typos in printfs
SVN revision: 59417
2011-05-15 22:17:15 +00:00
Mike Blumenkrantz 3942daa652 ecrustified
SVN revision: 59416
2011-05-15 22:11:30 +00:00
Lucas De Marchi 546f8d20c3 Fix exit values
Exit status is a value between 0 and 255.



SVN revision: 55846
2011-01-04 15:29:50 +00:00
Carsten Haitzler 02a6422cf0 expoand group list # to 65k - in case, and handle < 0 return.
SVN revision: 53716
2010-10-21 15:04:48 +00:00
Lucas De Marchi 6638a10e20 FORMATTING
* Remove vim modelines:
 find . -name '*.[chx]' -exec sed -i '/\/\*$/ {N;N;/ \* vim:ts/d}' \{\} \;
 find . -name '*.[chx]' -exec sed -i '/\/[\*\/] *vim:/d' \{\} \;

* Remove leading blank lines:
 find . -name '*.[cxh]' -exec sed -i '/./,$!d'

If you use vim, use this in your .vimrc:
set ts=8 sw=3 sts=8 expandtab cino=>5n-3f0^-2{2(0W1st0



SVN revision: 50816
2010-08-04 16:57:32 +00:00
Cedric BAIL 773d102291 This commit is huge. I did test it a lot on my computer, and it run fine here.
But is so big i fear i could have broken some piece of code. So report any wrong
behaviour to me (cedric on #edevelop).

So moving e17 and efreet to eina_hash. With a little efreet API break so they
must come together.


SVN revision: 38185
2008-12-17 15:33:43 +00:00
Gustavo Sverzut Barbieri ebcb9f85a7 build infra improvements.
* configure.ac:
   - require C99 compiler;
   - disable F77 and CXX checks;
   - per-binary (program) flags, reduce linkage;
   - every module can be optionally compiled;
 * src/bin:
   - Makefile.am: per-binary libs, reduce linkage;
   - just add LIBS to LDADD and LIBADD, not LDFLAGS!
   - e_sys_main.c: rewrite using proper eina, avoid linking with evas.
 * src/modules:
   - just add LIBS to LDADD and LIBADD, not LDFLAGS!
   - every module can be optionally compiled;



SVN revision: 38009
2008-12-08 01:39:33 +00:00
Sebastian Dransfeld 4571aa7c51 Add missing header.
SVN revision: 27447
2006-12-14 19:27:46 +00:00
Carsten Haitzler 7c6acf9488 and actually match groups right!
SVN revision: 26187
2006-09-28 06:35:43 +00:00