Fix #46: Migrate to use ~/.cache/light for unpriviliged operation
When light is installed in the non-SUID root mode it cannot write to
/etc/light anymore, so we set up a ~/.cache/light instead.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Overhaul and simplify program usage and documentation in README
- Use version from configure script
- Simplify usage text for accessibility, only one command at a time
- Simplify terminology, we have commands and options to commands
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Fix different kinds of issues with string buffers and pointers
- Use NAME_MAX and PATH_MAX instead of hardcoded values
- Allow paths to be longer than 256 chars
- Check pointers everywhere
- Use strncpy/snprintf instead of strcpy/sprintf
- Validate controllers' name (-s flag + a very long name -> bad things happening)
- Get rid of globals for dir iteration