mirror of
https://github.com/tmate-io/tmate.git
synced 2026-01-23 02:24:06 +00:00
configure: Add option to only create read-only sessions for #84
This commit is contained in:
parent
cbec43f56d
commit
895d142928
2 changed files with 15 additions and 1 deletions
|
|
@ -65,6 +65,15 @@ if test "x$found_static" = xyes; then
|
|||
])
|
||||
fi
|
||||
|
||||
# Is this a readonly session build?
|
||||
AC_ARG_ENABLE(
|
||||
session-write,
|
||||
AC_HELP_STRING(--disable-session-write, create read-only sessions)
|
||||
)
|
||||
if test "x${enable_session_write}" = xno; then
|
||||
CFLAGS="$CFLAGS -DTMATE_SESSION_RO"
|
||||
fi
|
||||
|
||||
# Is this gcc?
|
||||
AM_CONDITIONAL(IS_GCC, test "x$GCC" = xyes)
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,12 @@ static void handle_notify(__unused struct tmate_session *session,
|
|||
struct tmate_unpacker *uk)
|
||||
{
|
||||
char *msg = unpack_string(uk);
|
||||
tmate_status_message("%s", msg);
|
||||
#ifdef TMATE_SESSION_RO
|
||||
if (!strstr(msg, "session: "))
|
||||
tmate_status_message("%s", msg);
|
||||
#else
|
||||
tmate_status_message("%s", msg);
|
||||
#endif
|
||||
free(msg);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue