seatd-launch: check for getpwuid errors
This commit is contained in:
parent
3a843745c2
commit
369af8f9e4
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue