aboutsummaryrefslogtreecommitdiff
path: root/seatd-launch
AgeCommit message (Collapse)Author
2021-09-16seatd-launch: Specify exact environment to seatdKenny Levinsen
The parent environment might contain nasty things. Create a new environment for the seatd process containing only the environment variables we care about. For now, that's only SEATD_LOGLEVEL.
2021-09-16seatd-launch: Use absolute path for seatdKenny Levinsen
We previously used execlp to execute seatd, which had the effect of searching PATH for the executable. This allowed the caller to control what executable was run, which is bad if SUID has been set. Instead, expose the absolute install path for seatd from meason as a define, and use that in a call to execv.
2021-09-13seatd-launch: print unlink/kill errorsSimon Ser
Makes it easier to find out that something went wrong.
2021-09-13seatd-launch: exit with status >128 if child is signalledSimon Ser
Mimick shells and exit with a status >128 if our child has been signalled. Exiting with 128 + signal number is what most shells do (POSIX only requires them to exit with >128).
2021-09-12seatd-launch: Use optind to find the commandKenny Levinsen
The command indexing had not been updated afer the introduction of getopt, so combining a command with flags would fail. Add error handling for if no command was specified while we're at it.
2021-09-12seatd-launch: respect PATH when looking for commandJan Beich
$ seatd-launch sway -c /dev/null Could not start target: No such file or directory
2021-09-08seatd-launch: Fix chmod error gotoKenny Levinsen
2021-09-08seatd-launch: Set socket permissions directlyKenny Levinsen
Instead of relying on seatd's user/group arguments, which require turning our UID back into a username, just chmod/chown the socket ourselves once seatd is ready. We also reduce the permissions to just user access, instead of user and group like seatd specifies.
2021-08-06seatd-launch: Command line argument supportKenny Levinsen
2021-08-06seatd-launch: check for getpwuid errorsSimon Ser
2021-08-06seatd-launch: don't use gotos in child processesSimon Ser
While forked (child pid is zero), don't use gotos. These will execute atexit functions and potentially mess up the stdlib. Instead, use _exit.
2021-08-06seatd-launch: propagate child exit statusSimon Ser
When the child process exits with a non-zero code or is killed, return with a non-zero code as well.
2021-08-06seatd-launch: Add seatd launch wrapperKenny Levinsen
This launch wrapper is used to conveniently start a new seatd instance, wait for it to be ready, and launch a target application.