head 1.10; access; symbols pkgsrc-2024Q4:1.9.0.12 pkgsrc-2024Q4-base:1.9 pkgsrc-2024Q3:1.9.0.10 pkgsrc-2024Q3-base:1.9 pkgsrc-2024Q2:1.9.0.8 pkgsrc-2024Q2-base:1.9 pkgsrc-2024Q1:1.9.0.6 pkgsrc-2024Q1-base:1.9 pkgsrc-2023Q4:1.9.0.4 pkgsrc-2023Q4-base:1.9 pkgsrc-2023Q3:1.9.0.2 pkgsrc-2023Q3-base:1.9 pkgsrc-2023Q2:1.8.0.24 pkgsrc-2023Q2-base:1.8 pkgsrc-2023Q1:1.8.0.22 pkgsrc-2023Q1-base:1.8 pkgsrc-2022Q4:1.8.0.20 pkgsrc-2022Q4-base:1.8 pkgsrc-2022Q3:1.8.0.18 pkgsrc-2022Q3-base:1.8 pkgsrc-2022Q2:1.8.0.16 pkgsrc-2022Q2-base:1.8 pkgsrc-2022Q1:1.8.0.14 pkgsrc-2022Q1-base:1.8 pkgsrc-2021Q4:1.8.0.12 pkgsrc-2021Q4-base:1.8 pkgsrc-2021Q3:1.8.0.10 pkgsrc-2021Q3-base:1.8 pkgsrc-2021Q2:1.8.0.8 pkgsrc-2021Q2-base:1.8 pkgsrc-2021Q1:1.8.0.6 pkgsrc-2021Q1-base:1.8 pkgsrc-2020Q4:1.8.0.4 pkgsrc-2020Q4-base:1.8 pkgsrc-2020Q3:1.8.0.2 pkgsrc-2020Q3-base:1.8 pkgsrc-2020Q2:1.6.0.32 pkgsrc-2020Q2-base:1.6 pkgsrc-2020Q1:1.6.0.12 pkgsrc-2020Q1-base:1.6 pkgsrc-2019Q4:1.6.0.34 pkgsrc-2019Q4-base:1.6 pkgsrc-2019Q3:1.6.0.30 pkgsrc-2019Q3-base:1.6 pkgsrc-2019Q2:1.6.0.28 pkgsrc-2019Q2-base:1.6 pkgsrc-2019Q1:1.6.0.26 pkgsrc-2019Q1-base:1.6 pkgsrc-2018Q4:1.6.0.24 pkgsrc-2018Q4-base:1.6 pkgsrc-2018Q3:1.6.0.22 pkgsrc-2018Q3-base:1.6 pkgsrc-2018Q2:1.6.0.20 pkgsrc-2018Q2-base:1.6 pkgsrc-2018Q1:1.6.0.18 pkgsrc-2018Q1-base:1.6 pkgsrc-2017Q4:1.6.0.16 pkgsrc-2017Q4-base:1.6 pkgsrc-2017Q3:1.6.0.14 pkgsrc-2017Q3-base:1.6 pkgsrc-2017Q2:1.6.0.10 pkgsrc-2017Q2-base:1.6 pkgsrc-2017Q1:1.6.0.8 pkgsrc-2017Q1-base:1.6 pkgsrc-2016Q4:1.6.0.6 pkgsrc-2016Q4-base:1.6 pkgsrc-2016Q3:1.6.0.4 pkgsrc-2016Q3-base:1.6 pkgsrc-2016Q2:1.6.0.2 pkgsrc-2016Q2-base:1.6 pkgsrc-2016Q1:1.4.0.10 pkgsrc-2016Q1-base:1.4 pkgsrc-2015Q4:1.4.0.8 pkgsrc-2015Q4-base:1.4 pkgsrc-2015Q3:1.4.0.6 pkgsrc-2015Q3-base:1.4 pkgsrc-2015Q2:1.4.0.4 pkgsrc-2015Q2-base:1.4 pkgsrc-2015Q1:1.4.0.2 pkgsrc-2015Q1-base:1.4 pkgsrc-2014Q4:1.3.0.4 pkgsrc-2014Q4-base:1.3 pkgsrc-2014Q3:1.3.0.2 pkgsrc-2014Q3-base:1.3 pkgsrc-2014Q2:1.2.0.88 pkgsrc-2014Q2-base:1.2 pkgsrc-2014Q1:1.2.0.86 pkgsrc-2014Q1-base:1.2 pkgsrc-2013Q4:1.2.0.84 pkgsrc-2013Q4-base:1.2 pkgsrc-2013Q3:1.2.0.82 pkgsrc-2013Q3-base:1.2 pkgsrc-2013Q2:1.2.0.80 pkgsrc-2013Q2-base:1.2 pkgsrc-2013Q1:1.2.0.78 pkgsrc-2013Q1-base:1.2 pkgsrc-2012Q4:1.2.0.76 pkgsrc-2012Q4-base:1.2 pkgsrc-2012Q3:1.2.0.74 pkgsrc-2012Q3-base:1.2 pkgsrc-2012Q2:1.2.0.72 pkgsrc-2012Q2-base:1.2 pkgsrc-2012Q1:1.2.0.70 pkgsrc-2012Q1-base:1.2 pkgsrc-2011Q4:1.2.0.68 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q3:1.2.0.66 pkgsrc-2011Q3-base:1.2 pkgsrc-2011Q2:1.2.0.64 pkgsrc-2011Q2-base:1.2 pkgsrc-2011Q1:1.2.0.62 pkgsrc-2011Q1-base:1.2 pkgsrc-2010Q4:1.2.0.60 pkgsrc-2010Q4-base:1.2 pkgsrc-2010Q3:1.2.0.58 pkgsrc-2010Q3-base:1.2 pkgsrc-2010Q2:1.2.0.56 pkgsrc-2010Q2-base:1.2 pkgsrc-2010Q1:1.2.0.54 pkgsrc-2010Q1-base:1.2 pkgsrc-2009Q4:1.2.0.52 pkgsrc-2009Q4-base:1.2 pkgsrc-2009Q3:1.2.0.50 pkgsrc-2009Q3-base:1.2 pkgsrc-2009Q2:1.2.0.48 pkgsrc-2009Q2-base:1.2 pkgsrc-2009Q1:1.2.0.46 pkgsrc-2009Q1-base:1.2 pkgsrc-2008Q4:1.2.0.44 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.42 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.40 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.38 pkgsrc-2008Q2-base:1.2 cwrapper:1.2.0.36 pkgsrc-2008Q1:1.2.0.34 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.32 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.30 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.28 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.26 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.24 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.22 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.20 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.18 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.16 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.14 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.12 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.10 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.8 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.6 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.4 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.2 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.1.0.4 pkgsrc-2003Q4-base:1.1 netbsd-1-6-1:1.1.0.2 netbsd-1-6-1-base:1.1; locks; strict; comment @# @; 1.10 date 2025.01.09.20.07.03; author ktnb; state dead; branches; next 1.9; commitid 5NUIjIRACTuMGQEF; 1.9 date 2023.09.06.16.00.15; author vins; state Exp; branches; next 1.8; commitid e34oKDMk5MFd6JDE; 1.8 date 2020.08.02.10.59.13; author kim; state Exp; branches; next 1.7; commitid tAfh6PmzDJLpKtiC; 1.7 date 2020.08.01.14.10.23; author kim; state Exp; branches; next 1.6; commitid 0XXtik7lr76OQmiC; 1.6 date 2016.06.20.16.04.44; author ryoon; state Exp; branches; next 1.5; commitid yvAOkbv4XSAqNdbz; 1.5 date 2016.05.02.19.10.40; author jperkin; state Exp; branches; next 1.4; commitid OXLkwbcIRbBJoW4z; 1.4 date 2015.02.13.04.44.40; author rodent; state Exp; branches; next 1.3; commitid zVIVi2ODO8jkSN9y; 1.3 date 2014.08.25.20.02.32; author kim; state Exp; branches; next 1.2; commitid g8Qatp6FH7pJtMNx; 1.2 date 2003.12.01.15.18.27; author ben; state Exp; branches; next 1.1; 1.1 date 2002.09.15.06.51.39; author kim; state Exp; branches; next ; desc @@ 1.10 log @screen: update to 5.0.0 - Rewriten autentication mechanism - Add escape %T to show current tty for window - Add escape %O to show number of currently open windows - Use wcwdith() instead of UTF-8 hard-coded tables - New commands: - auth [on|off] Provides password protection - status [top|up|down|bottom] [left|right] The status window by default is in bottom-left corner This command can move status messages to any corner of the screen. - truecolor [on|off] - multiinput Input to multiple windows at the same time - Removed commands: - time - debug - password - maxwin - nethack - Fixes: - Screen buffers ESC keypresses indefinitely - Crashes after passing through a zmodem transfer - Fix double -U issue @ text @$NetBSD: patch-al,v 1.9 2023/09/06 16:00:15 vins Exp $ Make extra calls to remove utmp entries when utmpx is used. For non-login entries we only update utmpx, as it stores more information, and utilities are reading both. Do not truncate hostnames that have two colons (:) as they are likely IPv6 addresses. Wrap them in brackets ([]) unless already wrapped (e.g. from $DISPLAY). --- utmp.c.orig 2023-08-16 00:29:26.000000000 +0000 +++ utmp.c @@@@ -48,6 +48,12 @@@@ extern char *LoginName; extern int real_uid, eff_uid; +#ifdef NetBSD_UTMP +extern void utmp_login __P((char *)); +extern void utmp_logout __P((char *)); +#endif + + /* * UTNOKEEP: A (ugly) hack for apollo that does two things: * 1) Always close and reopen the utmp file descriptor. (I don't know @@@@ -315,6 +321,9 @@@@ RemoveLoginSlot() ASSERT(display); debug("RemoveLoginSlot: removing your logintty\n"); +#ifdef NetBSD_UTMP + utmp_logout(stripdev(D_usertty)); +#endif D_loginslot = TtyNameSlot(D_usertty); if (D_loginslot == (slot_t)0 || D_loginslot == (slot_t)-1) return; @@@@ -379,6 +388,9 @@@@ RestoreLoginSlot() debug("RestoreLoginSlot()\n"); ASSERT(display); +#ifdef NetBSD_UTMP + utmp_login(stripdev(D_usertty)); +#endif if (utmpok && D_loginslot != (slot_t)0 && D_loginslot != (slot_t)-1) { debug1(" logging you in again (slot %#lx)\n", (long)D_loginslot); @@@@ -410,7 +422,7 @@@@ struct win *wi; struct utmp u; int saved_ut; #ifdef UTHOST - char *p; + char *m, *p; char host[sizeof(D_loginhost) + 15]; #else char *host = 0; @@@@ -449,12 +461,37 @@@@ struct win *wi; * "faui45.informati"......:s.0 * HPUX uses host:0.0, so chop at "." and ":" (Eric Backus) */ - for (p = host; *p; p++) - if ((*p < '0' || *p > '9') && (*p != '.')) + for (m = p = host; *p; p++) + if (*p == ':') break; + if (*p == ':') + for (m = p + 1; *m; m++) + if (*m == ':') + { + if (host[0] != '[') + { + strncpy(host + 1, D_loginhost, sizeof(host) - 15 - 2); + host[0] = '['; + p = host + strlen(host); + *p++ = ']'; + } + break; + } + else + for (p = host; *p; p++) + if ((*p < '0' || *p > '9') && (*p != '.')) + break; if (*p) { - for (p = host; *p; p++) + p = host; + if (host[0] == '[') + for (; *p; p++) + if (*p == ']') + { + p++; + break; + } + for (; *p; p++) if (*p == '.' || (*p == ':' && p != host)) { *p = '\0'; @ 1.9 log @misc/screen: update to 4.9.1. # Changes Version 4.9.1 (20/08/2023): * Support stop/parity bits on serial port (#23952) * Add needed system headers in checks and return values for implicit function declarations * Fixes: - Avoid zombies after shell exit (#25089) - Missed signal sending permission check on failed query messages (CVE-2023-24626) - manpage fixes - source code fixes during cleanup - UTF-8 encoding can emit invalid UTF-8 sequences for out of range unicode values (#62097) @ text @d1 1 a1 1 $NetBSD: patch-al,v 1.8 2020/08/02 10:59:13 kim Exp $ @ 1.8 log @Simplify the IPv6 address handling patch Also fix the completely incorrect code that was inteded to look for the closing bracket (but clearly wouldn't work and wasn't hit in my previous testing). @ text @d1 1 a1 1 $NetBSD: patch-al,v 1.7 2020/08/01 14:10:23 kim Exp $ d11 1 a11 1 --- utmp.c.orig 2016-06-19 19:41:03.000000000 +0000 d45 1 a45 1 debug1(" logging you in again (slot %#x)\n", (int)D_loginslot); @ 1.7 log @Stop chopping off most of an IPv6 address. @ text @d1 1 a1 1 $NetBSD: patch-al,v 1.6 2016/06/20 16:04:44 ryoon Exp $ d55 1 a55 1 @@@@ -449,12 +461,48 @@@@ struct win *wi; a63 1 - if (*p) d65 2 a66 2 + { + for (m = p + 1; *m; m++) d68 1 a68 1 + if (*m == ':') d70 4 a73 14 + if (host[0] != '[') + { + strncpy(host + 1, D_loginhost, sizeof(host) - 15 -1); + host[0] = '['; + for (p = host; *p; p++) + ; + *p++ = ']'; + break; + } + else + { + for (p = m + 1; *p; p++) + ; + } d75 1 a76 1 + } d78 4 d83 1 a83 6 for (p = host; *p; p++) + if ((*p < '0' || *p > '9') && (*p != '.')) + break; + } + if (*p) + { d86 6 a91 5 + { + for (; *p == ']'; p++) + ; + p++; + } @ 1.6 log @Update to 4.4.0 Changelog: Version 4.4.0 (19/06/2016): * Support up to 24 function keys * Fix runtime issues * 'logfile' command, starts logging into new file upon changing @ text @d1 1 a1 1 $NetBSD: patch-al,v 1.5 2016/05/02 19:10:40 jperkin Exp $ d7 4 d46 61 @ 1.5 log @Fix build on Darwin. @ text @d1 1 a1 1 $NetBSD: patch-al,v 1.4 2015/02/13 04:44:40 rodent Exp $ d7 1 a7 1 --- utmp.c.orig 2015-06-28 21:37:40.000000000 +0000 a41 24 @@@@ -631,7 +643,11 @@@@ int pid; /* must use temp variable because of NetBSD/sparc64, where * ut_xtime is long(64) but time_t is int(32) */ (void)time(&now); +#ifdef __APPLE__ + u->ut_time = now; +#else u->ut_tv.tv_sec = now; +#endif } static slot_t @@@@ -743,7 +759,11 @@@@ int pid; strncpy(u->ut_line, line, sizeof(u->ut_line)); strncpy(u->ut_name, user, sizeof(u->ut_name)); (void)time(&now); +#ifdef __APPLE__ + u->ut_time = now; +#else u->ut_tv.tv_sec = now; +#endif } static slot_t @ 1.4 log @Add patch which includes to fix build on OpenBSD. Defuzz patchset. @ text @d1 1 a1 1 $NetBSD: patch-al,v 1.3 2014/08/25 20:02:32 kim Exp $ d7 1 a7 1 --- utmp.c.orig 2014-04-26 16:22:09.000000000 +0000 d42 24 @ 1.3 log @Upgrade screen to version 4.2.1. Version 4.2.1 (28/04/2014): * allow for terminal with long $TERM (up to 32 characters) * allow to use long logins * documentation fixes * runtime fixes Version 4.2.0 (17/04/2014): New Commands: * 'unbindall' to unbind all commands * 'up', 'down', 'left', 'right' sub-commands for 'focus' * 'rendition' to specify rendition to use in caption/hardstatus for window-names that have bell/monitor/silence/so turned on. * 'layout', with the following sub-commands - 'title' - 'number' - 'autosave' ('autosave on' or 'autosave off') - 'new' - 'save' ('save ') - 'select' - 'next' - 'prev' - 'attach' - 'show' - 'remove' - 'dump' * 'group' for moving window(s) into a group. * 'defmousetrack' and 'mousetrack', to turn on/off mouse-tracking for displays. It's turned off by default. With mouse-tracking turned on, it's possible to switch to a region ('focus') using mouse clicks. It's also possible to select a text region in copy-mode using a mouse click to place a mark and the scroll wheel to scroll through the buffer. Additional features might be to allow clicking on window-titles in the caption to switch to that window. * All commands prefixed '@@' are treated as 'quiet', i.e. '@@'-prefixed commands do not trigger any display messages. Changed Commands: * '-v' parameter to 'split' command for vertical splits. * 'sorendition' deprecated in favour of 'rendition so'. * 'digraph' can take a second parameter to specify custom digraphs. For example, 'digraph >= ≥' or 'digraph >= U+2265' Using '0' as the second parameter will remove the digraph. * 'stuff' will prompt for input if there's nothing to stuff. * The argument to ":number" can be prefixed with '+' or '-' to use it as a relative argument. * '-g' parameter to 'windowlist' to show nested list of windows. * '//group' parameter to 'screen' to create a grouped window. * 'blankerprg' shows the currently set command on no argument. * 'maxwin' can now be used to increase the number of maximum windows. .screenrc: * $PID expands to the PID of the screen session. * $PWD expands to the current working directory of the session. * $STY expands to the session name. * Tilde-expansion in pathnames (e.g. for the 'source' command) * C-style escapes can be used (e.g. "\n" to get a newline with 'stuff') * '%p' in caption/hardstatus string expands to the PID of the backend, and '%+p' expands to the PID of the frontend (display). * '%S' in caption/hardstatus string expands to the session name. * '%P' in the caption string evaluates to true if the region is in copy mode. * '%E' in the caption string evaluates to true if the escape character has currently been pressed. Window List: * Nested views when there are window groups (with 'windowlist -g'). * Press 'm' to toggle the most-recent view. * Press 'g' to toggle nestedness. * Press 'a' to view all windows in the list. * Press '/' to search in the list. * Press ',' and '.' to re-order windows in the list. * Press 'K' to kill a window (requires confirmation). Display List: * Press 'd' to detach a display, 'D' to power-detach. Others: * Start using 'ChangeLog' for logging changes again. * Terminfo update for 256-color support. * Multiple input history (partially from Romain Francoise). * vi-like fFtT;, searching in copy mode. * In copy mode, search in reverse direction when 'N' is pressed. * Tab-completion for command input. * Some more readline-like bindings in input mode (e.g. ^W, ^D, ^P, ^N etc.) * Fix displaying unicode characters in the caption/hardstatus on UTF8 locale. * A revamped displays list (for 'displays' command) * Increased default maximum number of windows from 40 to 100. * Increased number color/attribute changes in caption/hardstatus string from 16 to 256. * Some commands can be remotely queried using the -Q command-line flag. In-Progress: * Scripting support (thanks to Google Summer of Code 2009 project by Rui Guo) @ text @d1 1 a1 1 $NetBSD: patch-al,v 1.2 2003/12/01 15:18:27 ben Exp $ d8 2 a9 2 +++ utmp.c 2014-08-25 17:55:13.000000000 +0000 @@@@ -48,6 +48,12 @@@@ d22 1 a22 1 @@@@ -315,6 +321,9 @@@@ d32 1 a32 1 @@@@ -379,6 +388,9 @@@@ @ 1.2 log @On sparc64 when I used the "w" command, the screen logins had absurdly large login and idle times. This was due to a bug in utmp.c: in os.h ------- # define utmp utmpx # define ut_time ut_xtime in utmp.c::makeuser() --------------------- struct utmp *u; (void)time((time_t *)&u->ut_time); The above works fine on i386 where ut_xtime and time_t are the same size, but on sparc64 ut_xtime is 8 bytes rather than 4. This fix was tested on i386 and sparc64. @ text @d1 1 a1 1 $NetBSD: patch-al,v 1.1 2002/09/15 06:51:39 kim Exp $ d7 3 a9 3 --- utmp.c.orig Tue Jan 8 10:44:37 2002 +++ utmp.c Sun Sep 15 02:36:15 2002 @@@@ -47,6 +47,12 @@@@ d22 1 a22 1 @@@@ -314,6 +320,9 @@@@ d32 1 a32 1 @@@@ -378,6 +387,9 @@@@ a41 18 @@@@ -604,6 +616,7 @@@@ char *line, *user; int pid; { + time_t temp; u->ut_type = USER_PROCESS; strncpy(u->ut_user, user, sizeof(u->ut_user)); /* Now the tricky part... guess ut_id */ @@@@ -618,7 +631,8 @@@@ #endif /* sgi */ strncpy(u->ut_line, line, sizeof(u->ut_line)); u->ut_pid = pid; - (void)time((time_t *)&u->ut_time); + (void)time(&temp); + u->ut_time = temp; } static slot_t @ 1.1 log @Handle utmpx on NetBSD-current. @ text @d1 1 a1 1 $NetBSD$ d42 18 @