mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-17 00:51:36 +02:00
Sync OpenBSD patchset 168:
Both of cmdclient and curclient CAN be NULL - if the command is executed from the configuration file. In this case, attach-session can't do much, and new-session should just assume -d.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $Id: cmd-attach-session.c,v 1.28 2009-07-18 11:06:09 nicm Exp $ */
|
||||
/* $Id: cmd-attach-session.c,v 1.29 2009-07-23 13:25:27 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -55,6 +55,9 @@ cmd_attach_session_exec(struct cmd *self, struct cmd_ctx *ctx)
|
||||
if ((s = cmd_find_session(ctx, data->target)) == NULL)
|
||||
return (-1);
|
||||
|
||||
if (ctx->cmdclient == NULL && ctx->curclient == NULL)
|
||||
return (0);
|
||||
|
||||
if (ctx->cmdclient == NULL) {
|
||||
if (data->chflags & CMD_CHFLAG('d')) {
|
||||
/*
|
||||
|
Reference in New Issue
Block a user