diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a0bb8d7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/screen-20120314git3c2946.tar.bz2 diff --git a/.screen.metadata b/.screen.metadata new file mode 100644 index 0000000..e73180b --- /dev/null +++ b/.screen.metadata @@ -0,0 +1 @@ +50692c014bfcedbe5a36e6c554e614249719545c SOURCES/screen-20120314git3c2946.tar.bz2 diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/screen-4.0.3-libs.patch b/SOURCES/screen-4.0.3-libs.patch new file mode 100644 index 0000000..a548787 --- /dev/null +++ b/SOURCES/screen-4.0.3-libs.patch @@ -0,0 +1,50 @@ +diff -up screen-4.0.3/configure.in.libs screen-4.0.3/configure.in +--- screen-4.0.3/configure.in.libs 2003-06-03 13:58:24.000000000 +0200 ++++ screen-4.0.3/configure.in 2008-02-26 13:58:29.000000000 +0100 +@@ -196,7 +196,9 @@ AC_EGREP_CPP(yes, + ], LIBS="$LIBS -lsocket -linet";seqptx=1) + + oldlibs="$LIBS" +-LIBS="$LIBS -lelf" ++# Humm we don't actually need to link against libelf for linux ++#LIBS="$LIBS -lelf" ++LIBS="$LIBS" + AC_CHECKING(SVR4) + AC_TRY_LINK([#include + ],, +@@ -643,14 +645,10 @@ dnl + AC_CHECKING(for tgetent) + AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, + olibs="$LIBS" +-LIBS="-lcurses $olibs" +-AC_CHECKING(libcurses) ++LIBS="-ltinfo $olibs" ++AC_CHECKING(libtinfo) + AC_TRY_LINK(,[ +-#ifdef __hpux +-__sorry_hpux_libcurses_is_totally_broken_in_10_10(); +-#else + tgetent((char *)0, (char *)0); +-#endif + ],, + LIBS="-ltermcap $olibs" + AC_CHECKING(libtermcap) +@@ -666,7 +664,7 @@ AC_MSG_ERROR(!!! no tgetent - no screen) + AC_TRY_RUN([ + main() + { +- exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); ++ return 1; + }], AC_NOTE(- you use the termcap database), + AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO)) + AC_CHECKING(ospeed) +@@ -864,9 +862,6 @@ fi + dnl + dnl **** loadav **** + dnl +-AC_CHECKING(for libutil(s)) +-test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils" +-test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil" + + AC_CHECKING(getloadavg) + AC_TRY_LINK(,[getloadavg((double *)0, 0);], diff --git a/SOURCES/screen-4.0.3-screenrc.patch b/SOURCES/screen-4.0.3-screenrc.patch new file mode 100644 index 0000000..67e3698 --- /dev/null +++ b/SOURCES/screen-4.0.3-screenrc.patch @@ -0,0 +1,157 @@ +diff -up screen-4.0.3/etc/etcscreenrc.screenrc screen-4.0.3/etc/etcscreenrc +--- screen-4.0.3/etc/etcscreenrc.screenrc 2003-12-05 14:46:13.000000000 +0100 ++++ screen-4.0.3/etc/etcscreenrc 2009-09-25 14:20:31.000000000 +0200 +@@ -36,8 +36,8 @@ vbell_msg " Wuff ---- Wuff!! " + # IC insert multiple chars + # nx terminal uses xon/xoff + +-termcap facit|vt100|xterm LP:G0 +-terminfo facit|vt100|xterm LP:G0 ++termcap facit|vt100|xterm|xterm-* LP:G0 ++terminfo facit|vt100|xterm|xterm-* LP:G0 + + #the vt100 description does not mention "dl". *sigh* + termcap vt100 dl=5\E[M +@@ -55,15 +55,15 @@ terminfo sun 'up=^K:AL=\E[%p1%dL:DL=\E[% + #xterm understands both im/ic and doesn't have a status line. + #Note: Do not specify im and ic in the real termcap/info file as + #some programs (e.g. vi) will (no,no, may (jw)) not work anymore. +-termcap xterm|fptwist hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l +-terminfo xterm|fptwist hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l ++#termcap xterm|fptwist hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l ++#terminfo xterm|fptwist hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l + + # Long time I had this in my private screenrc file. But many people + # seem to want it (jw): + # we do not want the width to change to 80 characters on startup: + # on suns, /etc/termcap has :is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l: +-termcap xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' +-terminfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' ++#termcap xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' ++#terminfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' + + # + # Do not use xterms alternate window buffer. +diff -up screen-4.0.3/etc/screenrc.screenrc screen-4.0.3/etc/screenrc +--- screen-4.0.3/etc/screenrc.screenrc 2006-10-23 15:06:32.000000000 +0200 ++++ screen-4.0.3/etc/screenrc 2009-09-25 14:31:30.000000000 +0200 +@@ -1,21 +1,11 @@ +-# +-# Example of a user's .screenrc file +-# +- + # This is how one can set a reattach password: + # password ODSJQf.4IJN7E # "1234" + +-# no annoying audible bell, please +-vbell on +- +-# detach on hangup +-autodetach on +- + # don't display the copyright page + startup_message off + + # emulate .logout message +-pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended." ++pow_detach_msg "Screen session of $LOGNAME $:cr:$:nl:ended." + + # advertise hardstatus support to $TERMCAP + # termcapinfo * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\' +@@ -40,18 +30,12 @@ defscrollback 1000 + + ################ + # +-# xterm tweaks ++# more xterm tweaks + # + +-#xterm understands both im/ic and doesn't have a status line. +-#Note: Do not specify im and ic in the real termcap/info file as +-#some programs (e.g. vi) will not work anymore. +-termcap xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l +-terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l +- + #80/132 column switching must be enabled for ^AW to work + #change init sequence to not switch width +-termcapinfo xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l ++#termcapinfo xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l + + # Make the output buffer large for (fast) xterms. + #termcapinfo xterm* OL=10000 +@@ -59,18 +43,18 @@ termcapinfo xterm* OL=100 + + # tell screen that xterm can switch to dark background and has function + # keys. +-termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l' +-termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~' +-termcapinfo xterm 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~' ++termcapinfo xterm|xterm-* 'VR=\E[?5h:VN=\E[?5l' ++#termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~' ++#termcapinfo xterm 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~' + + # special xterm hardstatus: use the window title. +-termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007' ++termcapinfo xterm|xterm-* 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007' + + #terminfo xterm 'vb=\E[?5h$<200/>\E[?5l' +-termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l' ++#termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l' + + # emulate part of the 'K' charset +-termcapinfo xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337' ++termcapinfo xterm|xterm-* 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337' + + # xterm-52 tweaks: + # - uses background color for delete operations +@@ -103,32 +87,12 @@ termcapinfo linux C8 + # old rxvt versions also need this + # termcapinfo rxvt C8 + +- +-################ +-# +-# keybindings +-# +- +-#remove some stupid / dangerous key bindings +-bind k +-bind ^k +-bind . +-bind ^\ +-bind \\ +-bind ^h +-bind h +-#make them better +-bind 'K' kill +-bind 'I' login on +-bind 'O' login off +-bind '}' history +- + # Yet another hack: + # Prepend/append register [/] to the paste if ^a^] is pressed. + # This lets me have autoindent mode in vi. +-register [ "\033:se noai\015a" +-register ] "\033:se ai\015a" +-bind ^] paste [.] ++#register [ "\033:se noai\015a" ++#register ] "\033:se ai\015a" ++#bind ^] paste [.] + + ################ + # +@@ -140,9 +104,14 @@ bind ^] paste [.] + # screen -t 40 2 rlogin server + + # caption always "%3n %t%? @%u%?%? [%h]%?%=%c" ++## alternative caption, gives window list, LOGNAME and current date: ++# caption always "%{wk}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw %=%{mk}@%H %{yk}%D %{ck}%M%{wk} %{ck}%d %{gk}%c" + # hardstatus alwaysignore + # hardstatus alwayslastline "%Lw" + ++# Red Hat's normal status line ++hardstatus string "[screen %n%?: %t%?] %h" ++ + # bind = resize = + # bind + resize +1 + # bind - resize -1 diff --git a/SOURCES/screen-4.1.0-caption-padding.patch b/SOURCES/screen-4.1.0-caption-padding.patch new file mode 100644 index 0000000..2b1bafe --- /dev/null +++ b/SOURCES/screen-4.1.0-caption-padding.patch @@ -0,0 +1,14 @@ +diff -urNp old/src/screen.c new/src/screen.c +--- old/src/screen.c 2017-10-04 09:49:28.274367045 +0200 ++++ new/src/screen.c 2017-10-04 09:50:40.154585607 +0200 +@@ -2278,8 +2278,8 @@ int padlen; + while (i-- > 0) + *pn-- = ' '; + numpad--; +- if (r && p - buf == winmsg_rendpos[r - 1]) +- winmsg_rendpos[--r] = pn - buf; ++ if (r && p - buf + 1 == winmsg_rendpos[r - 1]) ++ winmsg_rendpos[--r] = pn - buf + 1; + } + } + return pn2; diff --git a/SOURCES/screen-4.1.0-crypt.patch b/SOURCES/screen-4.1.0-crypt.patch new file mode 100644 index 0000000..0a61591 --- /dev/null +++ b/SOURCES/screen-4.1.0-crypt.patch @@ -0,0 +1,114 @@ +diff -Naur screen-orig/src/acls.c screen/src/acls.c +--- screen-orig/src/acls.c 2012-03-07 06:05:35.000000000 -0500 ++++ screen/src/acls.c 2012-04-23 22:57:03.595468724 -0400 +@@ -544,12 +544,25 @@ + + if (pw2 && *pw2 && *pw2 != '\377') /* provided a system password */ + { +- if (!*pass || /* but needed none */ +- strcmp(crypt(pw2, pass), pass)) ++ if (!*pass) /* but needed none */ + { + debug("System password mismatch\n"); + sorry++; + } ++ else ++ { ++ char *cryptbuf = crypt(pw2, pass); ++ if(cryptbuf == NULL) ++ { ++ debug("System crypt() failed\n"); ++ sorry++; ++ } ++ else if (strcmp(cryptbuf, pass)) ++ { ++ debug("System password mismatch\n"); ++ sorry++; ++ } ++ } + } + else /* no pasword provided */ + if (*pass) /* but need one */ +@@ -557,12 +570,29 @@ + #endif + 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)) ++ char *cryptbuf; ++ if (!*u->u_password) /* but needed none */ + { + debug("screen password mismatch\n"); +- sorry++; ++ sorry++; + } ++ else ++ { ++ cryptbuf = crypt(pw1, u->u_password); ++ if (cryptbuf == NULL) ++ { ++ debug("crypt() failed\n"); ++ sorry++; ++ } ++ else ++ { ++ if(strcmp(cryptbuf, u->u_password)) ++ { ++ debug("screen password mismatch\n"); ++ sorry++; ++ } ++ } ++ } + } + else /* no pasword provided */ + if (*u->u_password) /* but need one */ +diff -Naur screen-orig/src/misc.c screen/src/misc.c +--- screen-orig/src/misc.c 2012-03-07 06:05:35.000000000 -0500 ++++ screen/src/misc.c 2012-04-23 22:34:56.740665509 -0400 +@@ -56,6 +56,8 @@ + { + register char *cp; + ++ if(str == NULL) ++ Panic(0, "SaveStr() received NULL - possibly failed crypt()"); + if ((cp = malloc(strlen(str) + 1)) == NULL) + Panic(0, "%s", strnomem); + else +diff -Naur screen-orig/src/process.c screen/src/process.c +--- screen-orig/src/process.c 2012-03-07 06:05:35.000000000 -0500 ++++ screen/src/process.c 2012-04-23 22:41:09.318930088 -0400 +@@ -6343,6 +6343,10 @@ + salt[st] = 'A' + (int)((time(0) >> 6 * st) % 26); + salt[2] = 0; + buf = crypt(u->u_password, salt); ++ if(buf == NULL) { ++ Msg(0, "[ no working crypt() - no secure ]"); ++ return; ++ } + bzero(u->u_password, strlen(u->u_password)); + free((char *)u->u_password); + u->u_password = SaveStr(buf); +diff -Naur screen-orig/src/socket.c screen/src/socket.c +--- screen-orig/src/socket.c 2012-04-23 22:17:55.678316716 -0400 ++++ screen/src/socket.c 2012-04-23 22:29:12.225173900 -0400 +@@ -1565,13 +1565,18 @@ + c = *(unsigned char *)ibuf++; + if (c == '\r' || c == '\n') + { ++ char *buf; + 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 == NULL) || (strncmp(buf, up, strlen(up)))) + { + /* uh oh, user failed */ + bzero(pwdata->buf, sizeof(pwdata->buf)); +- AddStr("\r\nPassword incorrect.\r\n"); ++ if(buf==NULL) ++ 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); diff --git a/SOURCES/screen-4.1.0-long-term.patch b/SOURCES/screen-4.1.0-long-term.patch new file mode 100644 index 0000000..38213d1 --- /dev/null +++ b/SOURCES/screen-4.1.0-long-term.patch @@ -0,0 +1,26 @@ +diff --git a/src/display.h b/src/display.h +index e8b3b80..b1ab748 100644 +--- a/src/display.h ++++ b/src/display.h +@@ -73,7 +73,7 @@ struct display + struct win *d_other; /* pointer to other window */ + int d_nonblock; /* -1 don't block if obufmax reached */ + /* >0: block after nonblock secs */ +- char d_termname[20 + 1]; /* $TERM */ ++ char d_termname[40 + 1]; /* $TERM */ + char *d_tentry; /* buffer for tgetstr */ + char d_tcinited; /* termcap inited flag */ + int d_width, d_height; /* width/height of the screen */ +diff --git a/src/screen.h b/src/screen.h +index 5c93f32..1a388e3 100644 +--- a/src/screen.h ++++ b/src/screen.h +@@ -214,7 +214,7 @@ struct msg + char preselect[20]; + int esc; /* his new escape character unless -1 */ + int meta_esc; /* his new meta esc character unless -1 */ +- char envterm[20 + 1]; /* terminal type */ ++ char envterm[40 + 1]; /* terminal type */ + int encoding; /* encoding of display */ + int detachfirst; /* whether to detach remote sessions first */ + } diff --git a/SOURCES/screen-4.1.0-reattach.patch b/SOURCES/screen-4.1.0-reattach.patch new file mode 100644 index 0000000..db67c2d --- /dev/null +++ b/SOURCES/screen-4.1.0-reattach.patch @@ -0,0 +1,13 @@ +diff --git a/src/screen.c b/src/screen.c +index af0fd82..cd0c71b 100644 +--- a/src/screen.c ++++ b/src/screen.c +@@ -1005,7 +1005,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) && !(!mflag && !SockMatch && sty && !xflag && !rflag)) + { + #ifndef NAMEDPIPE + int fl; diff --git a/SOURCES/screen-4.1.0-suppress_remap.patch b/SOURCES/screen-4.1.0-suppress_remap.patch new file mode 100644 index 0000000..85109a2 --- /dev/null +++ b/SOURCES/screen-4.1.0-suppress_remap.patch @@ -0,0 +1,13 @@ +Author: Loic Minier +Description: Unbreak several useful keybindings. +--- a/termcap.c ++++ b/termcap.c +@@ -552,8 +552,6 @@ + else + break; + } +- if (n < KMAP_KEYS) +- domap = 1; + if (map == 0 && domap) + return 0; + if (map && !domap) diff --git a/SOURCES/screen-E3.patch b/SOURCES/screen-E3.patch new file mode 100644 index 0000000..7438929 --- /dev/null +++ b/SOURCES/screen-E3.patch @@ -0,0 +1,62 @@ +commit 0aec2900f63820c3405ba38a4d1cd67cc22f0715 +Author: Miroslav Lichvar +Date: Mon Jul 18 17:26:47 2011 +0200 + + Clear scrollback buffer when locking terminal + + Linux kernel 3.0 adds a new command to clear the scrollback buffer in + the linux console. It's available in the ncurses terminfo entry as + extended capability E3. This is useful to prevent an attacker to read + content of a locked terminal via Shift-PgUp key. + +diff --git a/src/display.c b/src/display.c +index 5fa11cb..038c435 100644 +--- a/src/display.c ++++ b/src/display.c +@@ -3779,4 +3779,10 @@ char **cmdv; + + #endif /* BLANKER_PRG */ + ++void ++ClearScrollbackBuffer() ++{ ++ if (D_CE3) ++ AddCStr(D_CE3); ++} + +diff --git a/src/extern.h b/src/extern.h +index c787d99..d3fecf0 100644 +--- a/src/extern.h ++++ b/src/extern.h +@@ -316,6 +316,7 @@ extern int color256to88 __P((int)); + extern void ResetIdle __P((void)); + extern void KillBlanker __P((void)); + extern void DisplaySleep1000 __P((int, int)); ++extern void ClearScrollbackBuffer __P((void)); + + /* resize.c */ + extern int ChangeWindowSize __P((struct win *, int, int, int)); +diff --git a/src/screen.c b/src/screen.c +index cc8f565..3efb67b 100644 +--- a/src/screen.c ++++ b/src/screen.c +@@ -1967,6 +1967,7 @@ int mode; + #endif + case D_LOCK: + ClearAll(); ++ ClearScrollbackBuffer(); + sign = SIG_LOCK; + /* tell attacher to lock terminal with a lockprg. */ + break; +diff --git a/src/term.c b/src/term.c +index 991de1b..7485900 100644 +--- a/src/term.c ++++ b/src/term.c +@@ -83,6 +83,7 @@ struct term term[T_N] = + { "CD", T_STR }, + { "ce", T_STR }, + { "cb", T_STR }, ++ { "E3", T_STR }, + + /* initialise */ + { "is", T_STR }, diff --git a/SOURCES/screen-STIG-GEN003660.patch b/SOURCES/screen-STIG-GEN003660.patch new file mode 100644 index 0000000..42814e2 --- /dev/null +++ b/SOURCES/screen-STIG-GEN003660.patch @@ -0,0 +1,25 @@ +diff --git a/src/attacher.c b/src/attacher.c +index 2565a0f..9e916eb 100644 +--- a/src/attacher.c ++++ b/src/attacher.c +@@ -37,6 +37,10 @@ + + #include + ++#ifndef NOSYSLOG ++#include ++#endif ++ + static int WriteMessage __P((int, struct msg *)); + static sigret_t AttacherSigInt __P(SIGPROTOARG); + #if defined(SIGWINCH) && defined(TIOCGWINSZ) +@@ -1001,6 +1005,9 @@ screen_builtin_lck() + bzero(cp1, strlen(cp1)); + } + bzero(cp1, strlen(cp1)); ++#ifndef NOSYSLOG ++ syslog(LOG_AUTHPRIV | LOG_NOTICE, "authentication success; logname=%s uid=%d", ppp->pw_name, ppp->pw_uid); ++#endif + debug("password ok.\n"); + } + diff --git a/SOURCES/screen-altscreen.patch b/SOURCES/screen-altscreen.patch new file mode 100644 index 0000000..49e5cc4 --- /dev/null +++ b/SOURCES/screen-altscreen.patch @@ -0,0 +1,14 @@ +diff --git a/src/ansi.c b/src/ansi.c +index d88e153..8df79b2 100644 +--- a/src/ansi.c ++++ b/src/ansi.c +@@ -1438,8 +1438,8 @@ int c, intermediate; + } + else + { +- LeaveAltScreen(curr); + RestoreCursor(&curr->w_alt.cursor); ++ LeaveAltScreen(curr); + } + if (a1 == 47 && !i) + curr->w_saved.on = 0; diff --git a/SOURCES/screen-cc.patch b/SOURCES/screen-cc.patch new file mode 100644 index 0000000..2c2e94d --- /dev/null +++ b/SOURCES/screen-cc.patch @@ -0,0 +1,323 @@ +commit 6eb1f1426bfd99f88d927838d51eabc2b13e73af +Author: Miroslav Lichvar +Date: Thu Jan 13 17:37:47 2011 +0100 + + Avoid dereferencing null pointer in utmp.c. + +diff --git a/src/utmp.c b/src/utmp.c +index aae1948..fa8b87b 100644 +--- a/src/utmp.c ++++ b/src/utmp.c +@@ -575,7 +575,7 @@ struct win *wi; + return ut_delete_user(slot, u.ut_pid, 0, 0) != 0; + #endif + #ifdef HAVE_UTEMPTER +- if (eff_uid && wi->w_ptyfd != -1) ++ if (eff_uid && wi && wi->w_ptyfd != -1) + { + /* sigh, linux hackers made the helper functions void */ + if (SLOT_USED(u)) + +commit 4ebd6db10c712eb56d4e61f1a8d4a41d0465ed89 +Author: Miroslav Lichvar +Date: Thu Jan 13 17:36:06 2011 +0100 + + Add more tty checks. + +diff --git a/src/extern.h b/src/extern.h +index 2b9722e..c787d99 100644 +--- a/src/extern.h ++++ b/src/extern.h +@@ -110,6 +110,7 @@ extern void brktty __P((int)); + extern struct baud_values *lookup_baud __P((int bps)); + extern int SetBaud __P((struct mode *, int, int)); + extern int SttyMode __P((struct mode *, char *)); ++extern int CheckTtyname __P((char *)); + + + /* mark.c */ +diff --git a/src/screen.c b/src/screen.c +index 3dde3b4..cc8f565 100644 +--- a/src/screen.c ++++ b/src/screen.c +@@ -970,8 +970,13 @@ char **av; + else \ + attach_tty = ""; \ + } \ +- else if (stat(attach_tty, &st)) \ +- Panic(errno, "Cannot access '%s'", attach_tty); \ ++ else \ ++ { \ ++ if (stat(attach_tty, &st)) \ ++ Panic(errno, "Cannot access '%s'", attach_tty); \ ++ if (CheckTtyname(attach_tty)) \ ++ Panic(0, "Bad tty '%s'", attach_tty); \ ++ } \ + if (strlen(attach_tty) >= MAXPATHLEN) \ + Panic(0, "TtyName too long - sorry."); \ + } while (0) +diff --git a/src/tty.sh b/src/tty.sh +index f2afd54..e264796 100644 +--- a/src/tty.sh ++++ b/src/tty.sh +@@ -60,6 +60,7 @@ exit 0 + #include + #include + #include ++#include + #ifndef sgi + # include + #endif +@@ -1506,6 +1507,19 @@ int ibaud, obaud; + return 0; + } + ++ ++int ++CheckTtyname (tty) ++char *tty; ++{ ++ struct stat st; ++ ++ if (lstat(tty, &st) || !S_ISCHR(st.st_mode) || ++ (st.st_nlink > 1 && strncmp(tty, "/dev/", 5))) ++ return -1; ++ return 0; ++} ++ + /* + * Write out the mode struct in a readable form + */ +diff --git a/src/utmp.c b/src/utmp.c +index afa0948..aae1948 100644 +--- a/src/utmp.c ++++ b/src/utmp.c +@@ -361,7 +361,7 @@ RemoveLoginSlot() + char *tty; + debug("couln't zap slot -> do mesg n\n"); + D_loginttymode = 0; +- if ((tty = ttyname(D_userfd)) && stat(tty, &stb) == 0 && (int)stb.st_uid == real_uid && ((int)stb.st_mode & 0777) != 0666) ++ if ((tty = ttyname(D_userfd)) && stat(tty, &stb) == 0 && (int)stb.st_uid == real_uid && !CheckTtyname(tty) && ((int)stb.st_mode & 0777) != 0666) + { + D_loginttymode = (int)stb.st_mode & 0777; + chmod(D_usertty, stb.st_mode & 0600); +@@ -387,7 +387,7 @@ RestoreLoginSlot() + } + UT_CLOSE; + D_loginslot = (slot_t)0; +- if (D_loginttymode && (tty = ttyname(D_userfd))) ++ if (D_loginttymode && (tty = ttyname(D_userfd)) && !CheckTtyname(tty)) + chmod(tty, D_loginttymode); + } + +@@ -853,7 +853,7 @@ getlogin() + + for (fd = 0; fd <= 2 && (tty = ttyname(fd)) == NULL; fd++) + ; +- if ((tty == NULL) || ((fd = open(UTMP_FILE, O_RDONLY)) < 0)) ++ if ((tty == NULL) || CheckTtyname(tty) || ((fd = open(UTMP_FILE, O_RDONLY)) < 0)) + return NULL; + tty = stripdev(tty); + retbuf[0] = '\0'; + +commit 8e7fcb821dc7204a27d88707284e259444671c12 +Author: Miroslav Lichvar +Date: Thu Jan 13 17:31:16 2011 +0100 + + Don't assign address of auto variable to outer scope symbol. + +diff --git a/src/socket.c b/src/socket.c +index 940034d..7507d75 100644 +--- a/src/socket.c ++++ b/src/socket.c +@@ -722,6 +722,7 @@ struct msg *mp; + char *args[MAXARGS]; + register int n; + register char **pp = args, *p = mp->m.create.line; ++ char buf[20]; + + nwin = nwin_undef; + n = mp->m.create.nargs; +@@ -731,7 +732,6 @@ struct msg *mp; + if (n) + { + int l, num; +- char buf[20]; + + l = strlen(p); + if (IsNumColon(p, 10, buf, sizeof(buf))) + +commit 2a0e0dc7e05b36f374a074f6627efece3695f8c7 +Author: Miroslav Lichvar +Date: Thu Jan 13 17:24:04 2011 +0100 + + Remove redundant if statements. + +diff --git a/src/braille_tsi.c b/src/braille_tsi.c +index 6768291..6f84913 100644 +--- a/src/braille_tsi.c ++++ b/src/braille_tsi.c +@@ -127,7 +127,6 @@ display_status_tsi() + r = read(bd.bd_fd,ibuf,1); + if (r != 1) + return -1; +- if (r != -1) + if (ibuf[0] == 'V') + r = read(bd.bd_fd, ibuf, 3); + else +diff --git a/src/fileio.c b/src/fileio.c +index 88fbf64..bd29011 100644 +--- a/src/fileio.c ++++ b/src/fileio.c +@@ -80,8 +80,6 @@ register char *str1, *str2; + } + else + { +- if (len1 == 0) +- return 0; + if ((cp = malloc((unsigned) len1 + add_colon + 1)) == NULL) + Panic(0, "%s", strnomem); + cp[len1 + add_colon] = '\0'; + +commit e75e7a0cf5319e10aae0c45e17ce70d86ef2aee8 +Author: Miroslav Lichvar +Date: Thu Jan 13 17:18:59 2011 +0100 + + Set PAM_TTY item. + +diff --git a/src/attacher.c b/src/attacher.c +index 1fab5b2..460f1ea 100644 +--- a/src/attacher.c ++++ b/src/attacher.c +@@ -861,6 +861,7 @@ screen_builtin_lck() + #ifdef USE_PAM + pam_handle_t *pamh = 0; + int pam_error; ++ char *tty_name; + #else + char *pass, mypass[16 + 1], salt[3]; + #endif +@@ -932,6 +933,15 @@ screen_builtin_lck() + pam_error = pam_start("screen", ppp->pw_name, &PAM_conversation, &pamh); + if (pam_error != PAM_SUCCESS) + AttacherFinit(SIGARG); /* goodbye */ ++ ++ if (strncmp(attach_tty, "/dev/", 5) == 0) ++ tty_name = attach_tty + 5; ++ else ++ tty_name = attach_tty; ++ pam_error = pam_set_item(pamh, PAM_TTY, tty_name); ++ if (pam_error != PAM_SUCCESS) ++ AttacherFinit(SIGARG); /* goodbye */ ++ + pam_error = pam_authenticate(pamh, 0); + pam_end(pamh, pam_error); + PAM_conversation.appdata_ptr = 0; + +commit eb2e13f633f9615e9b60f19e1649f46bd07b2802 +Author: Miroslav Lichvar +Date: Thu Jan 13 17:16:59 2011 +0100 + + Check return code from setgid/setuid. + +diff --git a/src/attacher.c b/src/attacher.c +index 370d594..1fab5b2 100644 +--- a/src/attacher.c ++++ b/src/attacher.c +@@ -185,8 +185,8 @@ int how; + if (ret == SIG_POWER_BYE) + { + int ppid; +- setgid(real_gid); +- setuid(real_uid); ++ if (setgid(real_gid) || setuid(real_uid)) ++ Panic(errno, "setuid/gid"); + if ((ppid = getppid()) > 1) + Kill(ppid, SIGHUP); + exit(0); +@@ -282,7 +282,10 @@ int how; + #ifdef MULTIUSER + if (!multiattach) + #endif +- setuid(real_uid); ++ { ++ if (setuid(real_uid)) ++ Panic(errno, "setuid"); ++ } + #if defined(MULTIUSER) && defined(USE_SETEUID) + else + { +@@ -290,7 +293,8 @@ int how; + xseteuid(real_uid); /* multi_uid, allow backend to send signals */ + } + #endif +- setgid(real_gid); ++ if (setgid(real_gid)) ++ Panic(errno, "setgid"); + eff_uid = real_uid; + eff_gid = real_gid; + +@@ -486,7 +490,8 @@ AttacherFinit SIGDEFARG + #ifdef MULTIUSER + if (tty_oldmode >= 0) + { +- setuid(own_uid); ++ if (setuid(own_uid)) ++ Panic(errno, "setuid"); + chmod(attach_tty, tty_oldmode); + } + #endif +@@ -504,11 +509,14 @@ AttacherFinitBye SIGDEFARG + if (multiattach) + exit(SIG_POWER_BYE); + #endif +- setgid(real_gid); ++ if (setgid(real_gid)) ++ Panic(errno, "setgid"); + #ifdef MULTIUSER +- setuid(own_uid); ++ if (setuid(own_uid)) ++ Panic(errno, "setuid"); + #else +- setuid(real_uid); ++ if (setuid(real_uid)) ++ Panic(errno, "setuid"); + #endif + /* we don't want to disturb init (even if we were root), eh? jw */ + if ((ppid = getppid()) > 1) +@@ -679,11 +687,14 @@ static sigret_t + LockHup SIGDEFARG + { + int ppid = getppid(); +- setgid(real_gid); ++ if (setgid(real_gid)) ++ Panic(errno, "setgid"); + #ifdef MULTIUSER +- setuid(own_uid); ++ if (setuid(own_uid)) ++ Panic(errno, "setuid"); + #else +- setuid(real_uid); ++ if (setuid(real_uid)) ++ Panic(errno, "setuid"); + #endif + if (ppid > 1) + Kill(ppid, SIGHUP); +@@ -710,11 +721,14 @@ LockTerminal() + if ((pid = fork()) == 0) + { + /* Child */ +- setgid(real_gid); ++ if (setgid(real_gid)) ++ Panic(errno, "setgid"); + #ifdef MULTIUSER +- setuid(own_uid); ++ if (setuid(own_uid)) ++ Panic(errno, "setuid"); + #else +- setuid(real_uid); /* this should be done already */ ++ if (setuid(real_uid)) /* this should be done already */ ++ Panic(errno, "setuid"); + #endif + closeallfiles(0); /* important: /etc/shadow may be open */ + execl(prg, "SCREEN-LOCK", NULL); diff --git a/SOURCES/screen-fix-term.patch b/SOURCES/screen-fix-term.patch new file mode 100644 index 0000000..aaef501 --- /dev/null +++ b/SOURCES/screen-fix-term.patch @@ -0,0 +1,163 @@ +diff --git a/src/acls.c b/src/acls.c +index 3f40541..e5a32a4 100644 +--- a/src/acls.c ++++ b/src/acls.c +@@ -182,7 +182,7 @@ struct acluser **up; + #endif + (*up)->u_Esc = DefaultEsc; + (*up)->u_MetaEsc = DefaultMetaEsc; +- strncpy((*up)->u_name, name, 20); ++ strncpy((*up)->u_name, name, MAXLOGINLEN); + (*up)->u_password = NULL; + if (pass) + (*up)->u_password = SaveStr(pass); +@@ -318,8 +318,8 @@ struct acluser **up; + return UserAdd(name, pass, up); + if (!strcmp(name, "nobody")) /* he remains without password */ + return -1; +- strncpy((*up)->u_password, pass ? pass : "", 20); +- (*up)->u_password[20] = '\0'; ++ strncpy((*up)->u_password, pass ? pass : "", MAXLOGINLEN); ++ (*up)->u_password[MAXLOGINLEN] = '\0'; + return 0; + } + #endif +diff --git a/src/acls.h b/src/acls.h +index 907e953..42c7c18 100644 +--- a/src/acls.h ++++ b/src/acls.h +@@ -78,7 +78,7 @@ struct plop + typedef struct acluser + { + struct acluser *u_next; /* continue the main user list */ +- char u_name[20+1]; /* login name how he showed up */ ++ char u_name[MAXLOGINLEN + 1]; /* login name how he showed up */ + char *u_password; /* his password (may be NullStr). */ + int u_checkpassword; /* nonzero if this u_password is valid */ + int u_detachwin; /* the window where he last detached */ +diff --git a/src/comm.c b/src/comm.c +index 5f4af8a..7705fcb 100644 +--- a/src/comm.c ++++ b/src/comm.c +@@ -36,6 +36,7 @@ + */ + + #include "config.h" ++#include "os.h" + #include "acls.h" + #include "comm.h" + +diff --git a/src/display.h b/src/display.h +index b1ab748..a433e6d 100644 +--- a/src/display.h ++++ b/src/display.h +@@ -73,7 +73,7 @@ struct display + struct win *d_other; /* pointer to other window */ + int d_nonblock; /* -1 don't block if obufmax reached */ + /* >0: block after nonblock secs */ +- char d_termname[40 + 1]; /* $TERM */ ++ char d_termname[MAXTERMLEN + 1]; /* $TERM */ + char *d_tentry; /* buffer for tgetstr */ + char d_tcinited; /* termcap inited flag */ + int d_width, d_height; /* width/height of the screen */ +diff --git a/src/os.h b/src/os.h +index 5c17c83..bc71c97 100644 +--- a/src/os.h ++++ b/src/os.h +@@ -521,3 +521,8 @@ typedef struct fd_set { int fds_bits[1]; } fd_set; + */ + #define IOSIZE 4096 + ++/* Changing those you won't be able to attach to your old sessions ++ * when changing those values in official tree don't forget to bump ++ * MSG_VERSION */ ++#define MAXTERMLEN 50 ++#define MAXLOGINLEN 256 +diff --git a/src/process.c b/src/process.c +index 7817ac8..a3c2e3d 100644 +--- a/src/process.c ++++ b/src/process.c +@@ -2649,9 +2649,9 @@ int key; + s = NULL; + if (ParseSaveStr(act, &s)) + break; +- if (strlen(s) >= 20) ++ if (strlen(s) >= MAXTERMLEN) + { +- OutputMsg(0, "%s: term: argument too long ( < 20)", rc_name); ++ OutputMsg(0, "%s: term: argument too long ( < %d)", rc_name, MAXTERMLEN); + free(s); + break; + } +diff --git a/src/screen.c b/src/screen.c +index cd0c71b..7a21762 100644 +--- a/src/screen.c ++++ b/src/screen.c +@@ -995,10 +995,10 @@ char **av; + + if (home == 0 || *home == '\0') + home = ppp->pw_dir; +- if (strlen(LoginName) > 20) ++ if (strlen(LoginName) > MAXLOGINLEN) + Panic(0, "LoginName too long - sorry."); + #ifdef MULTIUSER +- if (multi && strlen(multi) > 20) ++ if (multi && strlen(multi) > MAXLOGINLEN) + Panic(0, "Screen owner name too long - sorry."); + #endif + if (strlen(home) > MAXPATHLEN - 25) +diff --git a/src/screen.h b/src/screen.h +index 1a388e3..30ecefb 100644 +--- a/src/screen.h ++++ b/src/screen.h +@@ -202,32 +202,32 @@ struct msg + int nargs; + char line[MAXPATHLEN]; + char dir[MAXPATHLEN]; +- char screenterm[20]; /* is screen really "screen" ? */ ++ char screenterm[MAXTERMLEN]; /* is screen really "screen" ? */ + } + create; + struct + { +- char auser[20 + 1]; /* username */ ++ char auser[MAXLOGINLEN + 1]; /* username */ + int apid; /* pid of frontend */ + int adaptflag; /* adapt window size? */ + int lines, columns; /* display size */ + char preselect[20]; + int esc; /* his new escape character unless -1 */ + int meta_esc; /* his new meta esc character unless -1 */ +- char envterm[40 + 1]; /* terminal type */ ++ char envterm[MAXTERMLEN + 1]; /* terminal type */ + int encoding; /* encoding of display */ + int detachfirst; /* whether to detach remote sessions first */ + } + attach; + struct + { +- char duser[20 + 1]; /* username */ ++ char duser[MAXLOGINLEN + 1]; /* username */ + int dpid; /* pid of frontend */ + } + detach; + struct + { +- char auser[20 + 1]; /* username */ ++ char auser[MAXLOGINLEN + 1]; /* username */ + int nargs; + char cmd[MAXPATHLEN]; /* command */ + int apid; /* pid of frontend */ +diff --git a/src/socket.c b/src/socket.c +index 1f04284..32c5047 100644 +--- a/src/socket.c ++++ b/src/socket.c +@@ -1528,7 +1528,7 @@ static void PasswordProcessInput __P((char *, int)); + + struct pwdata { + int l; +- char buf[20 + 1]; ++ char buf[MAXLOGINLEN + 1]; + struct msg m; + }; + diff --git a/SOURCES/screen-help-update.patch b/SOURCES/screen-help-update.patch new file mode 100644 index 0000000..a8196b8 --- /dev/null +++ b/SOURCES/screen-help-update.patch @@ -0,0 +1,20 @@ +diff --git a/src/help.c b/src/help.c +index 095f96b..a2b8614 100644 +--- a/src/help.c ++++ b/src/help.c +@@ -86,12 +86,14 @@ char *myname, *message, *arg; + #if defined(LOGOUTOK) && defined(UTMPOK) + printf("-l Login mode on (update %s), -ln = off.\n", UTMPFILE); + #endif +- printf("-ls [match] or -list. Do nothing, just list our SockDir [on possible matches].\n"); ++ printf("-ls [match] or\n"); ++ printf("-list Do nothing, just list our SockDir [on possible matches].\n"); + printf("-L Turn on output logging.\n"); + printf("-m ignore $STY variable, do create a new screen session.\n"); + printf("-O Choose optimal output rather than exact vt100 emulation.\n"); + printf("-p window Preselect the named window if it exists.\n"); + printf("-q Quiet startup. Exits with non-zero return code if unsuccessful.\n"); ++ printf("-Q Commands will send the response to the stdout of the querying process.\n"); + printf("-r [session] Reattach to a detached screen process.\n"); + printf("-R Reattach if possible, otherwise start a new session.\n"); + printf("-s shell Shell to execute rather than $SHELL.\n"); diff --git a/SOURCES/screen-ipv6.patch b/SOURCES/screen-ipv6.patch new file mode 100644 index 0000000..baad227 --- /dev/null +++ b/SOURCES/screen-ipv6.patch @@ -0,0 +1,345 @@ +diff -up screen/src/doc/screen.1.ipv6 screen/src/doc/screen.1 +--- screen/src/doc/screen.1.ipv6 2010-11-11 03:47:46.000000000 +0100 ++++ screen/src/doc/screen.1 2011-02-03 16:05:35.957087079 +0100 +@@ -398,6 +398,12 @@ Send the specified command to a running + 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. ++.TP 5 ++.B \-4 ++Resolve hostnames only to IPv4 addresses. ++.TP 5 ++.B \-6 ++Resolve hostnames only to IPv6 addresses. + + .SH "DEFAULT KEY BINDINGS" + .ta 12n 26n +diff -up screen/src/extern.h.ipv6 screen/src/extern.h +--- screen/src/extern.h.ipv6 2010-11-11 03:47:46.000000000 +0100 ++++ screen/src/extern.h 2011-02-03 16:04:35.995743620 +0100 +@@ -455,8 +455,7 @@ extern void ExitOverlayPage __P((void)) + + /* teln.c */ + #ifdef BUILTIN_TELNET +-extern int TelOpen __P((char **)); +-extern int TelConnect __P((struct win *)); ++extern int TelOpenAndConnect __P((struct win *)); + extern int TelIsline __P((struct win *p)); + extern void TelProcessLine __P((char **, int *)); + extern int DoTelnet __P((char *, int *, int)); +diff -up screen/src/help.c.ipv6 screen/src/help.c +--- screen/src/help.c.ipv6 2010-11-11 03:47:46.000000000 +0100 ++++ screen/src/help.c 2011-02-03 16:04:35.992744154 +0100 +@@ -66,6 +66,10 @@ char *myname, *message, *arg; + { + printf("Use: %s [-opts] [cmd [args]]\n", myname); + printf(" or: %s -r [host.tty]\n\nOptions:\n", myname); ++#ifdef BUILTIN_TELNET ++ printf("-4 Resolve hostnames only to IPv4 addresses.\n"); ++ printf("-6 Resolve hostnames only to IPv6 addresses.\n"); ++#endif + printf("-a Force all capabilities into each window's termcap.\n"); + printf("-A -[r|R] Adapt all windows to the new display width & height.\n"); + printf("-c file Read configuration file instead of '.screenrc'.\n"); +diff -up screen/src/screen.c.ipv6 screen/src/screen.c +--- screen/src/screen.c.ipv6 2010-11-11 03:47:46.000000000 +0100 ++++ screen/src/screen.c 2011-02-03 16:04:35.994743798 +0100 +@@ -248,8 +248,9 @@ struct layer *flayer; + struct win *fore; + struct win *windows; + struct win *console_window; +- +- ++#ifdef BUILTIN_TELNET ++int af; ++#endif + + /* + * Do this last +@@ -507,6 +508,9 @@ char **av; + nwin = nwin_undef; + nwin_options = nwin_undef; + strcpy(screenterm, "screen"); ++#ifdef BUILTIN_TELNET ++ af = AF_UNSPEC; ++#endif + + logreopen_register(lf_secreopen); + +@@ -541,6 +545,14 @@ char **av; + { + switch (*ap) + { ++#ifdef BUILTIN_TELNET ++ case '4': ++ af = AF_INET; ++ break; ++ case '6': ++ af = AF_INET6; ++ break; ++#endif + case 'a': + nwin_options.aflag = 1; + break; +diff -up screen/src/teln.c.ipv6 screen/src/teln.c +--- screen/src/teln.c.ipv6 2010-11-11 03:47:46.000000000 +0100 ++++ screen/src/teln.c 2011-02-03 16:04:35.992744154 +0100 +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + #include "config.h" + +@@ -42,12 +43,13 @@ extern struct win *fore; + extern struct layer *flayer; + extern int visual_bell; + extern char screenterm[]; ++extern int af; + + static void TelReply __P((struct win *, char *, int)); + static void TelDocmd __P((struct win *, int, int)); + static void TelDosub __P((struct win *)); +- +-#define TEL_DEFPORT 23 ++// why TEL_DEFPORT has " ++#define TEL_DEFPORT "23" + #define TEL_CONNECTING (-2) + + #define TC_IAC 255 +@@ -105,86 +107,78 @@ char *data; + } + + int +-TelOpen(args) +-char **args; +-{ +- int fd; +- int on = 1; +- +- if ((fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) +- { +- Msg(errno, "TelOpen: socket"); +- return -1; +- } +- if (setsockopt(fd, SOL_SOCKET, SO_OOBINLINE, (char *)&on, sizeof(on))) +- Msg(errno, "TelOpen: setsockopt SO_OOBINLINE"); +- return fd; +-} +- +-int +-TelConnect(p) +-struct win *p; +-{ +- int port = TEL_DEFPORT; +- struct hostent *hp; +- char **args; ++TelOpenAndConnect(struct win *p) { ++ int fd, on = 1; + char buf[256]; + +- args = p->w_cmdargs + 1; +- +- if (!*args) +- { +- Msg(0, "Usage: screen //telnet host [port]"); +- return -1; +- } +- if (args[1]) +- port = atoi(args[1]); +- p->w_telsa.sin_family = AF_INET; +- if((p->w_telsa.sin_addr.s_addr = inet_addr(*args)) == -1) +- { +- if ((hp = gethostbyname(*args)) == NULL) +- { +- Msg(0, "unknown host: %s", *args); +- return -1; +- } +- if (hp->h_length != sizeof(p->w_telsa.sin_addr.s_addr) || hp->h_addrtype != AF_INET) +- { +- Msg(0, "Bad address type for %s", hp->h_name); +- return -1; +- } +- bcopy((char *)hp->h_addr,(char *)&p->w_telsa.sin_addr.s_addr, hp->h_length); +- p->w_telsa.sin_family = hp->h_addrtype; +- } +- p->w_telsa.sin_port = htons(port); +- if (port != TEL_DEFPORT) +- sprintf(buf, "Trying %s %d...", inet_ntoa(p->w_telsa.sin_addr), port); +- else +- sprintf(buf, "Trying %s...", inet_ntoa(p->w_telsa.sin_addr)); +- WriteString(p, buf, strlen(buf)); +- if (connect(p->w_ptyfd, (struct sockaddr *)&p->w_telsa, sizeof(p->w_telsa))) +- { +- if (errno == EINPROGRESS) +- { +- p->w_telstate = TEL_CONNECTING; +- p->w_telconnev.fd = p->w_ptyfd; +- p->w_telconnev.handler = tel_connev_fn; +- p->w_telconnev.data = (char *)p; +- p->w_telconnev.type = EV_WRITE; +- p->w_telconnev.pri = 1; +- debug("telnet connect in progress...\n"); +- evenq(&p->w_telconnev); +- } +- else +- { +- Msg(errno, "TelOpen: connect"); +- return -1; +- } +- } +- else +- WriteString(p, "connected.\r\n", 12); +- if (port == TEL_DEFPORT) +- TelReply(p, (char *)tn_init, sizeof(tn_init)); +- return 0; ++ struct addrinfo hints, *res0, *res; ++ ++ if (!(p->w_cmdargs[1])) { ++ Msg(0, "Usage: screen //telnet host [port]"); ++ return -1; ++ } ++ ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_family = af; ++ hints.ai_socktype = SOCK_STREAM; ++ hints.ai_protocol = IPPROTO_TCP; ++ if(getaddrinfo(p->w_cmdargs[1], p->w_cmdargs[2] ? p->w_cmdargs[2] : TEL_DEFPORT, ++ &hints, &res0)) { ++ Msg(0, "unknown host: %s", p->w_cmdargs[1]); ++ return -1; ++ } ++ ++ for(res = res0; res; res = res->ai_next) { ++ if((fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol)) == -1) { ++ if(res->ai_next) ++ continue; ++ else { ++ Msg(errno, "TelOpenAndConnect: socket"); ++ freeaddrinfo(res0); ++ return -1; ++ } ++ } ++ ++ if (setsockopt(fd, SOL_SOCKET, SO_OOBINLINE, (char *)&on, sizeof(on))) ++ Msg(errno, "TelOpenAndConnect: setsockopt SO_OOBINLINE"); ++ ++ if (p->w_cmdargs[2] && strcmp(p->w_cmdargs[2], TEL_DEFPORT)) ++ snprintf(buf, 256, "Trying %s %s...", p->w_cmdargs[1], p->w_cmdargs[2]); ++ else ++ snprintf(buf, 256, "Trying %s...", p->w_cmdargs[1]); ++ WriteString(p, buf, strlen(buf)); ++ if (connect(fd, res->ai_addr, res->ai_addrlen)) { ++ if (errno == EINPROGRESS) { ++ p->w_telstate = TEL_CONNECTING; ++ p->w_telconnev.fd = fd; ++ p->w_telconnev.handler = tel_connev_fn; ++ p->w_telconnev.data = (char *)p; ++ p->w_telconnev.type = EV_WRITE; ++ p->w_telconnev.pri = 1; ++ debug("telnet connect in progress...\n"); ++ evenq(&p->w_telconnev); ++ } ++ else { ++ close(fd); ++ if(res->ai_next) ++ continue; ++ else { ++ Msg(errno, "TelOpenAndConnect: connect"); ++ freeaddrinfo(res0); ++ return -1; ++ } ++ } ++ } ++ else ++ WriteString(p, "connected.\r\n", 12); ++ if (!(p->w_cmdargs[2] && strcmp(p->w_cmdargs[2], TEL_DEFPORT))) ++ TelReply(p, (char *)tn_init, sizeof(tn_init)); ++ p->w_ptyfd = fd; ++ memcpy(&p->w_telsa, &res->ai_addr, sizeof(res->ai_addr)); ++ freeaddrinfo(res0); ++ return 0; ++ } ++ return -1; + } + + int +diff -up screen/src/window.c.ipv6 screen/src/window.c +--- screen/src/window.c.ipv6 2010-11-11 03:47:46.000000000 +0100 ++++ screen/src/window.c 2011-02-03 16:30:56.900750293 +0100 +@@ -605,6 +605,13 @@ struct NewWindow *newwin; + n = pp - wtab; + debug1("Makewin creating %d\n", n); + ++#ifdef BUILTIN_TELNET ++ if(!strcmp(nwin.args[0], "//telnet")) { ++ type = W_TYPE_TELNET; ++ TtyName = "telnet"; ++ } ++ else ++#endif + if ((f = OpenDevice(nwin.args, nwin.lflag, &type, &TtyName)) < 0) + return -1; + if (type == W_TYPE_GROUP) +@@ -766,7 +773,7 @@ struct NewWindow *newwin; + #ifdef BUILTIN_TELNET + if (type == W_TYPE_TELNET) + { +- if (TelConnect(p)) ++ if (TelOpenAndConnect(p)) + { + FreeWindow(p); + return -1; +@@ -878,6 +885,13 @@ struct win *p; + int lflag, f; + + lflag = nwin_default.lflag; ++#ifdef BUILTIN_TELNET ++ if(!strcmp(p->w_cmdargs[0], "//telnet")) { ++ p->w_type = W_TYPE_TELNET; ++ TtyName = "telnet"; ++ } ++ else ++#endif + if ((f = OpenDevice(p->w_cmdargs, lflag, &p->w_type, &TtyName)) < 0) + return -1; + +@@ -909,7 +923,7 @@ struct win *p; + #ifdef BUILTIN_TELNET + if (p->w_type == W_TYPE_TELNET) + { +- if (TelConnect(p)) ++ if (TelOpenAndConnect(p)) + return -1; + } + else +@@ -1068,16 +1082,6 @@ char **namep; + *namep = "telnet"; + return 0; + } +-#ifdef BUILTIN_TELNET +- if (strcmp(arg, "//telnet") == 0) +- { +- f = TelOpen(args + 1); +- lflag = 0; +- *typep = W_TYPE_TELNET; +- *namep = "telnet"; +- } +- else +-#endif + if (strncmp(arg, "//", 2) == 0) + { + Msg(0, "Invalid argument '%s'", arg); +diff -up screen/src/window.h.ipv6 screen/src/window.h +--- screen/src/window.h.ipv6 2010-11-11 03:47:46.000000000 +0100 ++++ screen/src/window.h 2011-02-03 16:04:35.989744687 +0100 +@@ -268,7 +268,7 @@ struct win + struct display *w_zdisplay; + #endif + #ifdef BUILTIN_TELNET +- struct sockaddr_in w_telsa; ++ struct sockaddr_storage w_telsa; + char w_telbuf[IOSIZE]; + int w_telbufl; + char w_telmopts[256]; diff --git a/SOURCES/screen-reattach.patch b/SOURCES/screen-reattach.patch new file mode 100644 index 0000000..d309d1a --- /dev/null +++ b/SOURCES/screen-reattach.patch @@ -0,0 +1,141 @@ +diff --git a/src/attacher.c b/src/attacher.c +index 460f1ea..5982a93 100644 +--- a/src/attacher.c ++++ b/src/attacher.c +@@ -133,6 +133,48 @@ struct msg *m; + return 0; + } + ++int ++WriteOldMessage(struct msg *m) ++{ ++ sleep(1); /* give the server some time to reopen the pipe */ ++ if (m->type == MSG_ATTACH && (m->m.attach.detachfirst == MSG_ATTACH || ++ m->m.attach.detachfirst == MSG_DETACH || ++ m->m.attach.detachfirst == MSG_POW_DETACH)) ++ { ++ struct old_msg old_m; ++ int s; ++ int r, l = sizeof(old_m); ++ ++ s = MakeClientSocket(0); ++ if (s < 0) ++ return 0; ++ old_m.protocol_revision = (('m'<<24) | ('s'<<16) | ('g'<<8) | 2); ++ old_m.type = m->type; ++ memcpy(old_m.m_tty, m->m_tty, sizeof(old_m.m_tty)); ++ memcpy(old_m.m.attach.auser, m->m.attach.auser, sizeof(old_m.m.attach.auser)); ++ old_m.m.attach.apid = m->m.attach.apid; ++ old_m.m.attach.adaptflag = m->m.attach.adaptflag; ++ old_m.m.attach.lines = m->m.attach.lines; ++ old_m.m.attach.columns = m->m.attach.columns; ++ memcpy(old_m.m.attach.preselect, m->m.attach.preselect, sizeof(old_m.m.attach.preselect)); ++ old_m.m.attach.esc = m->m.attach.esc; ++ old_m.m.attach.meta_esc = m->m.attach.meta_esc; ++ memcpy(old_m.m.attach.envterm, m->m.attach.envterm, sizeof(old_m.m.attach.envterm)); ++ old_m.m.attach.encoding = m->m.attach.encoding; ++ while(l > 0) ++ { ++ r = write(s, (char *)&old_m + (sizeof(struct old_msg) - l), l); ++ if (r == -1 && errno == EINTR) ++ continue; ++ if (r == -1 || r == 0) ++ return -1; ++ l -= r; ++ } ++ close(s); ++ } ++ return 0; ++} ++ + + int + Attach(how) +@@ -397,6 +439,7 @@ int how; + if (WriteMessage(lasts, &m)) + Panic(errno, "WriteMessage"); + close(lasts); ++ WriteOldMessage(&m); + debug1("Attach(%d): sent\n", m.type); + #ifdef MULTIUSER + if (multi && (how == MSG_ATTACH || how == MSG_CONT)) +diff --git a/src/screen.h b/src/screen.h +index b95f8a2..fb4a8d4 100644 +--- a/src/screen.h ++++ b/src/screen.h +@@ -240,6 +240,60 @@ struct msg + } m; + }; + ++struct old_msg ++{ ++ int protocol_revision; /* reduce harm done by incompatible messages */ ++ int type; ++ char m_tty[MAXPATHLEN]; /* ttyname */ ++ union ++ { ++ struct ++ { ++ int lflag; ++ int aflag; ++ int flowflag; ++ int hheight; /* size of scrollback buffer */ ++ int nargs; ++ char line[MAXPATHLEN]; ++ char dir[MAXPATHLEN]; ++ char screenterm[20]; /* is screen really "screen" ? */ ++ } ++ create; ++ struct ++ { ++ char auser[20 + 1]; /* username */ ++ int apid; /* pid of frontend */ ++ int adaptflag; /* adapt window size? */ ++ int lines, columns; /* display size */ ++ char preselect[20]; ++ int esc; /* his new escape character unless -1 */ ++ int meta_esc; /* his new meta esc character unless -1 */ ++ char envterm[40 + 1]; /* terminal type */ ++ int encoding; /* encoding of display */ ++ int detachfirst; ++ } ++ attach; ++ struct ++ { ++ char duser[20 + 1]; /* username */ ++ int dpid; /* pid of frontend */ ++ } ++ detach; ++ struct ++ { ++ char auser[20 + 1]; /* username */ ++ int nargs; ++ char cmd[MAXPATHLEN]; /* command */ ++ int apid; /* pid of frontend */ ++ char preselect[20]; ++ char writeback[MAXPATHLEN]; ++ } ++ command; ++ char message[MAXPATHLEN * 2]; ++ } m; ++}; ++ ++ + /* + * And the signals the attacher receives from the backend + */ +diff --git a/src/socket.c b/src/socket.c +index 32c5047..d5a3d74 100644 +--- a/src/socket.c ++++ b/src/socket.c +@@ -1067,7 +1067,9 @@ ReceiveMsg() + } + if (left > 0) + { +- if (left != sizeof(m)) ++ if (left == sizeof(struct msg) - sizeof(struct old_msg)) ++ ;/* old format message, ignore */ ++ else if (left != sizeof(m)) + Msg(0, "Message %d of %d bytes too small", left, (int)sizeof(m)); + else + debug("No data on socket.\n"); diff --git a/SOURCES/screen.pam b/SOURCES/screen.pam new file mode 100644 index 0000000..143c372 --- /dev/null +++ b/SOURCES/screen.pam @@ -0,0 +1,2 @@ +#%PAM-1.0 +auth include system-auth diff --git a/SPECS/screen.spec b/SPECS/screen.spec new file mode 100644 index 0000000..5c1092e --- /dev/null +++ b/SPECS/screen.spec @@ -0,0 +1,633 @@ +%bcond_with multiuser +%global _hardened_build 1 + +Summary: A screen manager that supports multiple logins on one terminal +Name: screen +Version: 4.1.0 +Release: 0.25.20120314git3c2946%{?dist} +License: GPLv2+ +Group: Applications/System +URL: http://www.gnu.org/software/screen +Requires(pre): /usr/sbin/groupadd +Requires(preun): /sbin/install-info +Requires(post): /sbin/install-info +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: ncurses-devel pam-devel libutempter-devel autoconf texinfo +BuildRequires: automake +# for %%_tmpfilesdir macro +BuildRequires: systemd + +#Source0: ftp://ftp.uni-erlangen.de/pub/utilities/screen/screen-%{version}.tar.gz +# snapshot from git://git.savannah.gnu.org/screen.git +Source0: screen-20120314git3c2946.tar.bz2 +Source1: screen.pam + +Patch1: screen-4.0.3-libs.patch +Patch2: screen-4.0.3-screenrc.patch +Patch3: screen-ipv6.patch +Patch4: screen-cc.patch +Patch5: screen-E3.patch +Patch6: screen-4.1.0-suppress_remap.patch +Patch7: screen-4.1.0-reattach.patch +Patch8: screen-4.1.0-crypt.patch +Patch9: screen-4.1.0-long-term.patch +Patch10: screen-help-update.patch +Patch11: screen-altscreen.patch +Patch12: screen-fix-term.patch +Patch13: screen-reattach.patch +Patch14: screen-STIG-GEN003660.patch +Patch15: screen-4.1.0-caption-padding.patch + +%description +The screen utility allows you to have multiple logins on just one +terminal. Screen is useful for users who telnet into a machine or are +connected via a dumb terminal, but want to use more than just one +login. + +Install the screen package if you need a screen manager that can +support multiple logins on one terminal. + + +%prep +%setup -q -n screen/src +%patch1 -p1 -b .libs +%patch2 -p1 -b .screenrc +%patch3 -p2 -b .ipv6 +%patch4 -p2 -b .cc +%patch5 -p2 -b .E3 +%patch6 -p1 -b .suppress_remap +%patch7 -p2 -b .reattach +%patch8 -p2 -b .crypto +%patch9 -p2 -b .long-term +%patch10 -p2 -b .help-update +%patch11 -p2 -b .altscreen.patch +%patch12 -p2 -b .fix-term +%patch13 -p2 -b .cannot-reattach +%patch14 -p2 -b .STIG-GEN003660 +%patch15 -p2 -b .caption-padding + + +%build +./autogen.sh + +%configure \ + --enable-pam \ + --enable-colors256 \ + --enable-rxvt_osc \ + --enable-use-locale \ + --enable-telnet \ + --with-pty-mode=0620 \ + --with-pty-group=$(getent group tty | cut -d : -f 3) \ + --with-sys-screenrc="%{_sysconfdir}/screenrc" \ + --with-socket-dir="%{_localstatedir}/run/screen" + +# We would like to have braille support. +sed -i -e 's/.*#.*undef.*HAVE_BRAILLE.*/#define HAVE_BRAILLE 1/;' config.h + +sed -i -e 's/\(\/usr\)\?\/local\/etc/\/etc/g;' doc/screen.{1,texinfo} + +for i in doc/screen.texinfo; do + iconv -f iso8859-1 -t utf-8 < $i > $i.utf8 && mv -f ${i}{.utf8,} +done + +rm -f doc/screen.info* + +# fails with %{?_smp_mflags} +make + +%install +rm -rf $RPM_BUILD_ROOT + +make install DESTDIR=$RPM_BUILD_ROOT +mv -f $RPM_BUILD_ROOT%{_bindir}/screen{-%{version},} + +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} +install -m 0644 etc/etcscreenrc $RPM_BUILD_ROOT%{_sysconfdir}/screenrc +cat etc/screenrc >> $RPM_BUILD_ROOT%{_sysconfdir}/screenrc + +# Better not forget to copy the pam file around +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d +install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/screen + +# Create the socket dir +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/screen + +# And tell systemd to recreate it on start with tmpfs +mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir} +cat < $RPM_BUILD_ROOT%{_tmpfilesdir}/screen.conf +# screen needs directory in /var/run +%if %{with multiuser} +d %{_localstatedir}/run/screen 0755 root root +%else +d %{_localstatedir}/run/screen 0775 root screen +%endif +EOF + +# Remove files from the buildroot which we don't want packaged +rm -f $RPM_BUILD_ROOT%{_infodir}/dir + +%clean +rm -rf $RPM_BUILD_ROOT + +%pre +/usr/sbin/groupadd -g 84 -r -f screen +: + +%post +/sbin/install-info %{_infodir}/screen.info.gz %{_infodir}/dir --entry="* screen: (screen). Terminal multiplexer." &> /dev/null +: + +%preun +if [ $1 = 0 ]; then + /sbin/install-info --delete %{_infodir}/screen.info.gz %{_infodir}/dir --entry="* screen: (screen). Terminal multiplexer." &> /dev/null +fi +: + +%files +%defattr(-,root,root,-) +%doc NEWS README doc/FAQ doc/README.DOTSCREEN COPYING +%{_mandir}/man1/screen.* +%{_infodir}/screen.info* +%{_datadir}/screen +%config(noreplace) %{_sysconfdir}/screenrc +%config(noreplace) %{_sysconfdir}/pam.d/screen +%{_tmpfilesdir}/screen.conf +%if %{with multiuser} +%attr(4755,root,root) %{_bindir}/screen +%attr(755,root,root) %{_localstatedir}/run/screen +%else +%attr(2755,root,screen) %{_bindir}/screen +%attr(775,root,screen) %{_localstatedir}/run/screen +%endif + +%changelog +* Tue Oct 04 2017 Josef Ridky - 4.1.0-0.25.2012314git3c2946 +- Resolves: #1423036 - fix issue with coloring when using caption padding + +* Thu Jun 30 2016 Petr Hracek - 4.1.0-0.24.20120314git3c2946 +- Build has to be bigger then RHEL-7.2 +- Related: #1196239 + +* Fri Jan 15 2016 Petr Hracek - 4.1.0-0.23.20120314git3c2946 +- screen does not log successful authentication messages with STIG GEN003660 +- Resolves: #1196239 + +* Thu Oct 15 2015 Petr Hracek - 4.1.0-0.22.20120314git3c2946 +- cannot reattach to screen sessions (regression 'LoginName to long') +- Resolves: #1253697 + +* Tue Jun 30 2015 Petr Hracek - 4.1.0-0.21.20120314git3c2946 +- 'LoginName too long' with login name greater then 20 characters +- Resolves: #1119794 + +* Mon Jun 29 2015 Petr Hracek - 4.1.0-0.20.20120314git3c2946 +- Multiple packages are installing files under /etc/tmpfiles.d +- comply http://fedoraproject.org/wiki/Packaging:Guidelines#Tmpfiles.d +- Resolves: rhbz#1121958 + +* Fri Jan 24 2014 Daniel Mach - 4.1.0-0.19.20120314git3c2946 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 4.1.0-0.18.20120314git3c2946 +- Mass rebuild 2013-12-27 + +* Thu Sep 26 2013 Petr Hracek - 4.1.0-0.17.20120314git3c2946 +- Related: (#1005809) screen-help-update.patch modifies patch backup files +- Some typo error + +* Tue Jun 18 2013 Petr Hracek - 4.1.0-0.16.20120314git3c2946 +- Fix: Segfault in alternate screen handling (#948617) + +* Fri Apr 05 2013 Petr Hracek - 4.1.0-0.15.20120314git3c2946 +- correct missing help options + +* Tue Feb 05 2013 Petr Hracek - 4.1.0-0.14.20120314git3c2946 +- Fix (#907472) xterm too long - sorry + +* Wed Dec 05 2012 Lukáš Nykrýn - 4.1.0-0.13.20120314git3c2946 +- Use hardened build + +* Mon Sep 03 2012 Lukáš Nykrýn - 4.1.0-0.12.20120314git3c2946 +- PIE and RELRO (#853191) + +* Sat Jul 21 2012 Fedora Release Engineering - 4.1.0-0.11.20120314git3c2946 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Mar 28 2012 Lukáš Nykrýn - 4.1.0-0.10.20120314git3c2946 +- check crypt output (#815605) + +* Wed Mar 28 2012 Lukáš Nykrýn - 4.1.0-0.9.20120314git3c2946 +- fix for resuming screen in screen (#752622) + +* Wed Mar 14 2012 Lukáš Nykrýn - 4.1.0-0.8.20120314git3c2946 +- rebase to latest git snapshot +- fix a crash when switching from altscreen after window resize (#784504) + +* Sat Jan 14 2012 Fedora Release Engineering - 4.1.0-0.7.20110819git450e8f +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Dec 20 2011 Lukáš Nykrýn - 4.1.0-0.6.20110819git450e8f +- rebase to latest git snapshot + +* Tue Dec 20 2011 Lukáš Nykrýn - 4.1.0-0.5.20110328git8cf5ef +- fix for nonworking ^a backspace (#708698) + +* Tue Jul 19 2011 Miroslav Lichvar - 4.1.0-0.4.20110328git8cf5ef +- update to git snapshot 20110328git8cf5ef +- clear scrollback buffer before locking linux terminal (#683733) + +* Thu Feb 10 2011 Miroslav Lichvar - 4.1.0-0.3.20101110git066b098 +- move sockets back to /var/run/screen (#676663) + +* Wed Feb 09 2011 Fedora Release Engineering - 4.1.0-0.2.20101110git066b098 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Feb 04 2011 Miroslav Lichvar - 4.1.0-0.1.20101110git066b098 +- update to git snapshot 20101110git066b098 +- fix potential problems for Common Criteria certification +- apply some xterm tweaks in default config also to xterm-* (#474064) +- change socket directory to $HOME/.screen (#667252) +- add bcond macro to build with multiuser support +- convert info to UTF-8 + +* Fri Nov 12 2010 Miroslav Lichvar - 4.0.3-16 +- create socket directory on start with tmpfs (#652348) +- add -4 and -6 options to man page (#650321) + +* Fri Sep 25 2009 Miroslav Lichvar - 4.0.3-15 +- fix crash when resizing (#515055) +- try to improve default config (#523647, #506256, #492729) +- suppress install-info errors (#515999) + +* Sun Jul 26 2009 Fedora Release Engineering - 4.0.3-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 4.0.3-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri May 16 2008 Miroslav Lichvar - 4.0.3-12 +- fix multiuser support (#446049) +- fix building with new autoconf + +* Mon Apr 07 2008 Miroslav Lichvar - 4.0.3-11 +- don't include stropts.h (#440803) +- fix compiler warnings in ipv6 patch + +* Tue Feb 26 2008 Miroslav Lichvar - 4.0.3-10 +- don't set xterm function keys in default config (#151556) +- always return 0 in scriptlet (#433882) +- fix pty permissions +- enable utempter support +- link with libtinfo, don't link with libutil +- spec cleanup + +* Tue Feb 19 2008 Fedora Release Engineering - 4.0.3-9 +- Autorebuild for GCC 4.3 + +* Fri Aug 24 2007 Marcela Maslanova - 4.0.3-8 +- check licence & rebuilt for mass rebuild +- add gawk to requires + +* Tue May 22 2007 Marcela Maslanova - 4.0.3-7 +- revert binding (patch9) +- Resolves: rhbz#238122 + +* Mon Mar 26 2007 Marcela Maslanova - 4.0.3-5 +- rebuilt (change in spec file) + +* Mon Mar 19 2007 Marcela Maslanova - 4.0.3-4 +- rebuilt (change in spec file) + +* Tue Feb 6 2007 Marcela Maslanova - 4.0.3-3 +- rebuilt (change in spec file) + +* Fri Jan 5 2007 Marcela Maslanova - 4.0.3-2 +- rebuilt (change in spec file) + +* Sun Oct 15 2006 Marcela Maslanova - 4.0.3-1 +- new version from upstream +- ipv6 patch #198410 + +* Wed Aug 16 2006 Jesse Keating - 4.0.2-16 +- Don't use %%makeinstall, instead make install. +- Change DDESTDIR to DESTDIR to do the right thing. +- Comment out utf patch as it is no longer necessary. +- Add dist tag +- Change PreReq to correct Requires(pre), Requires(post), Requires(preun) +- Don't use RPM_SOURCE_DIR, reference the source file directly +- Do the compiling (make) in %%build, not %%install +- Don't replace /etc/screenrc if the user has modified it +- Ditto /etc/pam.d/screen +- Change the buildroot to follow guidelines + +* Wed Jul 12 2006 Jesse Keating - 4.0.2-15.1 +- rebuild + +* Mon Jul 10 2006 Petr Rockai - 4.0.2-15 +- bump MAXSTR (string buffer size) to 4k (from 256 bytes), fixes + status line issues with window list in status line and too many + windows (and possibly other issues with long strings) + +* Tue May 30 2006 Petr Rockai - 4.0.2-14 +- put /usr/share/screen into the package (so the package owns the + directory as well, not only the files below); fixes BR 192852 + +* Fri Feb 24 2006 Petr Rockai - 4.0.2-12 +- detect libutil(s).a even if it is only present in lib64 (#182407) + +* Fri Feb 10 2006 Jesse Keating - 4.0.2-11.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 4.0.2-11.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Tue Jan 17 2006 Petr Rockai - 4.0.2-11 +- change the default lockscreen shortcut to ^aX to make + it harder to hit by accident, as per BR 157821 + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Mon Oct 10 2005 Tomas Mraz - 4.0.2-10 +- use include instead of pam_stack in pam config + +* Fri May 27 2005 Bill Nottingham - 4.0.2-9 +- don't use utmp group for socket dir; use a dedicated screen gid + +* Tue Mar 29 2005 Petr Rockai - 4.0.2-8 +- fix BR 150392 by implementing the setgid/utmp scheme for socket directory + +* Wed Mar 02 2005 Petr Rockai - 4.0.2-7 +- rebuild + +* Tue Feb 15 2005 Petr Rockai - 4.0.2-6 +- fix BR 136234 by carrying out the suggested change in /etc/screenrc +- drop screen-4.0.2-logname.patch (merged into screen-4.0.2-screenrc.patch) +- grant wish 130674 by adding a (commented out) caption statement to default + screenrc + +* Fri Sep 10 2004 Warren Togami 4.0.2-5 +- #132321 and some minor spec cleanups + +* Fri Aug 6 2004 Daniel Reed 4.0.2-4 +- remove extra entries in "sources" file + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Wed Apr 28 2004 Daniel Reed 4.0.2-2 +- Add patch -logname to correct #121875 + +* Mon Apr 05 2004 Daniel Reed 4.0.2-1 +- Version bump (4.0.2) + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Tue Jan 27 2004 Lon Hohberger 4.0.1-3 +- Rebuild + +* Mon Dec 08 2003 Lon Hohberger 4.0.1-2 +- Build for Fedora + +* Mon Dec 08 2003 Lon Hohberger 4.0.1-1 +- Import of 4.0.1 from upstream. +- Removed screen-homedir hack introduced in 3.9.15-8. (I +was unable to reproduce the behavior described in #98320, +and thus, the patch isn't necessary.) +- Fix for buffer overflow from Timo Strainen (patch 7). +- Fix for #111084 - we now require texinfo to build. +- Comment out lines in screenrc causing screen to complain +at startup. + +* Thu Jul 10 2003 Lon Hohberger 3.9.15-11 +- Rebuilt + +* Thu Jul 10 2003 Lon Hohberger 3.9.15-10 +- Put the bindkey back in for now. + +* Tue Jul 01 2003 Lon Hohberger 3.9.15-9 +- Rebuilt + +* Tue Jul 01 2003 Lon Hohberger 3.9.15-8 +- Change screen's behavior to do the following: Attempt to use +~/.screen as the screen directory. Failing that (ie, on files +systems without Unix sockets support), try using /tmp/screen-. +This prevents a user from creating /tmp/screens (which inherits +the sticky bit from /tmp, preventing other users from using screen), +as well as *tries* to be more secure. + +* Tue Jul 01 2003 Lon Hohberger 3.9.15-7 +- Rebuilt + +* Tue Jul 01 2003 Lon Hohberger 3.9.15-6 +- Disable system-wide read/write dir in /tmp; use user's ~/.screen +directory for screen sessions. (#98320) + +* Mon Jun 16 2003 Lon Hohberger 3.9.15-5 +- Rebuilt + +* Fri Jun 13 2003 Lon Hohberger 3.9.15-4 +- Removed bindkey entry; stty `tput kbs` sets this correctly for +the screen terminal type. + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Wed Apr 16 2003 Lon Hohberger 3.9.15-2 +- Rebuilt + +* Wed Apr 16 2003 Lon Hohberger 3.9.15-1 +- Import of 3.9.15 from upstream. + +* Fri Feb 14 2003 Lon Hohberger 3.9.13-5 +- Closes a potential window to raise the warning noted +in #84232. + +* Fri Feb 14 2003 Lon Hohberger 3.9.13-4 +- Fix for #84232 + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Thu Dec 05 2002 Lon Hohberger 3.9.13-2 +- Fixed up patches; aggregated screenrc + status patches into one +for build 2. + +* Thu Dec 05 2002 Lon Hohberger 3.9.13-1 +- Import of 3.9.13 source tree. UTF-8 no longer dooms us. + +* Mon Dec 02 2002 Lon Hohberger 3.9.11-14 +- Fix for #78423 + +* Tue Nov 12 2002 Lon Hohberger 3.9.11-13 +- Fixed Makefile, bumped to 3.9.11-13 + +* Mon Nov 11 2002 Nalin Dahyabhai 3.9.11-12 +- obey RPM_OPT_FLAGS always + +* Mon Nov 11 2002 Bill Nottingham +- remove hardcoded paths from pam config file + +* Wed Aug 14 2002 Philip Copeland 3.9.11-10 +- #65344 - doomed by utf8 + +* Mon Aug 12 2002 Philip Copeland 3.9.11-9 +- #60597 - what /shall/ we make the defaults today? + +* Wed Jul 17 2002 Philip Copeland 3.9.11-8 +- Prevent the makefile from stripping the binary +- Really get rid of the libelf dependancy + +* Thu Jun 27 2002 Philip Copeland 3.9.11-7 +- Get rid of libelf dependancy + +* Fri Jun 21 2002 Tim Powers 3.9.11-6 +- automated rebuild + +* Tue May 28 2002 Philip Copeland 3.9.11-5 +- Missing bindkey to allow backspace to work +- Rebuilt due to rpm bug + +* Thu Apr 18 2002 Bill Nottingham +- fix starting in non-en_US locales (#61835) + +* Mon Apr 15 2002 Philip Copeland +- Various fixups including remembering to enable pam support + +* Sat Feb 16 2002 Florian La Roche +- update to 3.9.11 +- patch0/patch4 is not necessary anymore +- do not compress man-pages/info-files in spec file +- use configure to set telnet/screenrc instead of sed +- add a hack to correctly install the new screenencodings +- try to build up a better global /etc/screenrc instead of + /etc/skel/.screenrc + +* Fri Aug 3 2001 Crutcher Dunnavant 3.9.9-3 +- fixed screenrc path sed command; #50046 +- added ncurses-devel build dep; #49692 +- fix typo in specfile that broke screenrc, #49535 + +* Tue Jul 10 2001 Tim Powers +- gzip manpage + +* Mon Jun 25 2001 Crutcher Dunnavant +- itterate to 3.9.9 +- fixed FAQ +- added electro@mrduck.net's PAM patch, crazy :) + +* Sun Jun 24 2001 Elliot Lee +- Bump release + rebuild. + +* Tue Feb 13 2001 Florian La Roche +- fix configure.in to use correct code to check for select() + +* Wed Jan 10 2001 Tim Waugh +- Rebuild, which will hopefully fix bug #22537 + +* Sun Oct 01 2000 Florian La Roche +- update to 3.9.8 +- change the .jbj patch and add some more "user" -> "auser" cases + +* Tue Aug 15 2000 Crutcher Dunnavant +- Patched the documentation to change the 'C-a C-\' to 'C-a \', +- which is what is the real behaviour. this fixes bug #16103 + +* Thu Aug 3 2000 Crutcher Dunnavant +- Fixed my fix, so that the hack goes in the /global/ file :) + +* Thu Aug 3 2000 Crutcher Dunnavant +- Stuck an entry into the default screenrc file that forces +- '^?' (backspace) to send '^H'. +- Its an ugly fix for a termcap inheritance problem, +- but it works, if anyone REALLY needs '^?' they can change it, +- and I think we anger less people with this than the way it +- currently behaves. (Read: vi and emacs work now) +- POST NOTE (Aug 15): emacs is NOT happy with ^H, BUT screen thinks +- that this is what backspace is supposed to do, so we don't change it. + +* Thu Aug 3 2000 Crutcher Dunnavant +- Fixed some conflicting descriptions in the documentation + +* Thu Aug 3 2000 Crutcher Dunnavant +- got a patch from rzm@icm.edu.pl to fix bug #10353 +- which caused screen to crash when copying to a file buffer + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Sat Jun 10 2000 Bill Nottingham +- rebuild, FHS tweaks + +* Sat May 6 2000 Bill Nottingham +- fix build for ia64 + +* Mon Apr 3 2000 Bernhard Rosenkränzer +- rebuild with new ncurses + +* Tue Mar 7 2000 Jeff Johnson +- rebuild for sparc baud rates > 38400. + +* Tue Feb 15 2000 Bernhard Rosenkränzer +- Fix MD5 password support (Bug #9463) + +* Thu Feb 3 2000 Bill Nottingham +- handle compressed man pages + +* Fri Dec 10 1999 Bill Nottingham +- update to 3.9.5 + +* Wed Oct 20 1999 Bill Nottingham +- you know, we weren't just patching in Unix98 pty support for fun. + +* Wed Aug 18 1999 Bill Nottingham +- put screendir in ~ + +* Wed Aug 18 1999 Jeff Johnson +- update to 3.9.4. + +* Wed Jun 16 1999 Bill Nottingham +- force tty permissions/group + +* Sat Jun 5 1999 Dale Lovelace +- permissions on /etc/skel/.screenrc to 644 + +* Mon Apr 26 1999 Bill Nottingham +- take out warning of directory permissions so root can still use screen + +* Wed Apr 07 1999 Bill Nottingham +- take out warning of directory ownership so root can still use screen + +* Wed Apr 07 1999 Erik Troan +- patched in utempter support, turned off setuid bit + +* Fri Mar 26 1999 Erik Troan +- fixed unix98 pty support + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 3) + +* Thu Mar 11 1999 Bill Nottingham +- add patch for Unix98 pty support + +* Mon Dec 28 1998 Jeff Johnson +- update to 3.7.6. + +* Sun Aug 16 1998 Jeff Johnson +- build root + +* Mon Apr 27 1998 Prospector System +- translations modified for de, fr, tr + +* Tue Oct 21 1997 Cristian Gafton +- upgraded to 3.7.4 + +* Wed Oct 08 1997 Erik Troan +- removed glibc 1.99 specific patch + +* Tue Sep 23 1997 Erik Troan +- added install-info support + +* Mon Jul 21 1997 Erik Troan +- built against glibc