Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2015-10-31 10:01:12 +00:00
18 changed files with 136 additions and 139 deletions

View File

@ -272,8 +272,10 @@ client_main(struct event_base *base, int argc, char **argv, int flags)
client_peer = proc_add_peer(client_proc, fd, client_dispatch, NULL);
/* Save these before pledge(). */
if ((cwd = getcwd(path, sizeof path)) == NULL)
cwd = "/";
if ((cwd = getcwd(path, sizeof path)) == NULL) {
if ((cwd = find_home()) == NULL)
cwd = "/";
}
if ((ttynam = ttyname(STDIN_FILENO)) == NULL)
ttynam = "";