fixes: improve login environment handling (#114)

* chore(organization): allow nested header and c files

* feat: add shell login "middleware" & etc:
  * lidm now calls `bash` (or other shells, depends on PACKAGE cfg) in
  login mode as a session wrapper to source most env (can be disabled)
  * this fixes a lot of env problems with all `/etc/profile` and more

Extra:
* implemented a musl compatible version of `execvpe` and now lidm should
  search for PATH everywhere it needs to
* `search_path` now also checks if the found binary is properly
  executable
* lidm now uses `confstr` for a decent PATH default if none is found
* logs are unbuffered for cases where debug logs appear empty (exit
  without handlers moment)

* chore: one-time evaluate certain makefile vars

---------

Co-authored-by: grialion <48643945+grialion@users.noreply.github.com>
This commit is contained in:
2026-02-07 17:12:03 +01:00
committed by GitHub
parent c009c6c31c
commit 0b2d0bdf03
34 changed files with 555 additions and 424 deletions

View File

@@ -2,16 +2,17 @@
#define EFIELDH_
#include <stdbool.h>
#include <stdint.h>
#include <sys/types.h>
// holds also the max string buffer in itself, not dynamic
struct editable_field {
u_char pos;
uint8_t pos;
char content[255];
};
struct editable_field efield_new(char* content);
void efield_trim(struct editable_field* self, u_char pos);
void efield_trim(struct editable_field* self, uint8_t pos);
void efield_update(struct editable_field* self, char* update);
bool efield_seek(struct editable_field* self, char seek);