aboutsummaryrefslogtreecommitdiff
path: root/seatd-launch
diff options
context:
space:
mode:
Diffstat (limited to 'seatd-launch')
-rw-r--r--seatd-launch/seatd-launch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/seatd-launch/seatd-launch.c b/seatd-launch/seatd-launch.c
index cf9f93d..acec145 100644
--- a/seatd-launch/seatd-launch.c
+++ b/seatd-launch/seatd-launch.c
@@ -33,7 +33,12 @@ int main(int argc, char *argv[]) {
char pipebuf[8];
sprintf(pipebuf, "%d", fds[1]);
+
struct passwd *user = getpwuid(getuid());
+ if (!user) {
+ perror("getpwuid failed");
+ _exit(1);
+ }
// TODO: Make seatd accept the numeric UID
execlp("seatd", "seatd", "-n", pipebuf, "-u", user->pw_name, "-s", sockbuf, NULL);