diff --git a/fix_enable_logfile.patch b/fix_enable_logfile.patch new file mode 100644 index 0000000..ecce830 --- /dev/null +++ b/fix_enable_logfile.patch @@ -0,0 +1,72 @@ +From: Alexander Naumov +Date: Thu, 26 Jan 2017 23:44:43 +0100 +Subject: [PATCH] Adding "-L logfile" option for setting new logfile's name +References: bnc#1020870 + +Now it's possible to set your own lofile name with +this option ONLY. It fixes API of old versions. + +Signed-off-by: Alexander Naumov +--- +diff --git a/src/doc/screen.1 b/src/doc/screen.1 +index 23b4d7b..5b14d91 100644 +--- doc/screen.1 ++++ doc/screen.1 +@@ -261,9 +261,12 @@ Ask your system administrator if you are not sure. Remove sessions with the + .B \-L + tells + .I screen +-to turn on automatic output logging for the windows. By default, logfile's name +-is screenlog.1. You can sets new name: add it right after -L option e.g. "screen +--L my_logfile". ++to turn on automatic output logging for the windows. ++.TP 5 ++.BI "\-L logfile " file ++By default logfile name is \*Qscreenlog.0\*Q. You can also set new logfile name ++with the \*Qlogfile\*Q option. Keep in mind that logfile name can not start with ++the "-" symbol. + .TP 5 + .B \-m + causes +diff --git a/src/screen.c b/src/screen.c +index 64650e9..9e1072a 100644 +--- screen.c ++++ screen.c +@@ -302,7 +302,7 @@ struct passwd *ppp; + pw_try_again: + #endif + n = 0; +- if (ppp->pw_passwd[0] == '#' && ppp->pw_passwd[1] == '#' & strcmp(ppp->pw_passwd + 2, ppp->pw_name) == 0) ++ if (ppp->pw_passwd[0] == '#' && ppp->pw_passwd[1] == '#' && strcmp(ppp->pw_passwd + 2, ppp->pw_name) == 0) + n = 13; + for (; n < 13; n++) { + char c = ppp->pw_passwd[n]; +@@ -667,18 +667,16 @@ int main(int ac, char** av) + break; + + case 'L': +- if (--ac != 0) { +- screenlogfile = SaveStr(*++av); +- if (screenlogfile[0] == '-') ++ if (--ac > 0 && !strcmp(*++av, "logfile")) { ++ *++av; // Now '*av' is a logfile parameter ++ ++ if (strlen(*av) > PATH_MAX) ++ Panic(1, "-L: logfile name too long. (max. %d char)", PATH_MAX); ++ ++ if (*av[0] == '-') + Panic(0, "-L: logfile name can not start with \"-\" symbol"); +- if (strlen(screenlogfile) > PATH_MAX) +- Panic(0, "-L: logfile name too long. (max. %d char)", PATH_MAX); +- +- FILE *w_check; +- if ((w_check = fopen(screenlogfile, "w")) == NULL) +- Panic(0, "-L: logfile name access problem"); +- else +- fclose(w_check); ++ ++ screenlogfile = SaveStr(*av); + } + nwin_options.Lflag = 1; + break; + diff --git a/screen-4.4.0.tar.gz b/screen-4.4.0.tar.gz deleted file mode 100644 index 6323b2a..0000000 --- a/screen-4.4.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ef722a54759a3bf23aad272bbf33c414c1078cad6bcd982fada93c0d7917218b -size 846010 diff --git a/screen-4.4.0.tar.gz.sig b/screen-4.4.0.tar.gz.sig deleted file mode 100644 index 8d80125..0000000 Binary files a/screen-4.4.0.tar.gz.sig and /dev/null differ diff --git a/screen-4.5.0.tar.gz b/screen-4.5.0.tar.gz new file mode 100644 index 0000000..068b1a4 --- /dev/null +++ b/screen-4.5.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01c3a7c362185f35d6a95dff52d64337076496acd034d717de3c263500cfefb0 +size 963233 diff --git a/screen-4.5.0.tar.gz.sig b/screen-4.5.0.tar.gz.sig new file mode 100644 index 0000000..4aa2f78 --- /dev/null +++ b/screen-4.5.0.tar.gz.sig @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEcaoJ2eiHD9sKp7YeIflo3vdHq9cFAlh+cg4ACgkQIflo3vdH +q9d1Uw//QEEy4vceIdg0LhAek6GwBsEk6BYra6Jne4UMwJKJnD7Pe9FFbDGFsUKK +d8CpeTBXHQJf4skaxxgfcthJmdVzxukakrhpFNNxV0KhCqkwuzq/+DmuIpniJH4O +ln41dbw3B+88hyrxiYT38qMwB9baNVqNf3nS58p1MbAGpDEZTV9DxfWV+prAMEJ8 +wuGjYSu6CgKMBuBHymGp8K2jEEaXHlWP0AmZyIc5BPi8ojNkCt6rh9OXWShmQj7d +pVbpNCFQB2g+Q5G6B3WlPj01pfln/JfX43Wahwn9OvZ9sUvmtkYy2WgNYEkYQqIo +zVetjgu59IZBVjZBc4/JhfcPNdxNaZHugkU4Nabw6W6uMKUMzA19EIvtQ4AkEAbX +1DAPsFQGA2COUQdgDhkuGPM0PjXov8R/YR6FSkb3EECyw9vUmpywU/yyMdvC74lG +Ulcm6Xd5G6xt4i2BlAHO9qv9UlRJpSmeKj+kluRUQB4UUsyNeMcDuOYfQhPy0fy8 +8B424D/ukhmhT/FxMoPTyLND7SSGFFH6Rueeqojm6kCM3CuDnf2g+LEo6j6psH+4 +zJVHyc/A26UF+60/lv+ScZ1TXI9JZE0XjwwaYGav4gUitQ0ASuZsWMJeIE4o6FzX +n4Slk/gE3fwMfhrHVocpipQFsFTb6Z5+xTjyLzO16PuJwL0O6Do= +=fhpd +-----END PGP SIGNATURE----- diff --git a/screen.changes b/screen.changes index c3f0cf6..523245b 100644 --- a/screen.changes +++ b/screen.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Fri Jan 27 22:32:17 UTC 2017 - alexander_naumov@opensuse.org + +- Add fix_enable_logfile.patch + * fix loging screen API (bnc#1020870) + * fix privilege escalation + +------------------------------------------------------------------- +Thu Jan 17 23:11:38 UTC 2017 - alexander_naumov@opensuse.org + +- GNU Screen 4.5.0: + * It's possible to specify logfile's name via command line + parameter '-L'. + + Fixes: + * broken handling of "bind u digraph U+" + * crash with long $TERM + * crash when bumping blank window + * build for AIX + * %x improperly separating arguments + * install with custom DESTDIR + ------------------------------------------------------------------- Wed Aug 17 14:02:33 UTC 2016 - alexander_naumov@opensuse.org diff --git a/screen.keyring b/screen.keyring index c5a953d..8da5198 100644 Binary files a/screen.keyring and b/screen.keyring differ diff --git a/screen.spec b/screen.spec index fc307c7..5450ee9 100644 --- a/screen.spec +++ b/screen.spec @@ -1,7 +1,7 @@ # # spec file for package screen # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -39,7 +39,7 @@ BuildRequires: automake BuildRequires: pam-devel PreReq: %install_info_prereq PreReq: coreutils -Version: 4.4.0 +Version: 4.5.0 Release: 0 Summary: A program to allow multiple screens on a VT100/ANSI Terminal License: GPL-3.0+ @@ -49,6 +49,7 @@ Source1: screen.conf Source2: http://ftp.gnu.org/gnu/screen/%{name}-%{version}.tar.gz.sig Source3: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=screen&download=1#/%{name}.keyring Patch0: global_screenrc.patch +Patch1: fix_enable_logfile.patch Patch6: libtinfo.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -63,6 +64,8 @@ Documentation: man page %setup # global_screenrc.patch %patch0 +# PATCH-FEATURE-UPSTREAM fix_enable_logfile.patch +%patch1 # libtinfo.diff %patch6