Skip to content

Commit

Permalink
screen: don't enable multiuser mode by default.
Browse files Browse the repository at this point in the history
This requires that the screen binary be suid.
  • Loading branch information
ericonr committed Jul 22, 2021
1 parent 3ee173a commit ad66ec8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions srcpkgs/screen/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'screen'
pkgname=screen
version=4.8.0
revision=2
revision=3
build_style=gnu-configure
configure_args="--with-sys-screenrc=/etc/screenrc --enable-pam
--enable-colors256 --enable-rxvt_osc --enable-telnet
Expand All @@ -15,10 +15,14 @@ homepage="http://www.gnu.org/s/screen/"
distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.gz"
checksum=6e11b13d8489925fde25dfb0935bf6ed71f9eb47eff233a181e078fde5655aa1

build_options="multiuser"

post_install() {
vinstall etc/etcscreenrc 0644 etc screenrc
vinstall etc/screenrc 0644 etc/skel .screenrc
vinstall ${FILESDIR}/screen 0644 etc/pam.d

chmod 4755 ${DESTDIR}/usr/bin/screen-${version}
if [ "$build_option_multiuser" ]; then
chmod 4755 ${DESTDIR}/usr/bin/screen-${version}
fi
}

2 comments on commit ad66ec8

@nonchip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note this breaks the default $SCREENDIR of /run/screens due to permission issues, might want to change this to e.g. /tmp/shm or (probably better for preventing cross-user abuse) install a file into /etc/profile.d to set this variable to somewhere under $HOME when not built in multiuser-mode.

@ericonr
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nonchip I have just been warned about this. See #32159

Please sign in to comment.