diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2013-07-14 21:36:36 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2013-07-14 23:34:18 +0200 |
commit | b544c22c499b9b92ad9d1b6c2a78aafa73c6caeb (patch) | |
tree | 3a5f62d62560e651ecf13a7b5f19262b89245035 | |
parent | f3f216e0c0c5f40fa36f01ae9d32e2ad020ec11d (diff) | |
download | screen-b544c22c499b9b92ad9d1b6c2a78aafa73c6caeb.tar.gz |
Allow /dev/console to be a symlink. (Closes: #701173)
Thanks to Igor Pashev for the report and patch.
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/patches/61-allow-dev-console-to-be-a-symlink.patch | 36 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 39 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 7a28030..b129caf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ screen (4.1.0~20120320gitdb59704-9) UNRELEASED; 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. -- Axel Beckert <abe@debian.org> Sun, 14 Jul 2013 21:23:58 +0200 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/series b/debian/patches/series index d7ef1c0..26b5cf1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -27,5 +27,6 @@ 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 # 80-99: experimental patches, new features etc. 80EXP_session_creation_time.patch |