Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2026-04-23 11:58:17 +01:00
22 changed files with 225 additions and 78 deletions

View File

@@ -229,24 +229,6 @@ session_destroy(struct session *s, int notify, const char *from)
session_remove_ref(s, __func__);
}
/* Sanitize session name. */
char *
session_check_name(const char *name)
{
char *copy, *cp, *new_name;
if (*name == '\0')
return (NULL);
copy = xstrdup(name);
for (cp = copy; *cp != '\0'; cp++) {
if (*cp == ':' || *cp == '.')
*cp = '_';
}
utf8_stravis(&new_name, copy, VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL);
free(copy);
return (new_name);
}
/* Lock session if it has timed out. */
static void
session_lock_timer(__unused int fd, __unused short events, void *arg)