Sync OpenBSD patchset 638:

Change nested check to compare server socket path rather than just assuming
that if $TMUX is set it is nested. From Micah Cowan.
This commit is contained in:
Tiago Cunha
2010-02-08 18:25:04 +00:00
parent ac8aa0bc0f
commit 9b57743cca
2 changed files with 18 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $Id: server-client.c,v 1.29 2010-01-08 16:35:38 tcunha Exp $ */
/* $Id: server-client.c,v 1.30 2010-02-08 18:25:04 tcunha Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@ -692,17 +692,6 @@ server_client_msg_command(struct client *c, struct msg_command_data *data)
}
cmd_free_argv(argc, argv);
if (data->pid != -1) {
TAILQ_FOREACH(cmd, cmdlist, qentry) {
if (cmd->entry->flags & CMD_CANTNEST) {
server_client_msg_error(&ctx,
"sessions should be nested with care. "
"unset $TMUX to force");
goto error;
}
}
}
if (cmd_list_exec(cmdlist, &ctx) != 1)
server_write_client(c, MSG_EXIT, NULL, 0);
cmd_list_free(cmdlist);