diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-05-11 15:48:13 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-05-11 15:48:13 +0400 |
commit | 25399d502ec5733044f4975e819994ee231e982f (patch) | |
tree | 2e1a26e5082912c2c627acdd2e865bbcb19050e1 | |
parent | 13a4d5f1001b28e1bf5db42d67c99d158fc28cc7 (diff) | |
parent | 3fa7de8dc211d403899ed68b0f5b4ec0b62301a1 (diff) | |
download | screen-25399d502ec5733044f4975e819994ee231e982f.tar.gz |
Merge branch 'master' of git://anonscm.debian.org/collab-maint/screen
Conflicts:
debian/changelog
debian/control
debian/rules
51 files changed, 895 insertions, 362 deletions
@@ -455,6 +455,16 @@ int recursive; return gp; /* *gp is NULL */ } +static int +PasswordMatches(pw, password) +const char *pw, *password; +{ + if (!*password) + return 0; + char *buf = crypt((char *)pw, (char *)password); + return (buf && !strcmp(buf, password)); +} + /* * Returns nonzero if failed or already linked. * Both users are created on demand. @@ -544,8 +554,7 @@ char *name, *pw1, *pw2; if (pw2 && *pw2 && *pw2 != '\377') /* provided a system password */ { - if (!*pass || /* but needed none */ - strcmp(crypt(pw2, pass), pass)) + if (!PasswordMatches(pw2, pass)) { debug("System password mismatch\n"); sorry++; @@ -554,11 +563,10 @@ char *name, *pw1, *pw2; else /* no pasword provided */ if (*pass) /* but need one */ sorry++; -#endif +#endif /* CHECKLOGIN */ if (pw1 && *pw1 && *pw1 != '\377') /* provided a screen password */ { - if (!*u->u_password || /* but needed none */ - strcmp(crypt(pw1, u->u_password), u->u_password)) + if (!PasswordMatches(pw1, u->u_password)) { debug("screen password mismatch\n"); sorry++; @@ -683,6 +683,7 @@ register int len; mc.image = c; mc.mbcs = 0; mc.font = '0'; + mc.fontx = 0; mcp = recode_mchar(&mc, 0, UTF8); debug2("%02x %02x\n", mcp->image, mcp->font); c = mcp->image | mcp->font << 8; @@ -708,7 +709,7 @@ register int len; if (oy < 0) oy = 0; copy_mline2mchar(&omc, &curr->w_mlines[oy], ox); - if (omc.image == 0xff && omc.font == 0xff) + if (omc.image == 0xff && omc.font == 0xff && omc.fontx == 0) { ox--; if (ox >= 0) @@ -839,7 +840,10 @@ register int len; curr->w_rend.image = c; #ifdef UTF8 if (curr->w_encoding == UTF8) - curr->w_rend.font = c >> 8; + { + curr->w_rend.font = c >> 8; + curr->w_rend.fontx = c >> 16; + } #endif #ifdef DW_CHARS curr->w_rend.mbcs = curr->w_mbcs; @@ -2378,10 +2382,18 @@ struct mchar *mc; ml->font = null; p->w_FontL = p->w_charsets[p->w_ss ? p->w_ss : p->w_Charset] = 0; p->w_FontR = p->w_charsets[p->w_ss ? p->w_ss : p->w_CharsetR] = 0; - mc->font = p->w_rend.font = 0; + mc->font = mc->fontx = p->w_rend.font = 0; WMsg(p, 0, "Warning: no space for font - turned off"); } } + if (mc->fontx && ml->fontx == null) + { + if ((ml->fontx = (unsigned char *)calloc(p->w_width + 1, 1)) == 0) + { + ml->fontx = null; + mc->fontx = 0; + } + } #endif #ifdef COLOR if (mc->color && ml->color == null) @@ -2519,6 +2531,9 @@ int n, ys, ye, bce; if (ml->font != null) free(ml->font); ml->font = null; + if (ml->fontx != null) + free(ml->fontx); + ml->fontx = null; #endif #ifdef COLOR if (ml->color != null) @@ -2564,6 +2579,9 @@ int n, ys, ye, bce; if (ml->font != null) free(ml->font); ml->font = null; + if (ml->fontx != null) + free(ml->fontx); + ml->fontx = null; #endif #ifdef COLOR if (ml->color != null) @@ -2680,7 +2698,10 @@ int x, y; if (p->w_encoding != UTF8) ml->font[x + 1] |= 0x80; else if (p->w_encoding == UTF8 && c->mbcs) - ml->font[x + 1] = c->mbcs; + { + ml->font[x + 1] = c->mbcs; + ml->fontx[x + 1] = 0; + } # else ml->font[x + 1] |= 0x80; # endif @@ -2711,7 +2732,10 @@ int x, y; if (p->w_encoding != UTF8) ml->font[x + 1] |= 0x80; else if (p->w_encoding == UTF8 && c->mbcs) - ml->font[x + 1] = c->mbcs; + { + ml->font[x + 1] = c->mbcs; + ml->fontx[x + 1] = 0; + } # else ml->font[x + 1] |= 0x80; # endif @@ -2767,22 +2791,40 @@ int x, y; MKillDwRight(p, ml, x); MKillDwLeft(p, ml, x + n - 1); bcopy(s, (char *)ml->image + x, n); - b = ml->attr + x; - for (i = n; i-- > 0;) - *b++ = r->attr; + if (ml->attr != null) + { + b = ml->attr + x; + for (i = n; i-- > 0;) + *b++ = r->attr; + } #ifdef FONT - b = ml->font + x; - for (i = n; i-- > 0;) - *b++ = r->font; + if (ml->font != null) + { + b = ml->font + x; + for (i = n; i-- > 0;) + *b++ = r->font; + } + if (ml->fontx != null) + { + b = ml->fontx + x; + for (i = n; i-- > 0;) + *b++ = r->fontx; + } #endif #ifdef COLOR - b = ml->color + x; - for (i = n; i-- > 0;) - *b++ = r->color; + if (ml->color != null) + { + b = ml->color + x; + for (i = n; i-- > 0;) + *b++ = r->color; + } # ifdef COLORS256 - b = ml->colorx + x; - for (i = n; i-- > 0;) - *b++ = r->colorx; + if (ml->colorx != null) + { + b = ml->colorx + x; + for (i = n; i-- > 0;) + *b++ = r->colorx; + } # endif #endif } @@ -2840,6 +2882,9 @@ struct mline *ml; q = ml->font; o = hml->font; hml->font = q; ml->font = null; if (o != null) free(o); + q = ml->fontx; o = hml->fontx; hml->fontx = q; ml->fontx = null; + if (o != null) + free(o); #endif #ifdef COLOR @@ -2881,6 +2926,15 @@ int ys, ye; break; # endif #endif +#ifdef UTF8 + if (p->w_encoding == UTF8) + { + if (ml->font != null && bcmp((char*)ml->font, null, p->w_width)) + break; + if (ml->fontx != null && bcmp((char*)ml->fontx, null, p->w_width)) + break; + } +#endif } debug1("MFindUsedLine returning %d\n", y); return y; @@ -882,6 +882,12 @@ screen_builtin_lck() salt[1] = 'A' + (int)((time(0) >> 6) % 26); salt[2] = 0; pass = crypt(mypass, salt); + if (!pass) + { + fprintf(stderr, "crypt() error.\007\n"); + sleep(2); + return; + } pass = ppp->pw_passwd = SaveStr(pass); } #endif @@ -924,7 +930,8 @@ screen_builtin_lck() if (pam_error == PAM_SUCCESS) break; #else - if (!strncmp(crypt(cp1, pass), pass, strlen(pass))) + char *buf = crypt(cp1, pass); + if (buf && !strncmp(buf, pass, strlen(pass))) break; #endif debug("screen_builtin_lck: NO!!!!!\n"); @@ -80,6 +80,7 @@ $AWK < ${srcdir}/comm.c >> comm.h ' old = $2; } ' + $CC -E -I. -I${srcdir} ${srcdir}/comm.c > comm.cpp sed < comm.cpp \ -n \ diff --git a/debian/NEWS b/debian/NEWS index c7fc86b..c6e3d64 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,3 +1,19 @@ +screen (4.1.0~20120320gitdb59704-10) unstable; urgency=medium + + On systems running systemd, the management of /var/run/screen previously + handled by /etc/init.d/screen-cleanup now occurs via systemd-tmpfiles and + /usr/lib/tmpfiles.d/screen-cleanup.conf. The installed version of that + file works for systems with the default screen permissions; if you override + the permissions of /usr/bin/screen with dpkg-statoverride as documented in + /usr/share/doc/screen/README.Debian, you should create an overriding file + /etc/tmpfiles.d/screen-cleanup.conf setting the corresponding permissions. + See /usr/share/doc/screen/README.Debian for details. + + If you have already overridden the permissions of /usr/bin/screen, an + /etc/tmpfiles.d/screen-cleanup.conf has been created for you. + + -- Axel Beckert <abe@debian.org> Fri, 28 Feb 2014 12:23:42 +0100 + screen (4.1.0~20120320gitdb59704-7) unstable; urgency=low In case you upgrade screen from 4.0.3 to 4.1.0 while running inside diff --git a/debian/README.Debian b/debian/README.Debian index 35f12d3..1dab9f0 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -25,9 +25,10 @@ A: Simplified, the binary ensures that $SCREENDIR has just enough permission /usr/bin/screen setgid utmp -> /var/run/screen 0775 /usr/bin/screen without setid bits -> /var/run/screen 0777 - These cases are all handled by the init script. However, the actual test - is a bit more complicated. And as the variable names are all quite self- - explanatory, just have a look at the C code itself: + These cases are all handled by the init script or by the tmpfiles.d + configuration documented later in this file. However, the actual test is a + bit more complicated. And as the variable names are all quite + self-explanatory, just have a look at the C code itself: ] n = (eff_uid == 0 && (real_uid || (st.st_mode & 0775) != 0775)) ? 0755 : ] (eff_gid == (int)st.st_gid && eff_gid != real_gid) ? 0775 : @@ -37,7 +38,7 @@ A: Simplified, the binary ensures that $SCREENDIR has just enough permission If the invoking user has primary group utmp, the above assumption will fail. The same holds if the underlying file system is mounted 'nosuid'. In these - cases you have to adapt the init script yourself. + cases you have to adapt the init script or tmpfiles.d configuration yourself. Q: shift+page up in xterm/gnome-terminal/konsole used to let me scroll back a @@ -109,8 +110,28 @@ A: Screen has to be setuid root to accomplish this. (Note the security implicati ] dpkg-statoverride --update --add root utmp 4755 /usr/bin/screen ] chmod 0755 /var/run/screen +] echo 'd /var/run/screen 0755 root utmp' > /etc/tmpfiles.d/screen-cleanup.conf dpkg-statoverride will make sure that the modified permissions remain in effect even if a new version of the screen package is installed. /var/run/screen will be automatically recreated with the proper permissions if the directory lives on volatile storage (doesn't persist between subsequent reboots). + + +Q: I don't want screen to be setuid *or* setgid - how do I disable that? + +A: As above, via dpkg-statoverride: + +] dpkg-statoverride --update --add root utmp 0755 /usr/bin/screen +] chmod 1777 /var/run/screen +] echo 'd /var/run/screen 1777 root utmp' > /etc/tmpfiles.d/screen-cleanup.conf + + +Q: I've configured screen with different permissions, but I want to go back to + the default setgid configuration - how can I do that? + +A: + +] dpkg-statoverride --remove /usr/bin/screen +] chmod 0775 /var/run/screen +] rm /etc/tmpfiles.d/screen-cleanup.conf diff --git a/debian/changelog b/debian/changelog index d0771f7..0984111 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,88 @@ +screen (4.2.0-2) unstable; urgency=low + + * Upload to unstable + + -- Axel Beckert <abe@debian.org> Mon, 28 Apr 2014 02:32:48 +0200 + +screen (4.2.0-1) experimental; urgency=low + + * New upstream release + Refreshed patches: + + 10norootpassword.patch + + 11replace_doc_paths.patch + + 14size_matters.patch + + 16fix_gcc_warnings.patch + + 46fix-keybinding-typo-in-manpage.patch + + 47screen-cc.patch + + 48screen-ipv6.patch + + 51fix-utf8-status-padding-bug.patch + + 59-fix-manpage-warnings.patch + + -- Axel Beckert <abe@debian.org> Thu, 17 Apr 2014 15:09:54 +0200 + +screen (4.1.0~20120320gitdb59704-10) unstable; urgency=medium + + * Extend 49long-usernames.patch to also cover multiuser usage (Closes: + #735554) Thanks Martin von Wittich! + * Add systemd variant of /etc/init.d/screen-cleanup (Closes: #740301) + + Update README.Debian and NEWS.Debian accordingly + + Bump versioned debhelper build-dependency to 9.20130504 to ensure + systemd support in dh_installinit. + Thanks Josh Triplett for help and patches! + * Add a debian/upstream/metadata file according to DEP-12. + * Bump Standards-Version to 3.9.5 (no changes). + * debian/watch: + + Update to use GNU's and Savannah's servers (old location at + uni-erlangen.de no more exist) + + Check upstream GPG signature and add upstream signing key as + debian/upstream/signing-key.asc + + -- Axel Beckert <abe@debian.org> Thu, 17 Apr 2014 11:45:17 +0200 + +screen (4.1.0~20120320gitdb59704-9) unstable; urgency=low + + * Build-Conflict against libelf-dev on non-linux (Closes: #684386) + * Allow /dev/console to be a symlink. (Closes: #701173) Thanks to Igor + Pashev for the report and patch. + * screen-cleanup init.d script: Label /var/run/screen for SE Linux + (Closes: #680360) + * Add a package with debugging symbols (Closes: #715170) + * Ensure that the title prompt can only appear once. (Closes: #625866) + * No more pass --update-rcd-params='start 70 S .' to dh_installinit. The + LSB headers of the init script already contain all necesssary + information. (Closes: #717553) + * Expand 50increase-max-TERM-length.patch to also allow larger terminal + type names when using the "term" command interactively from inside + screen or from .screenrc. (Closes: #491812) + + -- Axel Beckert <abe@debian.org> Mon, 22 Jul 2013 21:37:24 +0200 + +screen (4.1.0~20120320gitdb59704-8) unstable; urgency=low + + * Update debian/patches/13split_info_files.patch to change now ambiguous + makeinfo option --split to --split-size. Fixes FTBFS with texinfo 5.x. + (Closes: #707530) + * Use doc/screen.info* instead of listing every file individually in + debian/info. + * Bump debhelper compatibility to 9 + + Update versioned debhelper build-dependency + * Revamp debian/rules + + Use dh_auto_{configure,build} + + Drop DPKG_EXPORT_BUILDFLAGS and /usr/share/dpkg/buildflags.mk + + Drop manual DEB_BUILD_OPTIONS parsing + + Use debian/clean instead of dh_clean parameters and add some more + files to clean up + + Use dh_install and debian/install instead of install and cp + + Simplify variable usage + + Fix dh_clean vs dh_prep in install target + + No more ignore dh_installman errors + + Finally switch to a dh7 style debian/rules file + * Bump Standards-Version to 3.9.4 (no changes) + * Apply wrap-and-sort. + * Fix lintian warning package-contains-info-dir-file + + -- Axel Beckert <abe@debian.org> Mon, 20 May 2013 17:04:14 +0200 + screen (4.1.0~20120320gitdb59704-7+dyson3) unstable; urgency=low * Added solaris-push-check.patch diff --git a/debian/clean b/debian/clean new file mode 100644 index 0000000..e0a3db6 --- /dev/null +++ b/debian/clean @@ -0,0 +1,12 @@ +config.log +config.status +Makefile +*.o +comm.h +config.h +doc/Makefile +kmapdef.c +osdef.h +screen +term.h +tty.c diff --git a/debian/compat b/debian/compat index 7f8f011..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -7 +9 diff --git a/debian/control b/debian/control index 7279fa6..68bffa3 100644 --- a/debian/control +++ b/debian/control @@ -3,16 +3,23 @@ Section: misc Priority: optional Maintainer: Axel Beckert <abe@debian.org> Uploaders: Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de> -Standards-Version: 3.9.3 -Build-Depends: libncursesw5-dev, texinfo, libpam0g-dev, debhelper (>> 7), dh-autoreconf, dpkg-dev (>= 1.16.1~), - libkstat-dev [illumos-any], dh-smf [illumos-any] +Standards-Version: 3.9.5 +Build-Depends: debhelper (>= 9.20130504~), + dh-autoreconf, + dpkg-dev (>= 1.16.1~), + libncursesw5-dev, + libpam0g-dev, + libkstat-dev [illumos-any], + dh-smf [illumos-any], + texinfo +Build-Conflicts: libelf-dev [!linux-any] Homepage: http://savannah.gnu.org/projects/screen Vcs-Git: git://anonscm.debian.org/collab-maint/screen.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/screen.git Package: screen Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} Suggests: iselect (>= 1.4.0-1) | screenie | byobu Description: terminal multiplexer with VT100/ANSI terminal emulation GNU Screen is a terminal multiplexer that runs several separate "screens" on @@ -23,3 +30,15 @@ Description: terminal multiplexer with VT100/ANSI terminal emulation Screen also supports a whole slew of other features, including configurable input and output translation, serial port support, configurable logging, and multi-user support. + +Package: screen-dbg +Section: debug +Architecture: any +Priority: extra +Depends: screen (= ${binary:Version}), + ${misc:Depends} +Description: Debugging symbols for GNU Screen + GNU Screen is a terminal multiplexer that runs several separate "screens" on + a single physical character-based terminal. + . + This package contains the debugging symbols for GNU Screen. diff --git a/debian/copyright b/debian/copyright index 97a1a9a..88e1991 100644 --- a/debian/copyright +++ b/debian/copyright @@ -38,4 +38,4 @@ Debian Modifications: Copyright (C) 2001-2003 Adam Lazur <zal@debian.org> Copyright (C) 2007-2009 Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de> Copyright (C) 2011 Brian Kroth <bpkroth@gmail.com> - Copyright (C) 2011 Axel Beckert <abe@debian.org> + Copyright (C) 2011-2013 Axel Beckert <abe@debian.org> diff --git a/debian/dirs b/debian/dirs index ee19d5d..87a8d31 100644 --- a/debian/dirs +++ b/debian/dirs @@ -1 +1,2 @@ etc +etc/tmpfiles.d diff --git a/debian/info b/debian/info index 8ba9364..7761859 100644 --- a/debian/info +++ b/debian/info @@ -1,7 +1 @@ -doc/screen.info -doc/screen.info-1 -doc/screen.info-2 -doc/screen.info-3 -doc/screen.info-4 -doc/screen.info-5 -doc/screen.info-6 +doc/screen.info* diff --git a/debian/init b/debian/init index 6a94fb4..19c5511 100644 --- a/debian/init +++ b/debian/init @@ -27,6 +27,7 @@ start) rm -f $SCREENDIR mkdir $SCREENDIR chown root:utmp $SCREENDIR + [ -x /sbin/restorecon ] && /sbin/restorecon $SCREENDIR fi find $SCREENDIR -type p -delete # If the local admin has used dpkg-statoverride to install the screen diff --git a/debian/install b/debian/install new file mode 100644 index 0000000..34e5e10 --- /dev/null +++ b/debian/install @@ -0,0 +1,2 @@ +debian/screenrc etc/ +debian/README.terminfo usr/share/doc/screen/terminfo/ diff --git a/debian/links b/debian/links new file mode 100644 index 0000000..7f3ff0e --- /dev/null +++ b/debian/links @@ -0,0 +1 @@ +dev/null lib/systemd/system/screen-cleanup.service diff --git a/debian/patches/10norootpassword.patch b/debian/patches/10norootpassword.patch index fa24c8f..33acad4 100644 --- a/debian/patches/10norootpassword.patch +++ b/debian/patches/10norootpassword.patch @@ -4,8 +4,8 @@ password set. If not, ask for an unlocking key. See https://bugs.launchpad.net/bugs/6760 Index: screen/attacher.c =================================================================== ---- screen.orig/attacher.c 2011-10-08 19:54:22.000000000 +0200 -+++ screen/attacher.c 2011-10-08 19:58:12.000000000 +0200 +--- screen.orig/attacher.c 2014-04-17 14:18:51.212368190 +0200 ++++ screen/attacher.c 2014-04-17 14:18:51.204368735 +0200 @@ -847,11 +847,15 @@ #ifdef USE_PAM pam_handle_t *pamh = 0; @@ -25,8 +25,8 @@ Index: screen/attacher.c pass = ppp->pw_passwd; if (pass == 0 || *pass == 0) { -@@ -884,6 +888,8 @@ - pass = crypt(mypass, salt); +@@ -890,6 +894,8 @@ + } pass = ppp->pw_passwd = SaveStr(pass); } +#ifdef USE_PAM @@ -34,7 +34,7 @@ Index: screen/attacher.c #endif debug("screen_builtin_lck looking in gcos field\n"); -@@ -913,6 +919,8 @@ +@@ -919,6 +925,8 @@ AttacherFinit(SIGARG); /* NOTREACHED */ } @@ -43,18 +43,20 @@ Index: screen/attacher.c #ifdef USE_PAM PAM_conversation.appdata_ptr = cp1; pam_error = pam_start("screen", ppp->pw_name, &PAM_conversation, &pamh); -@@ -923,10 +931,13 @@ +@@ -929,11 +937,14 @@ PAM_conversation.appdata_ptr = 0; if (pam_error == PAM_SUCCESS) break; -#else -- if (!strncmp(crypt(cp1, pass), pass, strlen(pass))) +- char *buf = crypt(cp1, pass); +- if (buf && !strncmp(buf, pass, strlen(pass))) - break; #endif + } + else + { -+ if (!strncmp(crypt(cp1, pass), pass, strlen(pass))) ++ char *buf = crypt(cp1, pass); ++ if (buf && !strncmp(buf, pass, strlen(pass))) + break; + } debug("screen_builtin_lck: NO!!!!!\n"); diff --git a/debian/patches/11replace_doc_paths.patch b/debian/patches/11replace_doc_paths.patch index eee2d47..b3e2ad0 100644 --- a/debian/patches/11replace_doc_paths.patch +++ b/debian/patches/11replace_doc_paths.patch @@ -3,8 +3,8 @@ Description: Fix the references to configuration and pipe paths to match the locations Debian uses. Index: screen/doc/screen.1 =================================================================== ---- screen.orig/doc/screen.1 2012-03-20 22:34:27.000000000 +0100 -+++ screen/doc/screen.1 2012-03-20 22:35:03.000000000 +0100 +--- screen.orig/doc/screen.1 2014-04-17 14:19:01.303692035 +0200 ++++ screen/doc/screen.1 2014-04-17 14:19:01.287693091 +0200 @@ -101,7 +101,7 @@ the invoking shell to the application (emacs in this case), because it is forked from the parent screen process, not from the invoking shell. @@ -23,7 +23,7 @@ Index: screen/doc/screen.1 This can also be defined through the \*Qdeflogin\*U .screenrc command. .TP 5 .BR \-ls " [" \fImatch ] -@@ -620,7 +620,7 @@ +@@ -622,7 +622,7 @@ .SH CUSTOMIZATION The \*Qsocket directory\*U defaults either to $HOME/.screen or simply to @@ -32,7 +32,7 @@ Index: screen/doc/screen.1 .I screen is installed setuid-root, then the administrator should compile -@@ -633,7 +633,7 @@ +@@ -635,7 +635,7 @@ When .I screen is invoked, it executes initialization commands from the files @@ -41,7 +41,7 @@ Index: screen/doc/screen.1 \*Q.screenrc\*U in the user's home directory. These are the \*Qprogrammer's defaults\*U that can be overridden in the following ways: for the global screenrc file -@@ -1835,7 +1835,7 @@ +@@ -1837,7 +1837,7 @@ The echo command may be used to annoy .I screen users with a 'message of the @@ -50,7 +50,7 @@ Index: screen/doc/screen.1 The option \*Q-n\*U may be used to suppress the line feed. See also \*Qsleep\*U. Echo is also useful for online checking of environment variables. -@@ -4844,14 +4844,14 @@ +@@ -4846,14 +4846,14 @@ .I screen distribution package for private and global initialization files. .IP $SYSSCREENRC @@ -68,7 +68,7 @@ Index: screen/doc/screen.1 Socket directories (default) .IP /usr/tmp/screens/S-<login> Alternate socket directories. -@@ -4870,7 +4870,7 @@ +@@ -4872,7 +4872,7 @@ or .IP /etc/termcap Terminal capability databases @@ -77,7 +77,7 @@ Index: screen/doc/screen.1 Login records .IP $LOCKPRG Program that locks a terminal. -@@ -4992,9 +4992,9 @@ +@@ -4994,9 +4994,9 @@ must be installed as set-uid with owner root on most systems in order to be able to correctly change the owner of the tty device file for each window. @@ -91,8 +91,8 @@ Index: screen/doc/screen.1 This will cause some programs (like "w" or "rwho") Index: screen/doc/screen.texinfo =================================================================== ---- screen.orig/doc/screen.texinfo 2012-03-20 22:34:27.000000000 +0100 -+++ screen/doc/screen.texinfo 2012-03-20 22:35:03.000000000 +0100 +--- screen.orig/doc/screen.texinfo 2014-04-17 14:19:01.303692035 +0200 ++++ screen/doc/screen.texinfo 2014-04-17 14:19:01.295692566 +0200 @@ -182,7 +182,7 @@ the invoking shell to the application (emacs in this case), because it is forked from the parent screen process, not from the invoking shell. @@ -111,7 +111,7 @@ Index: screen/doc/screen.texinfo is equivalent to the @code{deflogin} command (@pxref{Login}). @item -ls [@var{match}] -@@ -485,7 +485,7 @@ +@@ -486,7 +486,7 @@ @cindex screenrc When @code{screen} is invoked, it executes initialization commands from the files @file{.screenrc} in the user's home directory and @@ -120,7 +120,7 @@ Index: screen/doc/screen.texinfo following ways: For the global screenrc file @code{screen} searches for the environment variable @code{$SYSSCREENRC} (this override feature may be disabled at -@@ -1069,7 +1069,7 @@ +@@ -1070,7 +1070,7 @@ @item logfile @var{filename} Place where to collect logfiles. @xref{Log}. @item login [@var{state}] @@ -129,7 +129,7 @@ Index: screen/doc/screen.texinfo @item logtstamp [@var{state}] Configure logfile time-stamps. @xref{Log}. @item mapdefault -@@ -2318,7 +2318,7 @@ +@@ -2319,7 +2319,7 @@ * Naming Windows:: Control the name of the window * Console:: See the host's console messages * Kill:: Destroy an unwanted window @@ -138,7 +138,7 @@ Index: screen/doc/screen.texinfo * Mode:: Control the file mode of the pty * Monitor:: Watch for activity or inactivity in a window * Windows:: List the active windows -@@ -2527,7 +2527,7 @@ +@@ -2528,7 +2528,7 @@ @kindex L @deffn Command login [state] (@kbd{C-a L})@* @@ -147,7 +147,7 @@ Index: screen/doc/screen.texinfo This controls whether or not the window is @dfn{logged in}. In addition to this toggle, it is convenient to have ``log in'' and ``log out'' keys. For instance, @code{bind I login on} and @code{bind O -@@ -5670,17 +5670,17 @@ +@@ -5671,17 +5671,17 @@ global initialization files. @item @code{$SYSSCREENRC} @@ -168,7 +168,7 @@ Index: screen/doc/screen.texinfo Socket directories (default) @item /usr/tmp/screens/S-@var{login} -@@ -5703,7 +5703,7 @@ +@@ -5704,7 +5704,7 @@ @itemx /etc/termcap Terminal capability databases @@ -177,7 +177,7 @@ Index: screen/doc/screen.texinfo Login records @item @code{$LOCKPRG} -@@ -5809,10 +5809,10 @@ +@@ -5810,10 +5810,10 @@ in order to be able to correctly change the owner of the tty device file for each window. Special permission may also be required to write the file @@ -190,7 +190,7 @@ Index: screen/doc/screen.texinfo with SIGKILL. This will cause some programs (like "w" or "rwho") to advertise that a user is logged on who really isn't. -@@ -5893,7 +5893,7 @@ +@@ -5894,7 +5894,7 @@ @cindex socket directory The socket directory defaults either to @file{$HOME/.screen} or simply to diff --git a/debian/patches/13split_info_files.patch b/debian/patches/13split_info_files.patch index 9944796..55bab19 100644 --- a/debian/patches/13split_info_files.patch +++ b/debian/patches/13split_info_files.patch @@ -1,6 +1,8 @@ Author: <hesso@pool.math.tu-berlin.de> -Description: Split the info files at 50k to match the distribution style -of the orig tarball. +Description: Split the info files at 50k + This matches the distribution style of the orig tarball. +Last-Revised: 2013-05-16 by Axel Beckert <abe@debian.org> + --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -28,7 +28,7 @@ @@ -8,7 +10,7 @@ of the orig tarball. info screen.info: screen.texinfo @rm -f screen.info* - $(MAKEINFO) $(srcdir)/screen.texinfo -o screen.info -+ $(MAKEINFO) --split 50000 $(srcdir)/screen.texinfo -o screen.info ++ $(MAKEINFO) --split-size=50000 $(srcdir)/screen.texinfo -o screen.info install: installdirs $(INSTALL_DATA) $(srcdir)/screen.1 $(DESTDIR)$(mandir)/man1/screen.1 diff --git a/debian/patches/14size_matters.patch b/debian/patches/14size_matters.patch index 0642291..b3a3d7d 100644 --- a/debian/patches/14size_matters.patch +++ b/debian/patches/14size_matters.patch @@ -3,8 +3,8 @@ Description: * Increase the MAXSTR macro to suit present-day needs. * Increase the maximum length of the input line buffer likewise. Index: screen/input.c =================================================================== ---- screen.orig/input.c 2012-03-20 22:34:27.000000000 +0100 -+++ screen/input.c 2012-03-20 22:35:13.000000000 +0100 +--- screen.orig/input.c 2014-04-17 14:19:10.747075706 +0200 ++++ screen/input.c 2014-04-17 14:19:10.731076736 +0200 @@ -43,7 +43,7 @@ struct inpline @@ -36,8 +36,8 @@ Index: screen/input.c maxlen = flayer->l_width - 1 - strlen(istr); Index: screen/process.c =================================================================== ---- screen.orig/process.c 2012-03-20 22:34:27.000000000 +0100 -+++ screen/process.c 2012-03-20 22:35:13.000000000 +0100 +--- screen.orig/process.c 2014-04-17 14:19:10.747075706 +0200 ++++ screen/process.c 2014-04-17 14:19:10.735076470 +0200 @@ -2097,7 +2097,7 @@ ChangeAKA(fore, *args, strlen(*args)); break; @@ -49,8 +49,8 @@ Index: screen/process.c s = *args; Index: screen/screen.h =================================================================== ---- screen.orig/screen.h 2012-03-20 22:34:27.000000000 +0100 -+++ screen/screen.h 2012-03-20 22:35:13.000000000 +0100 +--- screen.orig/screen.h 2014-04-17 14:19:10.747075706 +0200 ++++ screen/screen.h 2014-04-17 14:19:10.739076209 +0200 @@ -91,7 +91,7 @@ #define Ctrl(c) ((c)&037) @@ -62,9 +62,9 @@ Index: screen/screen.h #define MSGMINWAIT 1 Index: screen/window.c =================================================================== ---- screen.orig/window.c 2012-03-20 22:34:27.000000000 +0100 -+++ screen/window.c 2012-03-20 22:35:13.000000000 +0100 -@@ -2233,7 +2233,7 @@ +--- screen.orig/window.c 2014-04-17 14:19:10.747075706 +0200 ++++ screen/window.c 2014-04-17 14:19:10.739076209 +0200 +@@ -2237,7 +2237,7 @@ return; } flayer = &p->w_layer; diff --git a/debian/patches/16fix_gcc_warnings.patch b/debian/patches/16fix_gcc_warnings.patch index 0ef8b31..06fd700 100644 --- a/debian/patches/16fix_gcc_warnings.patch +++ b/debian/patches/16fix_gcc_warnings.patch @@ -2,8 +2,8 @@ Author: <hesso@pool.math.tu-berlin.de> Description: Get rid of several minor gcc warnings. Index: screen/attacher.c =================================================================== ---- screen.orig/attacher.c 2011-10-08 19:58:12.000000000 +0200 -+++ screen/attacher.c 2011-10-08 19:58:41.000000000 +0200 +--- screen.orig/attacher.c 2014-04-17 14:19:15.702758400 +0200 ++++ screen/attacher.c 2014-04-17 14:19:15.638762477 +0200 @@ -848,7 +848,7 @@ pam_handle_t *pamh = 0; int pam_error; @@ -15,9 +15,9 @@ Index: screen/attacher.c #ifdef USE_PAM Index: screen/layer.c =================================================================== ---- screen.orig/layer.c 2011-10-08 19:54:20.000000000 +0200 -+++ screen/layer.c 2011-10-08 19:58:41.000000000 +0200 -@@ -492,7 +492,7 @@ +--- screen.orig/layer.c 2014-04-17 14:19:15.702758400 +0200 ++++ screen/layer.c 2014-04-17 14:19:15.642762218 +0200 +@@ -493,7 +493,7 @@ void LClearLine(l, y, xs, xe, bce, ol) struct layer *l; diff --git a/debian/patches/46fix-keybinding-typo-in-manpage.patch b/debian/patches/46fix-keybinding-typo-in-manpage.patch index 3513776..34bc54a 100644 --- a/debian/patches/46fix-keybinding-typo-in-manpage.patch +++ b/debian/patches/46fix-keybinding-typo-in-manpage.patch @@ -6,18 +6,9 @@ backspace) (Closes: #541793) Index: screen/doc/screen.1 =================================================================== ---- screen.orig/doc/screen.1 2011-10-08 19:58:19.000000000 +0200 -+++ screen/doc/screen.1 2011-10-08 19:59:19.000000000 +0200 -@@ -512,7 +512,7 @@ - Show the number (and title) of the current window. - .IP "\fBC-a backspace\fP" - .PD 0 --.IP "\fBC-a h\fP" -+.IP "\fBC-a C-h\fP" - .IP "\fBC-a p\fP" - .IP "\fBC-a C-p\fP (prev)" - .PD -@@ -578,7 +578,7 @@ +--- screen.orig/doc/screen.1 2014-04-17 14:21:30.439417247 +0200 ++++ screen/doc/screen.1 2014-04-17 14:21:30.427417253 +0200 +@@ -580,7 +580,7 @@ Write out a \*Q.termcap\*U file. .IP "\fBC-a ?\fP (help)" Show key bindings. @@ -28,9 +19,9 @@ Index: screen/doc/screen.1 .IP "\fBC-a :\fP (colon)" Index: screen/doc/screen.texinfo =================================================================== ---- screen.orig/doc/screen.texinfo 2011-10-08 19:58:19.000000000 +0200 -+++ screen/doc/screen.texinfo 2011-10-08 19:59:19.000000000 +0200 -@@ -791,7 +791,7 @@ +--- screen.orig/doc/screen.texinfo 2014-04-17 14:21:30.439417247 +0200 ++++ screen/doc/screen.texinfo 2014-04-17 14:21:30.431417261 +0200 +@@ -792,7 +792,7 @@ (help)@* Show key bindings. @xref{Help}. @@ -39,7 +30,7 @@ Index: screen/doc/screen.texinfo (quit)@* Kill all windows and terminate @code{screen}. @xref{Quit}. -@@ -2031,13 +2031,10 @@ +@@ -2032,13 +2032,10 @@ @node Quit, , Suspend, Session Management @section Quit diff --git a/debian/patches/47screen-cc.patch b/debian/patches/47screen-cc.patch index a8f58e6..a8f8d3c 100644 --- a/debian/patches/47screen-cc.patch +++ b/debian/patches/47screen-cc.patch @@ -2,8 +2,8 @@ Author: <bpkroth@gmail.com> Description: Some patches stolen from the fedora package for better error checking and tty security. Index: screen/utmp.c =================================================================== ---- screen.orig/utmp.c 2011-10-08 19:54:17.000000000 +0200 -+++ screen/utmp.c 2011-10-08 19:59:23.000000000 +0200 +--- screen.orig/utmp.c 2014-04-17 14:21:36.843412125 +0200 ++++ screen/utmp.c 2014-04-17 14:21:36.815412195 +0200 @@ -361,7 +361,7 @@ char *tty; debug("couln't zap slot -> do mesg n\n"); @@ -42,8 +42,8 @@ Index: screen/utmp.c retbuf[0] = '\0'; Index: screen/extern.h =================================================================== ---- screen.orig/extern.h 2011-10-08 19:54:16.000000000 +0200 -+++ screen/extern.h 2011-10-08 19:59:23.000000000 +0200 +--- screen.orig/extern.h 2014-04-17 14:21:36.843412125 +0200 ++++ screen/extern.h 2014-04-17 14:21:36.819412181 +0200 @@ -110,6 +110,7 @@ extern struct baud_values *lookup_baud __P((int bps)); extern int SetBaud __P((struct mode *, int, int)); @@ -54,8 +54,8 @@ Index: screen/extern.h /* mark.c */ Index: screen/screen.c =================================================================== ---- screen.orig/screen.c 2011-10-08 19:58:56.000000000 +0200 -+++ screen/screen.c 2011-10-08 19:59:23.000000000 +0200 +--- screen.orig/screen.c 2014-04-17 14:21:36.843412125 +0200 ++++ screen/screen.c 2014-04-17 14:21:36.823412180 +0200 @@ -972,8 +972,13 @@ else \ attach_tty = ""; \ @@ -74,8 +74,8 @@ Index: screen/screen.c } while (0) Index: screen/tty.sh =================================================================== ---- screen.orig/tty.sh 2011-10-08 19:58:28.000000000 +0200 -+++ screen/tty.sh 2011-10-08 19:59:23.000000000 +0200 +--- screen.orig/tty.sh 2014-04-17 14:21:36.843412125 +0200 ++++ screen/tty.sh 2014-04-17 14:21:36.827412192 +0200 @@ -60,6 +60,7 @@ #include <sys/types.h> #include <signal.h> @@ -106,8 +106,8 @@ Index: screen/tty.sh */ Index: screen/socket.c =================================================================== ---- screen.orig/socket.c 2011-10-08 19:54:17.000000000 +0200 -+++ screen/socket.c 2011-10-08 19:59:23.000000000 +0200 +--- screen.orig/socket.c 2014-04-17 14:21:36.843412125 +0200 ++++ screen/socket.c 2014-04-17 14:21:36.827412192 +0200 @@ -722,6 +722,7 @@ char *args[MAXARGS]; register int n; @@ -126,8 +126,8 @@ Index: screen/socket.c if (IsNumColon(p, 10, buf, sizeof(buf))) Index: screen/braille_tsi.c =================================================================== ---- screen.orig/braille_tsi.c 2011-10-08 19:54:17.000000000 +0200 -+++ screen/braille_tsi.c 2011-10-08 19:59:23.000000000 +0200 +--- screen.orig/braille_tsi.c 2014-04-17 14:21:36.843412125 +0200 ++++ screen/braille_tsi.c 2014-04-17 14:21:36.831412183 +0200 @@ -127,7 +127,6 @@ r = read(bd.bd_fd,ibuf,1); if (r != 1) @@ -138,8 +138,8 @@ Index: screen/braille_tsi.c else Index: screen/fileio.c =================================================================== ---- screen.orig/fileio.c 2011-10-08 19:58:46.000000000 +0200 -+++ screen/fileio.c 2011-10-08 19:59:23.000000000 +0200 +--- screen.orig/fileio.c 2014-04-17 14:21:36.843412125 +0200 ++++ screen/fileio.c 2014-04-17 14:21:36.831412183 +0200 @@ -80,8 +80,6 @@ } else @@ -151,8 +151,8 @@ Index: screen/fileio.c cp[len1 + add_colon] = '\0'; Index: screen/attacher.c =================================================================== ---- screen.orig/attacher.c 2011-10-08 19:59:12.000000000 +0200 -+++ screen/attacher.c 2011-10-08 19:59:23.000000000 +0200 +--- screen.orig/attacher.c 2014-04-17 14:21:36.843412125 +0200 ++++ screen/attacher.c 2014-04-17 14:21:36.831412183 +0200 @@ -185,8 +185,8 @@ if (ret == SIG_POWER_BYE) { @@ -258,7 +258,7 @@ Index: screen/attacher.c #endif char *pass = 0, mypass[16 + 1], salt[3]; int using_pam = 1; -@@ -926,6 +941,15 @@ +@@ -932,6 +947,15 @@ pam_error = pam_start("screen", ppp->pw_name, &PAM_conversation, &pamh); if (pam_error != PAM_SUCCESS) AttacherFinit(SIGARG); /* goodbye */ diff --git a/debian/patches/48screen-ipv6.patch b/debian/patches/48screen-ipv6.patch index 36526cc..f632d93 100644 --- a/debian/patches/48screen-ipv6.patch +++ b/debian/patches/48screen-ipv6.patch @@ -2,12 +2,12 @@ Author: <bpkroth@gmail.com> Description: Some patches stolen from the fedora package for better error checking and tty security. Index: screen/doc/screen.1 =================================================================== ---- screen.orig/doc/screen.1 2012-03-20 22:41:10.000000000 +0100 -+++ screen/doc/screen.1 2012-03-20 22:41:13.000000000 +0100 -@@ -398,6 +398,12 @@ - the \fB-d\fP or \fB-r\fP option to tell screen to look only for - attached or detached screen sessions. Note that this command doesn't - work if the session is password protected. +--- screen.orig/doc/screen.1 2014-04-17 14:23:06.359089910 +0200 ++++ screen/doc/screen.1 2014-04-17 14:23:06.343089985 +0200 +@@ -400,6 +400,12 @@ + \fB-r\fP option to tell screen to look only for attached or + detached screen sessions. Note that this command doesn't work if + the session is password protected. +.TP 5 +.B \-4 +Resolve hostnames only to IPv4 addresses. @@ -19,8 +19,8 @@ Index: screen/doc/screen.1 .ta 12n 26n Index: screen/extern.h =================================================================== ---- screen.orig/extern.h 2012-03-20 22:41:12.000000000 +0100 -+++ screen/extern.h 2012-03-20 22:41:13.000000000 +0100 +--- screen.orig/extern.h 2014-04-17 14:23:06.359089910 +0200 ++++ screen/extern.h 2014-04-17 14:23:06.343089985 +0200 @@ -459,8 +459,7 @@ /* teln.c */ @@ -33,8 +33,8 @@ Index: screen/extern.h extern int DoTelnet __P((char *, int *, int)); Index: screen/help.c =================================================================== ---- screen.orig/help.c 2012-03-20 22:14:48.000000000 +0100 -+++ screen/help.c 2012-03-20 22:41:13.000000000 +0100 +--- screen.orig/help.c 2014-04-17 14:23:06.359089910 +0200 ++++ screen/help.c 2014-04-17 14:23:06.347089970 +0200 @@ -66,6 +66,10 @@ { printf("Use: %s [-opts] [cmd [args]]\n", myname); @@ -48,8 +48,8 @@ Index: screen/help.c printf("-c file Read configuration file instead of '.screenrc'.\n"); Index: screen/screen.c =================================================================== ---- screen.orig/screen.c 2012-03-20 22:41:12.000000000 +0100 -+++ screen/screen.c 2012-03-20 22:41:13.000000000 +0100 +--- screen.orig/screen.c 2014-04-17 14:23:06.359089910 +0200 ++++ screen/screen.c 2014-04-17 14:23:06.347089970 +0200 @@ -248,8 +248,9 @@ struct win *fore; struct win *windows; @@ -89,8 +89,8 @@ Index: screen/screen.c break; Index: screen/teln.c =================================================================== ---- screen.orig/teln.c 2012-03-20 22:14:48.000000000 +0100 -+++ screen/teln.c 2012-03-20 22:41:13.000000000 +0100 +--- screen.orig/teln.c 2014-04-17 14:23:06.359089910 +0200 ++++ screen/teln.c 2014-04-17 14:23:06.347089970 +0200 @@ -30,6 +30,7 @@ #include <sys/socket.h> #include <fcntl.h> @@ -271,9 +271,9 @@ Index: screen/teln.c int Index: screen/window.c =================================================================== ---- screen.orig/window.c 2012-03-20 22:35:13.000000000 +0100 -+++ screen/window.c 2012-03-20 22:41:13.000000000 +0100 -@@ -607,6 +607,13 @@ +--- screen.orig/window.c 2014-04-17 14:23:06.359089910 +0200 ++++ screen/window.c 2014-04-17 14:23:06.351089971 +0200 +@@ -611,6 +611,13 @@ n = pp - wtab; debug1("Makewin creating %d\n", n); @@ -287,7 +287,7 @@ Index: screen/window.c if ((f = OpenDevice(nwin.args, nwin.lflag, &type, &TtyName)) < 0) return -1; if (type == W_TYPE_GROUP) -@@ -768,7 +775,7 @@ +@@ -772,7 +779,7 @@ #ifdef BUILTIN_TELNET if (type == W_TYPE_TELNET) { @@ -296,7 +296,7 @@ Index: screen/window.c { FreeWindow(p); return -1; -@@ -880,6 +887,13 @@ +@@ -884,6 +891,13 @@ int lflag, f; lflag = nwin_default.lflag; @@ -310,7 +310,7 @@ Index: screen/window.c if ((f = OpenDevice(p->w_cmdargs, lflag, &p->w_type, &TtyName)) < 0) return -1; -@@ -913,7 +927,7 @@ +@@ -917,7 +931,7 @@ #ifdef BUILTIN_TELNET if (p->w_type == W_TYPE_TELNET) { @@ -319,7 +319,7 @@ Index: screen/window.c return -1; } else -@@ -1072,16 +1086,6 @@ +@@ -1076,16 +1090,6 @@ *namep = "telnet"; return 0; } @@ -338,8 +338,8 @@ Index: screen/window.c Msg(0, "Invalid argument '%s'", arg); Index: screen/window.h =================================================================== ---- screen.orig/window.h 2012-03-20 22:14:48.000000000 +0100 -+++ screen/window.h 2012-03-20 22:41:13.000000000 +0100 +--- screen.orig/window.h 2014-04-17 14:23:06.359089910 +0200 ++++ screen/window.h 2014-04-17 14:23:06.351089971 +0200 @@ -268,7 +268,7 @@ struct display *w_zdisplay; #endif diff --git a/debian/patches/49long-usernames.patch b/debian/patches/49long-usernames.patch index 58ce4f6..02a3a49 100644 --- a/debian/patches/49long-usernames.patch +++ b/debian/patches/49long-usernames.patch @@ -1,8 +1,10 @@ Description: Patch to allow usernames longer than 20 characters. Source: http://www.mail-archive.com/screen-devel@gnu.org/msg00186.html Author: Steve Kemp +Author: Martin von Wittich <martin.von.wittich@iserv.eu> Upstream-Bug: http://savannah.gnu.org/bugs/?21653 Debian-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560231 +Debian-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735554 Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/screen/+bug/582153 Index: screen/acconfig.h @@ -62,9 +64,9 @@ Index: screen/acls.h int u_detachwin; /* the window where he last detached */ Index: screen/screen.c =================================================================== ---- screen.orig/screen.c 2011-10-08 21:20:56.000000000 +0200 -+++ screen/screen.c 2011-10-08 21:20:57.000000000 +0200 -@@ -997,7 +997,7 @@ +--- screen.orig/screen.c 2014-01-16 22:13:09.000000000 +0100 ++++ screen/screen.c 2014-01-16 22:15:00.000000000 +0100 +@@ -997,10 +997,10 @@ if (home == 0 || *home == '\0') home = ppp->pw_dir; @@ -72,7 +74,11 @@ Index: screen/screen.c + if (strlen(LoginName) > MAX_USERNAME_LEN) Panic(0, "LoginName too long - sorry."); #ifdef MULTIUSER - if (multi && strlen(multi) > 20) +- if (multi && strlen(multi) > 20) ++ if (multi && strlen(multi) > MAX_USERNAME_LEN) + Panic(0, "Screen owner name too long - sorry."); + #endif + if (strlen(home) > MAXPATHLEN - 25) Index: screen/screen.h =================================================================== --- screen.orig/screen.h 2011-10-08 21:20:48.000000000 +0200 diff --git a/debian/patches/50increase-max-TERM-length.patch b/debian/patches/50increase-max-TERM-length.patch index 5a138b7..fb32064 100644 --- a/debian/patches/50increase-max-TERM-length.patch +++ b/debian/patches/50increase-max-TERM-length.patch @@ -2,6 +2,7 @@ From: Andy Spencer Subject: [screen-devel] [PATCH 1/1] Increase max TERM length to 40 characters Date: Tue, 5 Apr 2011 03:26:58 +0000 Source: https://lists.gnu.org/archive/html/screen-devel/2011-04/msg00002.html +Debian-Bugs: 630976 621804 Some terms contain rather long TERM names these days, for example, `rxvt-unicode-256color'. Increasing the max size for the TERM variables @@ -38,3 +39,19 @@ Index: screen/screen.h int encoding; /* encoding of display */ int detachfirst; /* whether to detach remote sessions first */ } +Index: screen/process.c +=================================================================== +--- screen.orig/process.c 2013-07-22 16:56:05.000000000 +0200 ++++ screen/process.c 2013-07-22 17:02:15.000000000 +0200 +@@ -2664,9 +2664,9 @@ + s = NULL; + if (ParseSaveStr(act, &s)) + break; +- if (strlen(s) >= 20) ++ if (strlen(s) >= 40) + { +- OutputMsg(0, "%s: term: argument too long ( < 20)", rc_name); ++ OutputMsg(0, "%s: term: argument too long ( < 40)", rc_name); + free(s); + break; + } diff --git a/debian/patches/51fix-utf8-status-padding-bug.patch b/debian/patches/51fix-utf8-status-padding-bug.patch index 0254492..a5c3da7 100644 --- a/debian/patches/51fix-utf8-status-padding-bug.patch +++ b/debian/patches/51fix-utf8-status-padding-bug.patch @@ -10,9 +10,9 @@ Signed-off-by: Dustin Kirkland <address@hidden> === modified file 'src/display.c' Index: screen/display.c =================================================================== ---- screen.orig/display.c 2012-03-20 22:15:02.000000000 +0100 -+++ screen/display.c 2012-03-20 22:41:28.000000000 +0100 -@@ -2155,7 +2155,7 @@ +--- screen.orig/display.c 2014-04-17 14:23:17.247036061 +0200 ++++ screen/display.c 2014-04-17 14:23:17.235036151 +0200 +@@ -2163,7 +2163,7 @@ { int chars = strlen_onscreen((unsigned char *)(s + start), (unsigned char *)(s + max)); D_encoding = 0; @@ -21,7 +21,7 @@ Index: screen/display.c D_encoding = UTF8; D_x -= (max - chars); /* Yak! But this is necessary to count for the fact that not every byte represents a -@@ -2249,11 +2249,15 @@ +@@ -2257,11 +2257,15 @@ RefreshHStatus() { char *buf; @@ -39,7 +39,7 @@ Index: screen/display.c if (buf && *buf) { ShowHStatus(buf); -@@ -2348,8 +2352,13 @@ +@@ -2356,8 +2360,13 @@ { if (y == cv->c_ye + 1 && from >= cv->c_xs && from <= cv->c_xe) { @@ -54,7 +54,7 @@ Index: screen/display.c if (cv->c_captev.timeout.tv_sec) evenq(&cv->c_captev); xx = to > cv->c_xe ? cv->c_xe : to; -@@ -2358,7 +2367,7 @@ +@@ -2366,7 +2375,7 @@ SetRendition(&mchar_so); if (l > xx - cv->c_xs + 1) l = xx - cv->c_xs + 1; diff --git a/debian/patches/59-fix-manpage-warnings.patch b/debian/patches/59-fix-manpage-warnings.patch index 24b10d2..8730608 100644 --- a/debian/patches/59-fix-manpage-warnings.patch +++ b/debian/patches/59-fix-manpage-warnings.patch @@ -7,8 +7,8 @@ Patch to fix minor issues with the man page: Index: screen/doc/screen.1 =================================================================== ---- screen.orig/doc/screen.1 2012-06-10 15:07:54.000000000 +0200 -+++ screen/doc/screen.1 2012-06-10 15:12:28.000000000 +0200 +--- screen.orig/doc/screen.1 2014-04-17 14:23:30.806964880 +0200 ++++ screen/doc/screen.1 2014-04-17 14:23:30.798964935 +0200 @@ -245,7 +245,7 @@ strings identifying your .I screen @@ -52,7 +52,7 @@ Index: screen/doc/screen.1 For combinations with the \fB\-d\fP/\fB\-D\fP option see there. .TP 5 .BI "\-s " program -@@ -359,7 +361,7 @@ +@@ -359,7 +359,7 @@ .BI "\-S " sessionname When creating a new session, this option can be used to specify a meaningful name for the session. This name identifies the session for @@ -61,7 +61,7 @@ Index: screen/doc/screen.1 default [\fItty.host\fP] suffix. .TP 5 .BI "\-t " name -@@ -367,7 +369,7 @@ +@@ -367,7 +367,7 @@ See also the \*Qshelltitle\*U .screenrc command. .TP 5 .BI "\-T " term @@ -70,7 +70,7 @@ Index: screen/doc/screen.1 opposed to the defualt setting of \fBscreen\fP. .TP 5 .B \-U -@@ -379,7 +381,7 @@ +@@ -379,7 +379,7 @@ Print version number. .TP 5 .BR \-wipe " [" \fImatch ] @@ -79,7 +79,7 @@ Index: screen/doc/screen.1 marking them as `dead'. An unreachable session is considered dead, when its name matches either the name of the local host, or the explicitly given parameter, if any. -@@ -425,7 +427,7 @@ +@@ -427,7 +427,7 @@ Present a list of all windows for selection. .IP "\fBC-a 0\fP (select 0)" .PD 0 @@ -88,7 +88,7 @@ Index: screen/doc/screen.1 .IP "\fBC-a 9\fP (select 9)" .IP "\fBC-a -\fP (select -)" .PD -@@ -647,7 +649,7 @@ +@@ -649,7 +649,7 @@ searches for the environment variable $SYSSCREENRC (this override feature may be disabled at compile-time). The user specific screenrc file is searched in $SCREENRC, then $HOME/.screenrc. @@ -97,7 +97,7 @@ Index: screen/doc/screen.1 precedence over the above user screenrc files. .PP Commands in these files are used to set options, bind functions to -@@ -699,7 +701,7 @@ +@@ -701,7 +701,7 @@ .BI chacl " usernames permbits list" .PP Change permissions for a comma separated list of users. Permission bits are @@ -106,7 +106,7 @@ Index: screen/doc/screen.1 removes it. The third parameter is a comma separated list of commands and/or windows (specified either by number or title). The special list `#' refers to all windows, `?' to all commands. if \fIusernames\fP consists of a single `*', -@@ -709,9 +711,9 @@ +@@ -711,9 +711,9 @@ user obtains a writelock for this window. Other bits are currently ignored. To withdraw the writelock from another user in window 2: @@ -118,7 +118,7 @@ Index: screen/doc/screen.1 .I screen he can attach to the session and (per default) has full permissions for all command and windows. Execution permission for the acl commands, `at' and others -@@ -746,11 +748,11 @@ +@@ -748,11 +748,11 @@ .ne 3 .B aclumask .RI [[ users ] +bits @@ -132,7 +132,7 @@ Index: screen/doc/screen.1 .PP This specifies the access other users have to windows that will be created by the caller of the command. -@@ -805,7 +807,7 @@ +@@ -807,7 +807,7 @@ .sp .ne 3 .BR "at " "[\fIidentifier\fP][" "#\fP|\fP*\fP|\fP%\fP] " @@ -141,7 +141,7 @@ Index: screen/doc/screen.1 .PP Execute a command at other displays or windows as if it had been entered there. \*QAt\*U changes the context (the `current window' or `current display' -@@ -856,7 +858,7 @@ +@@ -858,7 +858,7 @@ .PP Change the color to bright red if bold text is to be printed. .IP @@ -150,7 +150,7 @@ Index: screen/doc/screen.1 .PP Use blue text instead of underline. .IP -@@ -876,7 +878,7 @@ +@@ -878,7 +878,7 @@ .I screen will automatically detach upon hangup, which saves all your running programs until they are resumed with a @@ -159,7 +159,7 @@ Index: screen/doc/screen.1 command. When turned off, a hangup signal will terminate .I screen -@@ -894,7 +896,7 @@ +@@ -896,7 +896,7 @@ .I lifespan .I autorefresh .I cmd @@ -168,7 +168,7 @@ Index: screen/doc/screen.1 .br .BI "backtick " id .PP -@@ -948,7 +950,7 @@ +@@ -950,7 +950,7 @@ .sp .ne 3 .BI "bind " @@ -177,7 +177,7 @@ Index: screen/doc/screen.1 .IR class ] .I key .RI [ command " [" args ]] -@@ -970,7 +972,7 @@ +@@ -972,7 +972,7 @@ for this key is removed. The \fIcommand\fP argument can be any command listed in this section. @@ -186,7 +186,7 @@ Index: screen/doc/screen.1 is bound for the specified class. Use the \*Qcommand\*U command to activate a class. Command classes can be used to create multiple command keys or multi-character bindings. -@@ -983,7 +985,7 @@ +@@ -985,7 +985,7 @@ bind k bind K kill bind ^f screen telnet foobar @@ -195,7 +195,7 @@ Index: screen/doc/screen.1 .fi .PP would bind the space key to the command that displays a list -@@ -997,29 +999,29 @@ +@@ -999,29 +999,29 @@ a superuser shell and a scrollback buffer of 1000 lines. .PP .nf @@ -238,7 +238,7 @@ Index: screen/doc/screen.1 .I string .RI [ "cmd args" ]] .PP -@@ -1032,9 +1034,9 @@ +@@ -1034,9 +1034,9 @@ \*QINPUT TRANSLATION\*U for a list of default key bindings. .br If the @@ -250,7 +250,7 @@ Index: screen/doc/screen.1 changes the copy mode table and with neither option the user table is selected. The argument -@@ -1042,18 +1044,18 @@ +@@ -1044,18 +1044,18 @@ is the sequence of characters to which an action is bound. This can either be a fixed string or a termcap keyboard capability name (selectable with the @@ -272,7 +272,7 @@ Index: screen/doc/screen.1 option tells screen not to do inter-character timing. One cannot turn off the timing if a termcap capability is used. .br -@@ -1067,18 +1069,18 @@ +@@ -1069,18 +1069,18 @@ Here are some examples of keyboard bindings: .sp .nf @@ -294,7 +294,7 @@ Index: screen/doc/screen.1 .fi Make "foo" an abbreviation of the word "barfoo". Timeout is disabled so that users can type slowly. -@@ -1092,7 +1094,7 @@ +@@ -1094,7 +1094,7 @@ you have to press the key twice (i.e., escape the escape binding). .sp .nf @@ -303,7 +303,7 @@ Index: screen/doc/screen.1 .fi Make the F11 (not F1!) key an alternative screen escape (besides ^A). -@@ -1144,7 +1146,7 @@ +@@ -1146,7 +1146,7 @@ .PP Change the filename used for reading and writing with the paste buffer. If the optional argument to the \*Qbufferfile\*U command is omitted, @@ -312,7 +312,7 @@ Index: screen/doc/screen.1 The following example will paste the system's password file into the .I screen -@@ -1213,7 +1215,7 @@ +@@ -1215,7 +1215,7 @@ to the specified directory or, if called without an argument, to your home directory (the value of the environment variable $HOME). All windows that are created by means of the \*Qscreen\*U command @@ -321,7 +321,7 @@ Index: screen/doc/screen.1 or \*QC-a c\*U use this as their default directory. Without a chdir command, this would be the directory from which .I screen -@@ -1239,7 +1241,7 @@ +@@ -1241,7 +1241,7 @@ specific window creation and changing settings. Note that the \*Qset\*U keyword no longer exists! Usually commands affect the current window rather than default settings for future windows. Change defaults with commands @@ -330,7 +330,7 @@ Index: screen/doc/screen.1 If you consider this as the `Ex command mode' of .IR screen , -@@ -1247,12 +1249,12 @@ +@@ -1249,12 +1249,12 @@ .sp .ne 3 .B command @@ -345,7 +345,7 @@ Index: screen/doc/screen.1 class. See also \*Qbind\*U and \*Qbindkey\*U. .sp .ne 3 -@@ -1443,7 +1445,7 @@ +@@ -1445,7 +1445,7 @@ .br .ti -2n \fB>\fP sets the (second) mark and writes the contents of the paste buffer to @@ -354,7 +354,7 @@ Index: screen/doc/screen.1 finished. .br This example demonstrates how to dump the whole scrollback buffer -@@ -1485,7 +1487,7 @@ +@@ -1487,7 +1487,7 @@ .PP Turns runtime debugging on or off. If .I screen @@ -363,7 +363,7 @@ Index: screen/doc/screen.1 default. Note that this command only affects debugging output from the main \*QSCREEN\*U process correctly. Debug output from attacher processes can only be turned off once and forever. -@@ -1659,7 +1661,7 @@ +@@ -1661,7 +1661,7 @@ .PP Same as the \fButf8\fP command except that the default setting for new windows is changed. Initial setting is `on' if screen was started with @@ -372,7 +372,7 @@ Index: screen/doc/screen.1 .sp .ne 3 .BR "defwrap on" | off -@@ -1682,7 +1684,7 @@ +@@ -1684,7 +1684,7 @@ .sp .ne 3 .B detach @@ -381,7 +381,7 @@ Index: screen/doc/screen.1 .PP Detach the .I screen -@@ -1781,16 +1783,16 @@ +@@ -1783,16 +1783,16 @@ .br (I) Window permissions. Made up of three characters: (1st character) @@ -401,7 +401,7 @@ Index: screen/doc/screen.1 ‘x’ : execute \*QDisplays\*U needs a region size of at least 10 characters wide and 5 characters high in -@@ -1835,14 +1837,14 @@ +@@ -1837,14 +1837,14 @@ .IR tic . .sp .ne 3 @@ -418,7 +418,7 @@ Index: screen/doc/screen.1 See also \*Qsleep\*U. Echo is also useful for online checking of environment variables. .sp -@@ -1883,14 +1885,14 @@ +@@ -1885,14 +1885,14 @@ .B eval .I command1 .RI [ command2 @@ -435,7 +435,7 @@ Index: screen/doc/screen.1 .PP Run a unix subprocess (specified by an executable path \fInewcommand\fP and its optional arguments) in the current window. The flow of data between -@@ -1933,7 +1935,7 @@ +@@ -1935,7 +1935,7 @@ .sp Examples: .IP @@ -444,7 +444,7 @@ Index: screen/doc/screen.1 .br exec /bin/sh .br -@@ -1969,7 +1971,7 @@ +@@ -1971,7 +1971,7 @@ .I pg still works. .IP @@ -453,7 +453,7 @@ Index: screen/doc/screen.1 .PP Sends window output to both, the user and the sed command. The sed inserts an additional bell character (oct. 007) to the window output seen by -@@ -2045,14 +2047,14 @@ +@@ -2047,14 +2047,14 @@ .sp .ne 3 .B hardcopy @@ -470,7 +470,7 @@ Index: screen/doc/screen.1 scrollback buffer. .sp .ne 3 -@@ -2123,22 +2125,22 @@ +@@ -2125,22 +2125,22 @@ .sp .ne 3 .B height @@ -497,7 +497,7 @@ Index: screen/doc/screen.1 .IR class ] .PP Not really a online help, but -@@ -2149,7 +2151,7 @@ +@@ -2151,7 +2151,7 @@ bindings. Subsequent pages will display the custom commands, one command per key. Press space when you're done reading each page, or return to exit early. @@ -506,7 +506,7 @@ Index: screen/doc/screen.1 display all bound commands for the specified command class. See also \*QDEFAULT KEY BINDINGS\*U section. .sp -@@ -2160,7 +2162,7 @@ +@@ -2162,7 +2162,7 @@ For example csh has the command \*Q!!\*U to repeat the last command executed. .I Screen allows you to have a primitive way of re-calling \*Qthe command that @@ -515,7 +515,7 @@ Index: screen/doc/screen.1 `C-a {' and .I screen tries to find a previous line that matches with the `prompt character' -@@ -2202,11 +2204,11 @@ +@@ -2204,11 +2204,11 @@ .nf +flow automatic flow control, currently on. @@ -531,7 +531,7 @@ Index: screen/doc/screen.1 .fi The current line wrap setting (`+wrap' indicates enabled, `\-wrap' not) is -@@ -2467,7 +2469,7 @@ +@@ -2469,7 +2469,7 @@ a second time-stamp is added to document the restart of the output. You can change this timeout with the second form of the command. The third form is used for customizing the time-stamp @@ -540,7 +540,7 @@ Index: screen/doc/screen.1 default). .sp .ne 3 -@@ -2611,11 +2613,11 @@ +@@ -2613,11 +2613,11 @@ the display and redisplay the updated window contents. .sp .ne 3 @@ -554,7 +554,7 @@ Index: screen/doc/screen.1 will change the window's number by the relative amount specified. .sp .ne 3 -@@ -2771,18 +2773,18 @@ +@@ -2773,18 +2773,18 @@ .sp .ne 3 .B readbuf @@ -576,7 +576,7 @@ Index: screen/doc/screen.1 .IR encoding ] .RI [ register " [" filename ]] .PP -@@ -2791,7 +2793,7 @@ +@@ -2793,7 +2793,7 @@ or entered at the prompt. With two arguments it reads the contents of the named file into the register, just as \fIreadbuf\fP reads the screen-exchange file into the paste buffer. @@ -585,7 +585,7 @@ Index: screen/doc/screen.1 The following example will paste the system's password file into the .I screen -@@ -2810,12 +2812,12 @@ +@@ -2812,12 +2812,12 @@ .sp .ne 3 .B register @@ -600,7 +600,7 @@ Index: screen/doc/screen.1 See also the \*Qpaste\*U command. .sp .ne 3 -@@ -2853,7 +2855,7 @@ +@@ -2855,7 +2855,7 @@ .IP resize +N increase current region height by N .IP @@ -609,7 +609,7 @@ Index: screen/doc/screen.1 .IP resize N set current region height to N .IP -@@ -2865,15 +2867,15 @@ +@@ -2867,15 +2867,15 @@ .PP .sp .ne 3 @@ -631,7 +631,7 @@ Index: screen/doc/screen.1 If an optional number \fIn\fP in the range 0..MAXWIN-1 is given, the window number \fIn\fP is assigned to the newly created window (or, if this number is already in-use, the next available number). -@@ -2887,7 +2889,7 @@ +@@ -2889,7 +2889,7 @@ .nf # example for .screenrc: screen 1 @@ -640,7 +640,7 @@ Index: screen/doc/screen.1 .fi .sp .I screen -@@ -2927,19 +2929,19 @@ +@@ -2929,19 +2929,19 @@ Thus, the first window can be activated by \*Qselect 0\*U. The number of windows is limited at compile-time by the MAXWIN configuration parameter (which defaults to 40). @@ -664,7 +664,7 @@ Index: screen/doc/screen.1 name a new session. The default is constructed from the tty and host names. .sp -@@ -2969,7 +2971,7 @@ +@@ -2971,7 +2971,7 @@ This overrides the value of the environment variable $SHELL. This is useful if you'd like to run a tty-enhancer which is expecting to execute the program specified in $SHELL. If the command begins with @@ -673,7 +673,7 @@ Index: screen/doc/screen.1 .sp .ne 3 .B "shelltitle \fItitle\fP" -@@ -3036,12 +3038,12 @@ +@@ -3038,12 +3038,12 @@ .sp .ne 3 .B split @@ -688,7 +688,7 @@ Index: screen/doc/screen.1 to delete regions. Use \*Qfocus\*U to toggle between regions. .sp .ne 3 -@@ -3058,7 +3060,7 @@ +@@ -3060,7 +3060,7 @@ .I string in the input buffer of the current window. This is like the \*Qpaste\*U command but with much less overhead. @@ -697,7 +697,7 @@ Index: screen/doc/screen.1 You cannot paste large buffers with the \*Qstuff\*U command. It is most useful for key bindings. See also \*Qbindkey\*U. -@@ -3108,17 +3110,17 @@ +@@ -3110,17 +3110,17 @@ is VT100/ANSI compatible. The use of the \*Qterm\*U command is discouraged for non-default purpose. That is, one may want to specify special $TERM settings (e.g. vt100) for the @@ -719,7 +719,7 @@ Index: screen/doc/screen.1 .RI [ window-tweaks ] .PP Use this command to modify your terminal's termcap entry without going -@@ -3234,7 +3236,7 @@ +@@ -3236,7 +3236,7 @@ Unbind all the bindings. This can be useful when screen is used solely for its detaching abilities, such as when letting a console application run as a daemon. If, for some reason, @@ -728,7 +728,7 @@ Index: screen/doc/screen.1 .sp .ne 3 .BI "unsetenv " var -@@ -3249,7 +3251,7 @@ +@@ -3251,7 +3251,7 @@ Change the encoding used in the current window. If utf8 is enabled, the strings sent to the window will be UTF-8 encoded and vice versa. Omitting the parameter toggles the setting. If a second parameter is given, the display's @@ -737,7 +737,7 @@ Index: screen/doc/screen.1 option). See also \*Qdefutf8\*U, which changes the default setting of a new window. -@@ -3306,7 +3308,7 @@ +@@ -3308,7 +3308,7 @@ .sp .ne 3 .B width @@ -746,7 +746,7 @@ Index: screen/doc/screen.1 .RI [ cols " [" lines ]] .PP Toggle the window width between 80 and 132 columns or set it to \fIcols\fP -@@ -3315,17 +3317,17 @@ +@@ -3317,17 +3317,17 @@ See the \*Qtermcap\*U command for more information. You can also specify a new height if you want to change both values. The @@ -769,7 +769,7 @@ Index: screen/doc/screen.1 .br .B windowlist .B string -@@ -3339,15 +3341,15 @@ +@@ -3341,15 +3341,15 @@ If screen was in a window group, screen will back out of the group and then display the windows in that group. If the @@ -788,7 +788,7 @@ Index: screen/doc/screen.1 option will show the windows inside any groups in that level and downwards. -@@ -3435,7 +3437,7 @@ +@@ -3437,7 +3437,7 @@ Each window is listed by number with the name of process that has been started in the window (or its title); the current window is marked with a `*'; @@ -797,7 +797,7 @@ Index: screen/doc/screen.1 all the windows that are \*Qlogged in\*U are marked with a `$'; a background window that has received a bell is marked with a `!'; a background window that is being monitored and has had activity occur -@@ -3458,17 +3460,17 @@ +@@ -3460,17 +3460,17 @@ .sp .ne 3 .B writebuf @@ -818,7 +818,7 @@ Index: screen/doc/screen.1 .sp .ne 3 .BR "writelock " [ on | "off\fR|\fBauto\fR]" -@@ -3582,13 +3584,13 @@ +@@ -3584,13 +3584,13 @@ The normal window contains a shell (default, if no parameter is given) or any other system command that could be executed from a shell (e.g. .BR slogin , @@ -834,7 +834,7 @@ Index: screen/doc/screen.1 Read and write access is required on the device node, an exclusive open is attempted on the node to mark the connection line as busy. An optional parameter is allowed consisting of a comma separated list of flags -@@ -3598,11 +3600,11 @@ +@@ -3600,11 +3600,11 @@ Usually 300, 1200, 9600 or 19200. This affects transmission as well as receive speed. .IP "cs8 or cs7" Specify the transmission of eight (or seven) bits per byte. @@ -849,7 +849,7 @@ Index: screen/doc/screen.1 Clear (or keep) the eight bit in each received byte. .PP You may want to specify as many of these options as applicable. Unspecified -@@ -3727,7 +3729,7 @@ +@@ -3729,7 +3729,7 @@ .IP u all other users on this window .IP w @@ -858,7 +858,7 @@ Index: screen/doc/screen.1 window; with '+' qualifier: starting with the window after the current one. .IP W -@@ -3747,7 +3749,7 @@ +@@ -3749,7 +3749,7 @@ A '0' qualifier tells screen to treat the number as absolute position. You can specify to pad relative to the last absolute pad position by adding a '+' qualifier or to pad relative to the right margin @@ -867,7 +867,7 @@ Index: screen/doc/screen.1 position lies before the current position. Add the 'L' qualifier to change this. .IP < -@@ -3759,7 +3761,7 @@ +@@ -3761,7 +3761,7 @@ the output area. (The area starts from the last absolute pad position and ends with the position specified by the truncation operator.) The 'L' qualifier tells screen to mark the truncated @@ -876,7 +876,7 @@ Index: screen/doc/screen.1 .IP { attribute/color modifier string terminated by the next \*Q}\*U .IP ` -@@ -3782,7 +3784,7 @@ +@@ -3784,7 +3784,7 @@ a color description. The following change types are known: .IP + add the specified set to the current attributes @@ -885,7 +885,7 @@ Index: screen/doc/screen.1 remove the set from the current attributes .IP ! invert the set in the current attributes -@@ -3843,7 +3845,7 @@ +@@ -3845,7 +3845,7 @@ the same behavior for two-letter color descriptions, also prefix them with a \*Q.\*U. .br @@ -894,7 +894,7 @@ Index: screen/doc/screen.1 were set before the last change was made (i.e., pops one level of the color-change stack). .PP -@@ -3854,7 +3856,7 @@ +@@ -3856,7 +3856,7 @@ use bold red .IP "\*Q= yd\*U" clear all attributes, write in default color on yellow background. @@ -903,7 +903,7 @@ Index: screen/doc/screen.1 The available windows centered at the current window and truncated to the available width. The current window is displayed white on blue. This can be used with \*Qhardstatus alwayslastline\*U. -@@ -3985,7 +3987,7 @@ +@@ -3987,7 +3987,7 @@ .PP Here's some .screenrc examples: .IP @@ -912,7 +912,7 @@ Index: screen/doc/screen.1 .PP Adding this line to your .screenrc would start a nice-d version of the \*Qtop\*U command in window 2 named \*Qtop\*U rather than \*Qnice\*U. -@@ -4005,7 +4007,7 @@ +@@ -4007,7 +4007,7 @@ The window status would show the name \*Qtrn\*U while the command was running, and revert to \*Qcsh\*U upon completion. .IP @@ -921,7 +921,7 @@ Index: screen/doc/screen.1 .PP Having this command in your .screenrc would bind the key sequence \*QC-a R\*U to the \*Qsu\*U command and give it an -@@ -4091,7 +4093,7 @@ +@@ -4093,7 +4093,7 @@ the contents of your $TERM variable. If no such entry exists, .I screen @@ -930,7 +930,7 @@ Index: screen/doc/screen.1 (132 cols or more)). If even this entry cannot be found, \*Qvt100\*U is used as a substitute. -@@ -4134,7 +4136,7 @@ +@@ -4136,7 +4136,7 @@ When the is latter defined, its value will be copied verbatim into each window's $TERMCAP variable. This can either be the full terminal definition, or a filename where the @@ -939,7 +939,7 @@ Index: screen/doc/screen.1 .PP Note that .I screen -@@ -4286,7 +4288,7 @@ +@@ -4288,7 +4288,7 @@ .BR "ESC ] 83 ; cmd ^G" " (A)" Execute screen command. This only works if multi-user support is compiled into screen. The pseudo-user \*Q:window:\*U is used to @@ -948,7 +948,7 @@ Index: screen/doc/screen.1 create a user with no rights and allow only the needed commands. .TP 27 .BR "Control-N" " (A)" -@@ -4379,7 +4381,7 @@ +@@ -4381,7 +4381,7 @@ .B "ESC [ \fPPn\fB d" Cursor vertical position .TP 27 @@ -957,7 +957,7 @@ Index: screen/doc/screen.1 Select Graphic Rendition .TP 27 \h'\w'ESC [ 'u'Ps = None or \fB0\fP -@@ -4448,8 +4450,8 @@ +@@ -4450,8 +4450,8 @@ \h'\w'ESC [ Ps = 'u'\fB40\fP (A) Background Black .TP 27 @@ -968,7 +968,7 @@ Index: screen/doc/screen.1 .TP 27 \h'\w'ESC [ Ps = 'u'\fB49\fP (A) Background Default -@@ -4493,10 +4495,10 @@ +@@ -4495,10 +4495,10 @@ .B "ESC [ \fPPn\fB ^" same as above .TP 27 @@ -981,7 +981,7 @@ Index: screen/doc/screen.1 Reset Mode .TP 27 \h'\w'ESC [ 'u'Ps = \fB4\fP (A) -@@ -4639,7 +4641,7 @@ +@@ -4641,7 +4641,7 @@ stuff \e033Oy (A) Keypad + f+ stuff + stuff \e033Ok (A) @@ -990,7 +990,7 @@ Index: screen/doc/screen.1 stuff \e033Om (A) Keypad * f* stuff * stuff \e033Oj (A) -@@ -4844,8 +4846,8 @@ +@@ -4846,8 +4846,8 @@ .SH FILES .PD 0 @@ -1001,7 +1001,7 @@ Index: screen/doc/screen.1 Examples in the .I screen distribution package for private and global initialization files. -@@ -4856,16 +4858,16 @@ +@@ -4858,16 +4858,16 @@ .IP $SCREENRC .IP $HOME/.screenrc Read in after /etc/screenrc @@ -1023,7 +1023,7 @@ Index: screen/doc/screen.1 .I screen `interprocess communication buffer' .IP hardcopy.[0-9] -@@ -4894,16 +4896,16 @@ +@@ -4896,16 +4896,16 @@ .SH COPYLEFT .nf Copyright (c) 2010 @@ -1045,7 +1045,7 @@ Index: screen/doc/screen.1 Copyright (C) 1987 Oliver Laumann .fi .PP -@@ -4925,8 +4927,8 @@ +@@ -4927,8 +4927,8 @@ .SH CONTRIBUTORS .nf Ken Beal (kbeal@amber.ssd.csd.harris.com), @@ -1056,7 +1056,7 @@ Index: screen/doc/screen.1 Wayne Davison (davison@borland.com), Patrick Wolfe (pat@kai.com, kailand!pat), Bart Schaefer (schaefer@cse.ogi.edu), -@@ -4967,10 +4969,10 @@ +@@ -4969,10 +4969,10 @@ .I GNU distribution site. The home site of .I screen @@ -1069,7 +1069,7 @@ Index: screen/doc/screen.1 .SH BUGS .PD -@@ -5015,9 +5017,9 @@ +@@ -5017,9 +5017,9 @@ unless the device driver is configured to send a HANGUP signal. To detach a .I screen @@ -1081,7 +1081,7 @@ Index: screen/doc/screen.1 session without asking. .IP \(bu Both \*Qbreaktype\*U and \*Qdefbreaktype\*U change the break generating -@@ -5032,5 +5034,5 @@ +@@ -5034,5 +5034,5 @@ A weird imagination is most useful to gain full advantage of all the features. .IP \(bu Send bug-reports, fixes, enhancements, t-shirts, money, beer & pizza to diff --git a/debian/patches/61-allow-dev-console-to-be-a-symlink.patch b/debian/patches/61-allow-dev-console-to-be-a-symlink.patch new file mode 100644 index 0000000..0733084 --- /dev/null +++ b/debian/patches/61-allow-dev-console-to-be-a-symlink.patch @@ -0,0 +1,36 @@ +Description: /dev/console may be a symlink + See http://lists.debian.org/debian-devel/2013/01/msg00576.html + In case of SunOS kernel (illumos) it is not possible for a device + file to have st_nlink != 1, so do not bother with "/devices/" +Debian-Bug: 701173 +Author: Igor Pashev <pashev.igor@gmail.com> + +Index: screen/tty.sh +=================================================================== +--- screen.orig/tty.sh 2013-01-27 02:16:57.916935245 +0000 ++++ screen/tty.sh 2013-01-27 02:33:12.831241123 +0000 +@@ -1506,11 +1506,21 @@ + char *tty; + { + struct stat st; ++ char * real; ++ int rc; + +- if (lstat(tty, &st) || !S_ISCHR(st.st_mode) || +- (st.st_nlink > 1 && strncmp(tty, "/dev/", 5))) ++ real = realpath(tty, NULL); ++ if (!real) + return -1; +- return 0; ++ ++ if (lstat(real, &st) || !S_ISCHR(st.st_mode) || ++ (st.st_nlink > 1 && strncmp(real, "/dev/", 5))) ++ rc = -1; ++ else ++ rc = 0; ++ ++ free(real); ++ return rc; + } + + /* diff --git a/debian/patches/62-prevent-repeated-title-prompt.patch b/debian/patches/62-prevent-repeated-title-prompt.patch new file mode 100644 index 0000000..37d2ecf --- /dev/null +++ b/debian/patches/62-prevent-repeated-title-prompt.patch @@ -0,0 +1,44 @@ +Description: Ensure that the title prompt only appears once + Windows in screen can be renamed using C-a A (title). This can be done + repeatedly so that any number of prompts for a new window name overlay + each other. Once the user entered a name in the topmost prompt and + presses enter, he has to do it again for all the prompts underneath. + This can be very confusing in case the user hit C-a A several times + without noticing or realizing. +Author: Tobias Wulff <tobi@swulff.de> +Debian-Bug: 625866 + +Index: screen/process.c +=================================================================== +--- screen.orig/process.c 2013-07-14 23:43:28.058810093 +0200 ++++ screen/process.c 2013-07-14 23:43:28.050810057 +0200 +@@ -478,6 +478,8 @@ + + char *noargs[1]; + ++int enter_window_name_mode = 0; ++ + void + InitKeytab() + { +@@ -5745,6 +5747,8 @@ + ASSERT(display); + if (len && fore) + ChangeAKA(fore, buf, strlen(buf)); ++ ++ enter_window_name_mode = 0; + } + + static void +@@ -5752,6 +5756,11 @@ + { + char *s, *ss; + int n; ++ ++ if (enter_window_name_mode == 1) return; ++ ++ enter_window_name_mode = 1; ++ + Input("Set window's title to: ", sizeof(fore->w_akabuf) - 1, INP_COOKED, AKAfin, NULL, 0); + s = fore->w_title; + if (!s) diff --git a/debian/patches/series b/debian/patches/series index 8246498..303c7bd 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -27,6 +27,8 @@ 58-show-encoding-hardstatus.patch 59-fix-manpage-warnings.patch 60-644788-screen-4.1.0-4.0.3-interoperability.patch +61-allow-dev-console-to-be-a-symlink.patch +62-prevent-repeated-title-prompt.patch # 80-99: experimental patches, new features etc. 80EXP_session_creation_time.patch solaris-dev-console.patch diff --git a/debian/postinst b/debian/postinst index 75af63c..11574ac 100644 --- a/debian/postinst +++ b/debian/postinst @@ -6,7 +6,15 @@ set -e if [ "$1" = configure ]; then if ! test -d /var/run/screen; then install -g utmp -m 0775 -d /var/run/screen - [ `stat -c%a /usr/bin/screen` -lt 4000 ] || chmod 0755 /var/run/screen + fi + perms="`stat -c%a /usr/bin/screen`" + override=/etc/tmpfiles.d/screen-cleanup.conf + if [ $perms -eq 4755 ]; then + chmod 0755 /var/run/screen + [ -f $override ] || echo 'd /var/run/screen 0755 root utmp' > $override + elif [ $perms -eq 755 ]; then + chmod 1777 /var/run/screen + [ -f $override ] || echo 'd /var/run/screen 1777 root utmp' > $override fi add-shell /usr/bin/screen || true fi diff --git a/debian/rules b/debian/rules index f4213a4..0802b16 100755 --- a/debian/rules +++ b/debian/rules @@ -3,49 +3,24 @@ # Copyright (C) 1997 joost witteveen <joost@rulcmc.leidenuniv.nl> # Copyright (C) 1997-2001 Juan Cespedes <cespedes@debian.org> # Copyright (C) 2001 Adam Lazur <zal@debian.org> +# Copyright (C) 2011-2013 Axel Beckert <abe@debian.org> # Uncomment me to turn on debugging #export DH_VERBOSE=1 -package := screen -ROOT := $(CURDIR)/debian/$(package) +ROOT := $(CURDIR)/debian/screen # statically define this... sucko TTYGROUP := 5 -DPKG_EXPORT_BUILDFLAGS = 1 -include /usr/share/dpkg/buildflags.mk -include /usr/share/dpkg/architecture.mk +%: + dh $@ --with autoreconf -ifeq ($(findstring noopt,$(DEB_BUILD_OPTIONS)),noopt) -CC_OPTFLAGS := -O0 -g3 -else -CC_OPTFLAGS := -O2 -g -endif - -ifeq (illumos,$(DEB_HOST_ARCH_OS)) -CPPFLAGS += -DSVR4 -endif - -clean: - dh_testdir - dh_testroot +override_dh_auto_clean: test ! -s doc/Makefile || $(MAKE) -C doc realclean test ! -s Makefile || ! grep -q clean Makefile || $(MAKE) realclean - dh_autoreconf_clean - dh_clean config.log config.status Makefile -configure: configure-stamp -configure-stamp: - dh_testdir - dh_autoreconf - ./configure --prefix=/usr \ - CFLAGS="$(CFLAGS)" \ - CXXFLAGS="$(CXXFLAGS)" \ - CPPFLAGS="$(CPPFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - \ - --infodir='$$(prefix)/share/info' \ - --mandir='$$(prefix)/share/man' \ +override_dh_auto_configure: + dh_auto_configure -- \ --with-socket-dir=/var/run/screen \ --enable-pam \ --with-pty-mode=0620 \ @@ -55,68 +30,34 @@ configure-stamp: --enable-colors256 \ --enable-telnet \ --enable-use-locale - # Assert the use of fifos instead of sockets grep -q "define.*NAMEDPIPE.*1" config.h || echo "#define NAMEDPIPE 1" >> config.h - touch $@ -build: build-arch build-indep -build-arch: build-stamp -build-indep: build-stamp -build-stamp: configure-stamp - dh_testdir - $(MAKE) CFLAGS+='$(CC_OPTFLAGS) -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers' - $(MAKE) CFLAGS+='$(CC_OPTFLAGS) -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers' -C doc - touch $@ +override_dh_auto_build: + dh_auto_build -- CFLAGS+='-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers' + dh_auto_build -Ddoc -- CFLAGS+='-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers' -install: install-stamp -install-stamp: build-stamp - dh_testdir - dh_testroot - dh_clean - dh_installdirs +override_dh_auto_install: # can't call the normal install target b/c it installs the info files # and other crud $(MAKE) prefix=$(ROOT)/usr SCREENENCODINGS='$$(prefix)/share/screen/utf8encodings' installdirs install_bin - # install the debian screenrc to etc - install -m 644 debian/screenrc $(ROOT)/etc # hack around the fact that the install target makes screen a symlink to screen-$$(VERSION) rm -f $(ROOT)/usr/bin/screen mv -f $(ROOT)/usr/bin/screen* $(ROOT)/usr/bin/screen # make it setgid utmp chown root:utmp $(ROOT)/usr/bin/screen chmod 2755 $(ROOT)/usr/bin/screen - touch $@ + # Fix package-contains-info-dir-file, remove /usr/share/info/dir.gz + rm -f $(ROOT)/usr/share/info/dir* -binary: binary-arch -binary-indep: install -binary-arch: install - dh_testdir - dh_testroot - dh_installdocs - cp debian/README.terminfo $(ROOT)/usr/share/doc/screen/terminfo/ - dh_installexamples - dh_installman || true - dh_installinfo - dh_installdebconf +override_dh_installchangelogs: dh_installchangelogs -k patchlevel.h -ifeq (illumos,$(DEB_HOST_ARCH_OS)) - dh_installdirs -pscreen /lib/svc/manifest/system \ - /lib/svc/method - dh_install -pscreen debian/screen-cleanup.xml /lib/svc/manifest/system/ - install -m 755 debian/init debian/screen/lib/svc/method/screen-cleanup - dh_smf --onlyscripts -else - dh_installinit --no-start --init-script='screen-cleanup' --update-rcd-params='start 70 S .' -endif - dh_lintian - dh_strip - dh_compress + +override_dh_installinit: + dh_installinit --no-start --init-script='screen-cleanup' + +override_dh_fixperms: dh_fixperms -X/usr/bin/screen - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb -.PHONY: configure build clean binary-indep binary-arch binary install +override_dh_strip: + dh_strip --dbg-package=screen-dbg diff --git a/debian/source/local-options b/debian/source/local-options new file mode 100644 index 0000000..4aceb10 --- /dev/null +++ b/debian/source/local-options @@ -0,0 +1 @@ +unapply-patches diff --git a/debian/tmpfile b/debian/tmpfile new file mode 100644 index 0000000..1a1128f --- /dev/null +++ b/debian/tmpfile @@ -0,0 +1 @@ +d /var/run/screen 0775 root utmp diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 0000000..66777ee --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,11 @@ +%YAML 1.1 +--- +# https://wiki.debian.org/UpstreamMetadata +Bug-Database: https://savannah.gnu.org/bugs/?group=screen +Changelog: http://git.savannah.gnu.org/cgit/screen.git/plain/src/ChangeLog +Contact: screen-devel@gnu.org +FAQ: http://aperiodic.net/screen/faq +Name: GNU Screen +Homepage: https://www.gnu.org/software/screen/ +Repository: git://git.sv.gnu.org/screen.git +Repository-Browse: http://git.savannah.gnu.org/cgit/screen.git/ diff --git a/debian/upstream/signing-key.asc b/debian/upstream/signing-key.asc new file mode 100644 index 0000000..24b0457 --- /dev/null +++ b/debian/upstream/signing-key.asc @@ -0,0 +1,76 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.12 (GNU/Linux) + +mQENBFG23YwBCADmgO2AZ1ZhTdaCyFjGo35lDcqAIZ9HZuthWvELHzPpSz6Q2r7S +BQw1/yaYWrukT78ftpo6VEKIDuss5OMgBNh7CaA4pm2yL39PzhMviz4AppcCHOaw +DTeWkVVgdFPYvnUKRwJ2DTq6kMQz5BFbhTGTerk9d/Akmgc4KBO+Xm+JoNY3bz8V +4PdFFvIIdRXaTQ+AUKrM+J9uizsgaMTXLpkaG2oZiYodpgJk6CQi1Agwsq83PmLV +ASIksO4VZyjNp6Oz/osrDJKjq6btiah3xjoSTjG2SjtOx8201LrNeQp2nCaPNwWs +B6jmomq7dTR4f11n3hy31u8N0PEGPh1PESaXABEBAAG0Hk1pY2FoIENvd2FuIDxt +aWNhaEBjb3dhbi5uYW1lPokBOAQTAQIAIgUCUbbdjAIbAwYLCQgHAwIGFQgCCQoL +BBYCAwECHgECF4AACgkQxxSsoCl9mZJfGAf/Qq3p2itfqOvsvcOo+EzJ+MXW2Tek +HPHt3K1EtApBporSCqsIerIspGTFD2LC/u8PlyjLqZmF/oujuQ69KVA2zqy21DeF +20bk/jkE1VZMBjOXnV0h7hy+0Vvn1GF0LK9JV9YmU7lNeSrnatlIYhQCDo6LqCMI +ZpTlFEdQDDHTGPFkYpvTK7HtrFUQQJnNt/tNArPYrTjgKFww637mPnKYX9KkwGH0 +09h0jk8tq48GPOxWO+lTIqu9glPF2faHFgzt2/FB2ZB2vfPOxDIBiGxPcb4npGsK +iU6MohmoWxRoEqi3co9NrOwQ6fZ/ehs2HMxsTMveAT+M/VD4+bIJxQbGB7kBDQRR +tt2MAQgApi75wsaiX+zcUZuJVqgZHZK1HbULJ5AbbbgAdU9X2lBgkcpYNqhFoWa5 +iuw83X8YqSY/WZMd8zlc7dS7NH23wRGGOLrPVfnGl0Ufx9p0JNsC9a7bH+6m9jlS +JEoHJXAF5KvMsTvGT9U21H2G1PEWY40LKeOvRDGDV2b6a1jwD5y3M8fUh8Qul01u +AuFaZYoKHDW0QcDj84Il8QwJthRdM0ryy0caFDLoM94K3N9E1uMX+UCm9vVSskz/ +xv+bEfKDVSEEcGPxuhHbMXvzSXCJC9fghPSPs3EXnuU4PgLXBSnYJJDDN8DEMFoa +50TgcycdBDlQvuiNA1ZELJunWbKt4wARAQABiQEfBBgBAgAJBQJRtt2MAhsMAAoJ +EMcUrKApfZmSnokIAI1i6dEs2Swmlk2TKB+Q/l20yDjsHt1lrIaNOGl2sXNb8vPY +sf2ARsBVOM6mf9LIxM3UP0+15Rdi2e5bEolXGcvKZPDz/PoZ33oARPVMolGGTUWH +le0yz62yNZRr8ZVfoGbHFxcAVwDyrkxkewXz26kX9Z5Rj3+gm+gSwDfhG87sp84J +8gEh36b9GPjZXlvdvoRYWAHr7qNDlwJzrPXht7NIbaDgLpv/QW2u/WA0zuXgDGEw +XRWUvwdUzxUtUjwiDKy62o7oA31LAPwi480ieEJmRp2c1hZMQxT8vMQtCGcbaEw2 +XvrO/mUsw3oHD2Upm1/tfgDL8gWpg3F/8q5DA4CZAg0EUtgQxAEQAME69MvDHoEg +yr78C89ahjDLwNcXlFZ7//7H8yj0KylpsuCgl3Eg3mvM93MelDTeMyiqWIPPabw+ +rVo7XS3xNEik2kFdXasn3BgwVZbyOGAEDj5MNovafLsmFeB3SKO26hkGvagtTM1D +KAKT8AblwvgqKiwGelAYtdFNmANOkya37qYiGAfBr9O5iaoHLQgWJd7pxPyH6RpX ++aI8kgOm3TXBSW0EYKX682b4wlpNHXDngvlQpUVZLi1g8yawRDTdryigMrKoAMyp +XXxvSidlwBjsjsLHgXGfkj+7qQVlfBC+3SEccXIEOV9HYnMBIXFGqY9JzdN1JsPN +6zN3lpp1fgakDhcK+3QP6OllZJyzshAxh5zIbM5TVQECIwrc5IEirhNbb0uweBCr +UIvJl0yNf7fPLo2SJko4AZHOrhNgJRGVlsuDQ0FPXWLJpmr01eudinVWVgNIlkW9 +uOLn96gw7wvsg6CaMw1q9KKsPTeBJNtYxwV0q0GNl/XXMoqPxgea9xwzyWZOfLSF +pNfBnU3HBU+ja4aWF97g8Vd3Sg6nrVFJP5Feth9Rvi0oIqOhEpUBpdfofe/LnhFN +cfG3Ei4EkzPIbbEWiGvuc/CiReb2e92a6ewD80xzmwOws18IMHuWg211IafmL280 +enUTjHj2iN5wT/jhgDBzzTjd+0WlssuJABEBAAG0J0FtYWRldXN6IFPFgmF3acWE +c2tpIDxhbWFkZUBhc21ibHIubmV0PokCNwQTAQoAIQUCUtgQxAIbAwULCQgHAwUV +CgkICwUWAgMBAAIeAQIXgAAKCRC3CKODxT7zpAo7D/9sUNj84Kh1GYn/bHswMCAT +tKhFMnF+3G9sgsbFptMszuwhqAHbdMK5YHPGP6KhmJBUw/16icEdCeLeYyCwrmTC +pkMEPna67J4cqTe4X15bLXjYMeA9FnlGJBkDm5cArekdpJcmWRZXq4fHqbGZQ4LU +HrBqJQAlBMD6IbSHaPKbfZXpTxfWcN9NtF8iPfJFcf+EpgVuyZnAkcDSfqjgaO9I +GkI3bDnpJ05KG66N0Pz2na+lfK+4YmTmL90q2EF2GhKIxksftNnz9Dp6pfuTNe88 +0tcRpGX4KNH4WEGXrv0JFzzeFs9+xlJxcS8sKXQPIchkFosZpSUJsU3i1xEPId6r +iMcRwv7QGNBjQjdkj6gw9sPJwI9GMoXY6iu/Ngzr4gtf+XL40EMwDA/9BnjcWaAa +RQXR+O0sSXyteT+XNmHyL/EIG5CWYMUUOBdSLy/NHMzPTARjWewHyPppAhKW9mbs ++eOBFDf28df4REKeO2nQVEd0KSwl+JLTXE+N+r3FyCYTnq7oTrIxcpbHbcSjWaKv +mgCEs5aJU0NTEkRU9M/+TlxhuiG+OTB4hFQCsUgr+YbYGiD5uNpm4rtyB+KVHv70 +iMw9O0FaXgoDLTn1fbQJVbZUS6ouSlunp6/DbQLUgTqQJ4vtYxxp9JVds977HAfH +htrWFosR8ca1/JY2S5iKGbkCDQRS2BDEARAAtGJ8c2eOGa2UYbWm373uEe1g1GEi +2X9jX6MYl6QJC/Pg9YQ/L2s+0yDlS+SFTUciODh+IWy2ZgUBNn6agf7FNBuroKqB +uduDqISPtLvKYmw9nf9ovNf0DUw3RL5CAghiJKljpT0kT9EmGedGwwy0GOBQm5oj +ejH1INSKjW/cEbJ5+8tvm2CpDZjN26vgiMZRdpi9GEO7JHPwt2d57ZsCo4O6GAiF +H+ejZ74Pc7daRgwngWKgDxSn+CYxs2sDj8AJIksBNyITB2eqkd3G+IJZOshp3G3Y +POdpy2kCoai8xAsvGgdsLcYqK6hypE1qfCgvhTk6ukUQl9MruuIbihiQyH/G3gFR +szZTbNi/YRzOdeZRqUPu9Gp1q1eifMZnpfQpEeeXvuRMn2IAhlrPl5nRhFtXZV2l +Qfqzj6f0bX7NwZgFJKTEyyuyMBpR9n9qQr8FOWMrfu1r28efe26p5rvYWgFR2FDW +/jN3E2H3R/IDRU1Lk0Z/z3p90BLosCVe0QF/aER3JnUxsEk8D8YTlgd0NFO5mht+ +g+CgwZzK2PQ2h0DikBwK2VbIL44GYakG/cs9DLO0XX/F/1dzm0Cyld6toz57EoWd +jlLrDMTufgSUNPcf738iFkdJMR3nnG84vGsd2Ihhk1A6MVdHlg+oQr30U4fcFtYl +yoLcJxstMKJ0LLkAEQEAAYkCHwQYAQoACQUCUtgQxAIbDAAKCRC3CKODxT7zpNdH +EACE/QZmG6lEOe5Ir1XC4mWiYv95l8JEeI8iCddSv/K0D0WRU1G9TaaT+IlcRRIS +ZP2Rmlre4T942oBbRkVeZIwpeBhvMx/nmdfz8z3fVrXOmLW1GzqF+EMzq/fdViii +YA/CtEv/lsNwqeZl/lFEoi8rVYH7qMWwFLnp3R0zuWbpRA5Uc5i+lgzbbD7DThsp +n2iGKLNzkXKrBAaHdMGXDwH4xfPcFcIUSU+0GQHXDJq85f0AYr5mHA265PV5wh0s +pns5cLgpACJ2ibYscLkyEdgBhswZW6ylGTjnsA8grp7ioGJRuDflLX79c4CXWpq+ +1OSAs0jPZzhOCBY+18MGZ8+umRG8XX6Lw9H4ZamSlSVZUY1yEbd8KJmrVXGn7X1X +v1N/C8H3cOCMoJ5OKVPlEjq0XbzkLtGLrTxW+kmQ0JO3rFzCXuCSeGOnXLEgSfOj +pcDHgCtTQnxWKfju9B/waKQAJrN2z66AG35u5op7JY2pN+BfxflJYMYF11bYwAf2 +LW10nCJLWa+zTtIKr5uj5z7THK8V0vdYUYQHvhlqQRQMFuOsN7B6YCJAjaE0dtTp +2Lj39sgQy46v3nRnS20lPlI5Y1vOH82cV4wuXkyLtK5qr7dOaHHYJOYOS6WYhjCi +nUq8bFNIfjgZq2wdghtgIeWPq5zlV7uuj03px4KwFdb7tA== +=uDU3 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/debian/watch b/debian/watch index cc45197..c476aca 100644 --- a/debian/watch +++ b/debian/watch @@ -1,5 +1,6 @@ -# $Id: watch,v 1.1 2002/07/08 14:07:18 laz Exp $ -version=2 -# This is a variant HTTP format with more possibilities: -# Homepage Pattern [Version [Action]] -opts=pasv ftp://ftp.uni-erlangen.de/pub/utilities/screen/screen-(\d.*)\.tar\.gz +version=3 +opts=pgpsigurlmangle=s/$/.sig/ \ +http://ftp.gnu.org/gnu/screen/screen-([\d\.]+)\.tar\.gz + +opts=pgpsigurlmangle=s/$/.sig/ \ +http://download.savannah.gnu.org/releases/screen/screen-([\d\.]+)\.tar\.gz @@ -594,7 +594,7 @@ int c; # ifdef UTF8 if (D_encoding == UTF8) { - c = (c & 255) | (unsigned char)D_rend.font << 8; + c = (c & 255) | (unsigned char)D_rend.font << 8 | (unsigned char)D_rend.fontx << 16; # ifdef DW_CHARS if (D_mbcs) { @@ -1882,6 +1882,10 @@ struct mchar *mc; #ifdef FONT if (D_rend.font != mc->font) SetFont(mc->font); +#ifdef UTF8 + if (D_encoding == UTF8) + D_rend.fontx = mc->fontx; +#endif #endif } @@ -1934,6 +1938,10 @@ int x; #ifdef FONT if (D_rend.font != ml->font[x]) SetFont(ml->font[x]); +#ifdef UTF8 + if (D_encoding == UTF8) + D_rend.fontx = ml->fontx[x]; +#endif #endif } diff --git a/doc/screen.1 b/doc/screen.1 index bbb5a3d..2ec73b5 100644 --- a/doc/screen.1 +++ b/doc/screen.1 @@ -394,10 +394,12 @@ refuses to attach from within itself. But when cascading multiple screens, loops are not detected; take care. .TP 5 .B \-X -Send the specified command to a running screen session. You can use -the \fB-d\fP or \fB-r\fP option to tell screen to look only for -attached or detached screen sessions. Note that this command doesn't -work if the session is password protected. +Send the specified command to a running screen session. You may +use the \fB-S\fP option to specify the screen session if you have +several screen sessions running. You can use the \fB-d\fP or +\fB-r\fP option to tell screen to look only for attached or +detached screen sessions. Note that this command doesn't work if +the session is password protected. .SH "DEFAULT KEY BINDINGS" .ta 12n 26n @@ -512,7 +514,7 @@ Switch to the next window. Show the number (and title) of the current window. .IP "\fBC-a backspace\fP" .PD 0 -.IP "\fBC-a h\fP" +.IP "\fBC-a C-h\fP" .IP "\fBC-a p\fP" .IP "\fBC-a C-p\fP (prev)" .PD diff --git a/doc/screen.texinfo b/doc/screen.texinfo index e39003a..d721647 100644 --- a/doc/screen.texinfo +++ b/doc/screen.texinfo @@ -458,10 +458,11 @@ But when cascading multiple screens, loops are not detected; take care. @item -X -Send the specified command to a running screen session. You can use -the @code{-d} or @code{-r} option to tell screen to look only for -attached or detached screen sessions. Note that this command doesn't -work if the session is password protected. +Send the specified command to a running screen session. You may use +the @code{-S} option to specify the screen session if you have several +running. You can use the @code{-d} or @code{-r} option to tell screen +to look only for attached or detached screen sessions. Note that this +command doesn't work if the session is password protected. @end table @@ -514,6 +514,8 @@ int from, to; if (rmc.font == 0) /* latin1 is the same in unicode */ return mc; c = rmc.image | (rmc.font << 8); + if (from == UTF8) + c |= rmc.fontx << 16; #ifdef DW_CHARS if (rmc.mbcs) { @@ -526,6 +528,8 @@ int from, to; c = recode_char_to_encoding(c, to); rmc.image = c & 255; rmc.font = c >> 8 & 255; + if (to == UTF8) + rmc.fontx = c >> 16 & 255; return &rmc; } @@ -542,7 +546,7 @@ int from, to; if (from == to || (from != UTF8 && to != UTF8) || w == 0) return ml; - if (ml->font == null && encodings[from].deffont == 0) + if (ml->font == null && ml->fontx == null && encodings[from].deffont == 0) return ml; if (w > maxlen) { @@ -556,7 +560,11 @@ int from, to; rml[i].font = malloc(w); else rml[i].font = realloc(rml[i].font, w); - if (rml[i].image == 0 || rml[i].font == 0) + if (rml[i].fontx == 0) + rml[i].fontx = malloc(w); + else + rml[i].fontx = realloc(rml[i].fontx, w); + if (rml[i].image == 0 || rml[i].font == 0 || rml[i].fontx == 0) { maxlen = 0; return ml; /* sorry */ @@ -578,6 +586,12 @@ int from, to; for (i = 0; i < w; i++) debug1("%c", "0123456789abcdef"[(ml->font[i] ) & 15]); debug("\n"); + for (i = 0; i < w; i++) + debug1("%c", "0123456789abcdef"[(ml->fontx[i] >> 4) & 15]); + debug("\n"); + for (i = 0; i < w; i++) + debug1("%c", "0123456789abcdef"[(ml->fontx[i] ) & 15]); + debug("\n"); rl = rml + last; rl->attr = ml->attr; @@ -590,6 +604,8 @@ int from, to; for (i = 0; i < w; i++) { c = ml->image[i] | (ml->font[i] << 8); + if (from == UTF8) + c |= ml->fontx[i] << 16; if (from != UTF8 && c < 256) c |= encodings[from].deffont << 8; #ifdef DW_CHARS @@ -603,6 +619,8 @@ int from, to; i++; c2 = ml->image[i] | (ml->font[i] << 8); c = recode_char_dw_to_encoding(c, &c2, to); + if (to == UTF8) + rl->fontx[i - 1] = c >> 16 & 255; rl->font[i - 1] = c >> 8 & 255; rl->image[i - 1] = c & 255; c = c2; @@ -613,6 +631,8 @@ int from, to; c = recode_char_to_encoding(c, to); rl->image[i] = c & 255; rl->font[i] = c >> 8 & 255; + if (to == UTF8) + rl->fontx[i] = c >> 16 & 255; } last ^= 1; debug("recode_mline: to\n"); @@ -628,14 +648,20 @@ int from, to; for (i = 0; i < w; i++) debug1("%c", "0123456789abcdef"[(rl->font[i] ) & 15]); debug("\n"); + for (i = 0; i < w; i++) + debug1("%c", "0123456789abcdef"[(rl->fontx[i] >> 4) & 15]); + debug("\n"); + for (i = 0; i < w; i++) + debug1("%c", "0123456789abcdef"[(rl->fontx[i] ) & 15]); + debug("\n"); return rl; } struct combchar { - unsigned short c1; - unsigned short c2; - unsigned short next; - unsigned short prev; + unsigned int c1; + unsigned int c2; + unsigned int next; + unsigned int prev; }; struct combchar **combchars; @@ -649,10 +675,20 @@ int c; AddUtf8(combchars[c - 0xd800]->c1); c = combchars[c - 0xd800]->c2; } + if (c >= 0x10000) + { + if (c >= 0x200000) + { + AddChar((c & 0x3000000) >> 12 ^ 0xf8); + c = (c & 0xffffff) ^ ((0xf0 ^ 0x80) << 18); + } + AddChar((c & 0x1fc0000) >> 18 ^ 0xf0); + c = (c & 0x3ffff) ^ ((0xe0 ^ 0x80) << 12); + } if (c >= 0x800) { - AddChar((c & 0xf000) >> 12 | 0xe0); - c = (c & 0x0fff) | 0x1000; + AddChar((c & 0x7f000) >> 12 ^ 0xe0); + c = (c & 0x0fff) ^ ((0xc0 ^ 0x80) << 6); } if (c >= 0x80) { @@ -683,10 +719,24 @@ char *p; int c; { int l = 1; + if (c >= 0x10000) + { + if (c >= 0x200000) + { + if (p) + *p++ = (c & 0x3000000) >> 12 ^ 0xf8; + l++; + c = (c & 0xffffff) ^ ((0xf0 ^ 0x80) << 18); + } + if (p) + *p++ = (c & 0x1fc0000) >> 18 ^ 0xf0; + l++; + c = (c & 0x3ffff) ^ ((0xe0 ^ 0x80) << 12); + } if (c >= 0x800) { if (p) - *p++ = (c & 0xf000) >> 12 | 0xe0; + *p++ = (c & 0x7f000) >> 12 ^ 0xe0; l++; c = (c & 0x0fff) | 0x1000; } @@ -758,8 +808,13 @@ int c, *utf8charp; *utf8charp = utf8char = (c & 0x80000000) ? c : 0; if (utf8char) return -1; +#if 0 if (c & 0xffff0000) c = UCS_REPL; /* sorry, only know 16bit Unicode */ +#else + if (c & 0xff800000) + c = UCS_REPL; /* sorry, only know 23bit Unicode */ +#endif if (c >= 0xd800 && (c <= 0xdfff || c == 0xfffe || c == 0xffff)) c = UCS_REPL; /* illegal code */ return c; @@ -803,11 +858,13 @@ int encoding; #else ml = &p->w_mlines[j]; #endif - if (ml->font == null && encodings[p->w_encoding].deffont == 0) + if (ml->font == null && ml->fontx == 0 && encodings[p->w_encoding].deffont == 0) continue; for (i = 0; i < p->w_width; i++) { c = ml->image[i] | (ml->font[i] << 8); + if (p->w_encoding == UTF8) + c |= ml->fontx[i] << 16; if (p->w_encoding != UTF8 && c < 256) c |= encodings[p->w_encoding].deffont << 8; if (c < 256) @@ -829,8 +886,22 @@ int encoding; { int c2; i++; - c2 = ml->image[i] | (ml->font[i] << 8); + c2 = ml->image[i] | (ml->font[i] << 8) | (ml->fontx[i] << 16); c = recode_char_dw_to_encoding(c, &c2, encoding); + if (encoding == UTF8) + { + if (c > 0x10000 && ml->fontx == null) + { + if ((ml->fontx = (unsigned char *)calloc(p->w_width + 1, 1)) == 0) + { + ml->fontx = null; + break; + } + } + ml->fontx[i - 1] = c >> 16 & 255; + } + else + ml->fontx = null; ml->font[i - 1] = c >> 8 & 255; ml->image[i - 1] = c & 255; c = c2; @@ -841,6 +912,20 @@ int encoding; c = recode_char_to_encoding(c, encoding); ml->image[i] = c & 255; ml->font[i] = c >> 8 & 255; + if (encoding == UTF8) + { + if (c > 0x10000 && ml->fontx == null) + { + if ((ml->fontx = (unsigned char *)calloc(p->w_width + 1, 1)) == 0) + { + ml->fontx = null; + break; + } + } + ml->fontx[i] = c >> 16 & 255; + } + else + ml->fontx = null; } } p->w_encoding = encoding; @@ -1039,7 +1124,7 @@ struct mchar *mc; int root, i, c1; int isdouble; - c1 = mc->image | (mc->font << 8); + c1 = mc->image | (mc->font << 8) | mc->fontx << 16; isdouble = c1 >= 0x1100 && utf8_isdouble(c1); if (!combchars) { @@ -1102,6 +1187,7 @@ struct mchar *mc; combchars[i]->c2 = c; mc->image = i & 0xff; mc->font = (i >> 8) + 0xd8; + mc->fontx = 0; debug3("combinig char %x %x -> %x\n", c1, c, i + 0xd800); comb_tofront(root, i); } @@ -1220,6 +1306,15 @@ struct win *p; p->w_c1 = 0; } +/* decoded char: 32-bit <fontx><font><c2><c> + * fontx: non-bmp utf8 + * c2: multi-byte character + * font is always zero for utf8 + * returns: -1 need more bytes + * -2 decode error + */ + + int DecodeChar(c, encoding, statep) int c; @@ -1231,7 +1326,12 @@ int *statep; debug2("Decoding char %02x for encoding %d\n", c, encoding); #ifdef UTF8 if (encoding == UTF8) - return FromUtf8(c, statep); + { + c = FromUtf8(c, statep); + if (c >= 0x10000) + c = (c & 0x7f0000) << 8 | (c & 0xffff); + return c; + } #endif if (encoding == SJIS) { @@ -1345,7 +1445,7 @@ int *fontp; } return 3; } - f = c >> 16; + f = (c >> 16) & 0xff; #ifdef UTF8 if (encoding == UTF8) @@ -1368,8 +1468,10 @@ int *fontp; } return ToUtf8(bp, c); } - if ((c & 0xff00) && f == 0) /* is_utf8? */ + if (f == 0 && (c & 0x7f00ff00) != 0) /* is_utf8? */ { + if (c >= 0x10000) + c = (c & 0x7f0000) >> 8 | (c & 0xffff); # ifdef DW_CHARS if (utf8_isdouble(c)) { @@ -33,8 +33,10 @@ #ifdef FONT # define IFFONT(x) x +# define IFFONTX(x) x #else # define IFFONT(x) +# define IFFONTX(x) #endif #ifdef COLOR @@ -59,6 +61,7 @@ struct mchar { unsigned char image; unsigned char attr; IFFONT( unsigned char font; ) +IFFONTX( unsigned char fontx; ) IFCOLOR( unsigned char color; ) IFCOLORX(unsigned char colorx; ) IFDWCHAR(unsigned char mbcs; ) @@ -68,6 +71,7 @@ struct mline { unsigned char *image; unsigned char *attr; IFFONT( unsigned char *font; ) +IFFONTX( unsigned char *fontx; ) IFCOLOR( unsigned char *color; ) IFCOLORX(unsigned char *colorx; ) }; @@ -78,6 +82,7 @@ IFCOLORX(unsigned char *colorx; ) bcopy((char *)(ml)->image, (char *)mline_old.image, (n)); \ bcopy((char *)(ml)->attr, (char *)mline_old.attr, (n)); \ IFFONT( bcopy((char *)(ml)->font, (char *)mline_old.font, (n)); ) \ +IFFONTX( bcopy((char *)(ml)->fontx, (char *)mline_old.fontx, (n)); ) \ IFCOLOR( bcopy((char *)(ml)->color, (char *)mline_old.color, (n)); ) \ IFCOLORX(bcopy((char *)(ml)->colorx, (char *)mline_old.colorx, (n)); ) \ } while (0) @@ -86,6 +91,7 @@ IFCOLORX(bcopy((char *)(ml)->colorx, (char *)mline_old.colorx, (n)); ) \ bcopy((char *)(ml)->image + (xf), (char *)(ml)->image + (xt), (n)); \ bcopy((char *)(ml)->attr + (xf), (char *)(ml)->attr + (xt), (n)); \ IFFONT( bcopy((char *)(ml)->font + (xf), (char *)(ml)->font + (xt), (n)); ) \ +IFFONTX( bcopy((char *)(ml)->fontx + (xf), (char *)(ml)->fontx + (xt), (n)); ) \ IFCOLOR( bcopy((char *)(ml)->color + (xf), (char *)(ml)->color + (xt), (n)); ) \ IFCOLORX(bcopy((char *)(ml)->colorx + (xf), (char *)(ml)->colorx + (xt), (n));) \ } while (0) @@ -94,6 +100,7 @@ IFCOLORX(bcopy((char *)(ml)->colorx + (xf), (char *)(ml)->colorx + (xt), (n));) bclear((char *)(ml)->image + (x), (n)); \ if ((ml)->attr != null) bzero((char *)(ml)->attr + (x), (n)); \ IFFONT( if ((ml)->font != null) bzero((char *)(ml)->font + (x), (n)); ) \ +IFFONTX( if ((ml)->fontx != null) bzero((char *)(ml)->fontx + (x), (n)); ) \ IFCOLOR( if ((ml)->color!= null) bzero((char *)(ml)->color + (x), (n)); ) \ IFCOLORX(if ((ml)->colorx!= null) bzero((char *)(ml)->colorx + (x), (n)); ) \ } while (0) @@ -102,6 +109,7 @@ IFCOLORX(if ((ml)->colorx!= null) bzero((char *)(ml)->colorx + (x), (n)); ) \ (ml1)->image[x] == (ml2)->image[x] \ && (ml1)->attr[x] == (ml2)->attr[x] \ IFFONT( && (ml1)->font[x] == (ml2)->font[x] ) \ +IFFONTX( && (ml1)->fontx[x] == (ml2)->fontx[x] ) \ IFCOLOR( && (ml1)->color[x] == (ml2)->color[x] ) \ IFCOLORX(&& (ml1)->colorx[x] == (ml2)->colorx[x] ) \ ) @@ -110,6 +118,7 @@ IFCOLORX(&& (ml1)->colorx[x] == (ml2)->colorx[x] ) \ (mc1)->image == (mc2)->image \ && (mc1)->attr == (mc2)->attr \ IFFONT( && (mc1)->font == (mc2)->font ) \ +IFFONTX( && (mc1)->fontx == (mc2)->fontx ) \ IFCOLOR( && (mc1)->color == (mc2)->color ) \ IFCOLORX(&& (mc1)->colorx == (mc2)->colorx ) \ ) @@ -118,6 +127,7 @@ IFCOLORX(&& (mc1)->colorx == (mc2)->colorx ) \ (mc)->image == (ml)->image[x] \ && (mc)->attr == (ml)->attr[x] \ IFFONT( && (mc)->font == (ml)->font[x] ) \ +IFFONTX( && (mc)->fontx == (ml)->fontx[x] ) \ IFCOLOR( && (mc)->color == (ml)->color[x] ) \ IFCOLORX(&& (mc)->colorx == (ml)->colorx[x] ) \ ) @@ -126,6 +136,7 @@ IFCOLORX(&& (mc)->colorx == (ml)->colorx[x] ) \ (ml)->image[x] = (mc)->image; \ (ml)->attr[x] = (mc)->attr; \ IFFONT( (ml)->font[x] = (mc)->font; ) \ +IFFONTX( (ml)->fontx[x] = (mc)->fontx; ) \ IFCOLOR( (ml)->color[x] = (mc)->color; ) \ IFCOLORX((ml)->colorx[x] = (mc)->colorx; ) \ } while (0) @@ -134,6 +145,7 @@ IFCOLORX((ml)->colorx[x] = (mc)->colorx; ) \ (mc)->image = (ml)->image[x]; \ (mc)->attr = (ml)->attr[x]; \ IFFONT( (mc)->font = (ml)->font[x]; ) \ +IFFONTX( (mc)->fontx = (ml)->fontx[x]; ) \ IFCOLOR( (mc)->color = (ml)->color[x]; ) \ IFCOLORX((mc)->colorx = (ml)->colorx[x]; ) \ IFDWCHAR((mc)->mbcs = 0; ) \ @@ -68,6 +68,7 @@ int off; mml.attr = ml->attr + off; #ifdef FONT mml.font = ml->font + off; + mml.fontx = ml->fontx + off; #endif #ifdef COLOR mml.color = ml->color + off; @@ -409,7 +410,7 @@ int x, y; SetRendition(r); s2 = s + xs2 - x - vp->v_xoff; #ifdef UTF8 - if (D_encoding == UTF8 && l->l_encoding != UTF8 && (r->font || l->l_encoding)) + if (D_encoding == UTF8 && l->l_encoding != UTF8 && (r->font || r->fontx || l->l_encoding)) { struct mchar mc; mc = *r; @@ -283,8 +283,8 @@ char *pt; unsigned char *im; struct mline *ml; #ifdef FONT - int cf, font; - unsigned char *fo; + int cf, cfx, font; + unsigned char *fo, *fox; #endif markdata->second = 0; @@ -332,6 +332,7 @@ char *pt; im = ml->image + j; #ifdef FONT fo = ml->font + j; + fox = ml->fontx + j; font = ASCII; #endif for (; j <= to; j++) @@ -339,10 +340,11 @@ char *pt; c = (unsigned char)*im++; #ifdef FONT cf = (unsigned char)*fo++; + cfx = (unsigned char)*fox++; # ifdef UTF8 if (fore->w_encoding == UTF8) { - c |= cf << 8; + c |= cf << 8 | cfx << 16; if (c == UCS_HIDDEN) continue; c = ToUtf8_comb(pt, c); @@ -1234,7 +1236,10 @@ int tx, ty, line; mc = mchar_so; #ifdef FONT if (pastefont) - mc.font = ml->font[x]; + { + mc.font = ml->font[x]; + mc.fontx = ml->fontx[x]; + } #endif mc.image = ml->image[x]; } @@ -1354,7 +1359,10 @@ int isblank; break; #ifdef FONT if (pastefont) - mchar_marked.font = ml->font[x]; + { + mchar_marked.font = ml->font[x]; + mchar_marked.fontx = ml->fontx[x]; + } #endif mchar_marked.image = ml->image[x]; #ifdef DW_CHARS @@ -1433,7 +1441,10 @@ struct mchar *rend; { #ifdef FONT if (pastefont) - mchar_marked.font = ml->font[x]; + { + mchar_marked.font = ml->font[x]; + mchar_marked.fontx = ml->fontx[x]; + } #endif rend->image = mchar_marked.image; if (!cmp_mchar(rend, &mchar_marked)) diff --git a/patchlevel.h b/patchlevel.h index 0695698..e3985ce 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -532,7 +532,7 @@ #define ORIGIN "GNU" #define REV 4 -#define VERS 1 +#define VERS 2 #define PATCHLEVEL 0 -#define DATE "2-May-06" -#define STATE "devel" +#define DATE "16-Apr-14" +#define STATE "" @@ -6360,6 +6360,12 @@ char *data; buf = crypt(u->u_password, salt); bzero(u->u_password, strlen(u->u_password)); free((char *)u->u_password); + if (!buf) + { + Msg(0, "[ crypt() error - no secure ]"); + u->u_password = NullStr; + return; + } u->u_password = SaveStr(buf); bzero(buf, strlen(buf)); #ifdef COPY_PASTE @@ -6472,6 +6478,7 @@ int i; { struct action *act; int discard = 0; + int keyno = i; debug1("StuffKey #%d", i); #ifdef DEBUG @@ -6511,6 +6518,9 @@ int i; if (discard && (!act || act->nr != RC_COMMAND)) { + /* if the input was just a single byte we let it through */ + if (D_tcs[keyno + T_CAPS].str && strlen(D_tcs[keyno + T_CAPS].str) == 1) + return -1; if (D_ESCseen) { D_ESCseen = 0; @@ -428,6 +428,8 @@ struct mline *ml; #ifdef FONT if (ml->font && ml->font != null) free(ml->font); + if (ml->fontx && ml->fontx != null) + free(ml->fontx); #endif #ifdef COLOR if (ml->color && ml->color != null) @@ -449,6 +451,7 @@ int w; ml->attr = null; #ifdef FONT ml->font = null; + ml->fontx = null; #endif #ifdef COLOR ml->color = null; @@ -485,6 +488,13 @@ int xf, xt, l, w; } if (mlt->font != null) bcopy((char *)mlf->font + xf, (char *)mlt->font + xt, l); + if (mlf->fontx != null && mlt->fontx == null) + { + if ((mlt->fontx = (unsigned char *)calloc(w, 1)) == 0) + mlt->fontx = null, r = -1; + } + if (mlt->fontx != null) + bcopy((char *)mlf->fontx + xf, (char *)mlt->fontx + xt, l); #endif #ifdef COLOR if (mlf->color != null && mlt->color == null) @@ -531,6 +541,7 @@ int wi; mline_old.attr = (unsigned char *)xrealloc((char *)mline_old.attr, maxwidth); #ifdef FONT mline_old.font = (unsigned char *)xrealloc((char *)mline_old.font, maxwidth); + mline_old.fontx = (unsigned char *)xrealloc((char *)mline_old.fontx, maxwidth); #endif #ifdef COLOR mline_old.color = (unsigned char *)xrealloc((char *)mline_old.color, maxwidth); @@ -538,7 +549,7 @@ int wi; mline_old.colorx = (unsigned char *)xrealloc((char *)mline_old.colorx, maxwidth); # endif #endif - if (!(blank && null && mline_old.image && mline_old.attr IFFONT(&& mline_old.font) IFCOLOR(&& mline_old.color) IFCOLORX(&& mline_old.colorx))) + if (!(blank && null && mline_old.image && mline_old.attr IFFONT(&& mline_old.font) IFFONTX(&& mline_old.fontx) IFCOLOR(&& mline_old.color) IFCOLORX(&& mline_old.colorx))) Panic(0, "%s", strnomem); MakeBlankLine(blank, maxwidth); @@ -550,7 +561,9 @@ int wi; mline_null.attr = null; #ifdef FONT mline_blank.font = null; - mline_null.font = null; + mline_null.font = null; + mline_blank.fontx = null; + mline_null.fontx = null; #endif #ifdef COLOR mline_blank.color = null; @@ -571,6 +584,7 @@ int wi; RESET_AFC(ml->image, blank); \ RESET_AFC(ml->attr, null); \ IFFONT(RESET_AFC(ml->font, null)); \ + IFFONT(RESET_AFC(ml->fontx, null)); \ IFCOLOR(RESET_AFC(ml->color, null)); \ IFCOLORX(RESET_AFC(ml->colorx, null)); \ } \ @@ -966,14 +980,16 @@ int wi, he, hi; p->w_y = he - 1; if (p->w_saved.x > wi) p->w_saved.x = wi; - if (p->w_saved.y < 0) - p->w_saved.y = 0; if (p->w_saved.y >= he) p->w_saved.y = he - 1; + if (p->w_saved.y < 0) + p->w_saved.y = 0; if (p->w_alt.cursor.x > wi) p->w_alt.cursor.x = wi; if (p->w_alt.cursor.y >= he) p->w_alt.cursor.y = he - 1; + if (p->w_alt.cursor.y < 0) + p->w_alt.cursor.y = 0; /* reset scrolling region */ p->w_top = 0; @@ -1015,7 +1031,7 @@ int wi, he, hi; if (p->w_encoding == UTF8) { for (l = 0; l < p->w_width; l++) - ASSERT(ml->image[l] >= ' ' || ml->font[l]); + ASSERT(ml->image[l] >= ' ' || ml->font[l] || ml->fontx); } else #endif @@ -988,7 +988,7 @@ char **av; Panic(0, "$HOME too long - sorry."); attach_tty = ""; - if (!detached && !lsflag && !cmdflag && !(dflag && !mflag && !rflag && !xflag) && !(!mflag && !SockMatch && sty && !xflag)) + if (!detached && !lsflag && !cmdflag && !(dflag && !mflag && !rflag && !xflag) && !(sty && !SockMatch && !mflag && !rflag && !xflag)) { #ifndef NAMEDPIPE int fl; @@ -1565,13 +1565,18 @@ int ilen; c = *(unsigned char *)ibuf++; if (c == '\r' || c == '\n') { + char *buf = NULL; up = D_user->u_password; pwdata->buf[l] = 0; - if (strncmp(crypt(pwdata->buf, up), up, strlen(up))) + buf = crypt(pwdata->buf, up); + if (!buf || strncmp(buf, up, strlen(up))) { /* uh oh, user failed */ bzero(pwdata->buf, sizeof(pwdata->buf)); - AddStr("\r\nPassword incorrect.\r\n"); + if (!buf) + AddStr("\r\ncrypt() failed.\r\n"); + else + AddStr("\r\nPassword incorrect.\r\n"); D_processinputdata = 0; /* otherwise freed by FreeDis */ FreeDisplay(); Msg(0, "Illegal reattach attempt from terminal %s.", pwdata->m.m_tty); @@ -403,6 +403,7 @@ struct mchar *rend; register unsigned char *p, *i; #ifdef FONT register unsigned char *f; + register unsigned char *fx; #endif #ifdef COLOR register unsigned char *c; @@ -424,6 +425,7 @@ struct mchar *rend; p = fore->w_mlines[y].attr + x1; #ifdef FONT f = fore->w_mlines[y].font + x1; + fx = fore->w_mlines[y].fontx + x1; # ifdef DW_CHARS if (is_dw_font(rend->font)) return EXPENSIVE; @@ -448,6 +450,8 @@ struct mchar *rend; #ifdef FONT if (*f++ != rend->font) return EXPENSIVE; + if (*fx++ != rend->fontx) + return EXPENSIVE; #endif #ifdef COLOR if (*c++ != rend->color) |