repositories / dotfiles
dotfiles
bugabingas dorkfiles
owned by admin
quickshell/nuguland/test-fixtures/ui/session-shim.c
Raw// LD_PRELOAD for the production shell in the sandbox only: the sandbox has no
// logind session, so polkit's agent subject (sd_pid_get_session) resolves to a
// fixed fixture session that the stand-in authority accepts.
#define _POSIX_C_SOURCE 200809L
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
int sd_pid_get_session(pid_t pid, char **session) {
(void)pid;
if (!session) return -22;
*session = strdup("fixture");
return *session ? 0 : -12;
}