Initial s390-tools-2.0.0 import

This commit is based on the s390-tools-1.39.0 version.

Changes on top of s390-tools-1.39.0:

 - Add MIT license to all source files
 - Add LICENSE file
 - Transform REAMDE to README.md (markdown)
 - Add AUTHORS.md file
 - Add CONTRIBUTING.md file
 - Move changelog from README to CHANGELOG.md file

Reviewed-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
This commit is contained in:
Michael Holzheu
2017-08-07 16:13:17 +02:00
commit b627b8d8e1
647 changed files with 168974 additions and 0 deletions
+126
View File
@@ -0,0 +1,126 @@
Terminal server setup
=====================
This README file provides additional information for configuring
a terminal server.
Installation overview
---------------------
The s390-tools package installs the ts-shell(1) program along with
a set of configuration files in `/etc/iucvterm`.
The ts-shell program is pre-configured to connect to any other z/VM
guest virtual machines (if the z/VM guest virtual machine has the
respective IUCV authorizations).
The administrator can change the ts-shell configuration to restrict
connections to particular z/VM guest virtual machines only.
There are no user authorizations by default. The administrator must
edit `/etc/iucvterm/ts-authorization.conf` to assign authorizations.
See the manual page for ts-shell(1) and the `authorization-sample.conf`
file in the documentation directory for configuration examples.
In addition, the documentation directory also contains the
iucvconn_on_login sample program that is an alternative to ts-shell.
Setup considerations for the terminal server shell (ts-shell)
-------------------------------------------------------------
Adding new ts-shell users
~~~~~~~~~~~~~~~~~~~~~~~~~
The ts-shell installation creates a system group ts-shell.
If you intend to use ts-shell as a login shell for users, ensure that
these users are all members of ts-shell. To add existing users to
group ts-shell, use +usermod -G ts-shell 'username'+.
The ts-shell configuration files and `/var/log/ts-shell` are
readable only by members of the *ts-shell* group.
Enabling terminal session transcripts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ts-shell(1) can be configured to create transcripts of terminal sessions
to particular z/VM guest virtual machines. The transcripts are written
to log files in the `/var/log/ts-shell` directory.
NOTE: The `/var/log/ts-shell` directory permission has the
set-group-ID bit set. Sub-directories that are created by
different users will inherit the group ownership of the
`/var/log/ts-shell` directory.
See the ts-shell(1) manual page for more information about terminal
session transcripts.
Setting up command completion (optional)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*ts-shell* supports completion for commands and, if possible, for
z/VM guest virtual machines. The completion is triggered using the
'Tab' key. Command completion is an optional feature.
To enable command completion, install one of the following Perl
ReadLine libraries:
- Term::ReadLine::Gnu
- Term::ReadLine::Perl
Check your Linux distribution for packages that provide these Perl
ReadLine interfaces.
Setup a terminal server using the iucvconn_on_login program
-----------------------------------------------------------
*iucvconn_on_login* is a sample script that uses the iucvconn(1)
program to establish an IUCV terminal connection to a Linux
instance that runs as z/VM guest operating system.
It can be used as an alternative to set up a terminal server.
The idea of iucvconn_on_login is to establish a terminal connection
at login time.
The z/VM guest virtual machine to which iucvconn_on_login will
connect is the name of the Linux user that logs in.
For example, if you log in as Linux user "lxguest1", iucvconn_on_login
is started and establishes a terminal connection to the z/VM guest
virtual machine lxguest1.
Adding new users for z/VM guest virtual machines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To set up a terminal server using the iucvconn_on_login program,
create a new Linux user for each z/VM guest virtual machine using
the z/VM user ID as name. Set the login shell of those users to
*iucvconn_on_login*.
NOTE: User names are case-sensitive in Linux. To ensure consistency,
always use either lower or upper case characters for your
user names.
To create a new user for z/VM guest virtual machine LXGUEST1
----
useradd -s /usr/bin/iucvconn_on_login lxguest1
----
If you log in as user 'lxguest1' on the terminal server (for example
using ssh(1)), *iucvconn_on_login* immediately establishes the terminal
connection to the z/VM virtual guest virtual machine 'lxguest1'.
To access the default terminal ('lnxhvc0') on the Linux instance in
z/VM guest virtual machine LXGUEST1
----
ssh lxguest1@terminal.server
----
To access the terminal 'lnxterm' on the Linux instance in
z/VM guest virtual machine LXGUEST1
----
ssh -t lxguest1@terminal.server lnxterm
----
For ssh(1), you must use the "-t" parameter if you want to specify an
alternate terminal identifier. The "-t" parameter ensures that ssh
starts iucvconn_on_login on a terminal.
@@ -0,0 +1,24 @@
# Terminal server authorization configuration
#
# See ts-shell(1) manual page for file format.
## Examples -- System lists
# alice is authorized to connect to guest1 .. guest5
alice = list:guest1,guest2,guest3,guest4,guest5
## bob is authorized to connect to systems listed in the file "test-systems.list"
bob = file:/etc/iucvterm/systems/test-systems.list
# authorize all members of the Linux 'admins' group to connect to systems
# listed in the file "admin-systems.list"
@admins = file:/etc/iucvterm/groups/admin-systems.list
## Examples -- Regular expressions
# eve has authorization to connect to systems with
# a) names starting with 'guest', followed by exactly 2 digits
# b) names starting with 'lnx', followed by 5 alphanumeric characters
eve = regex:(?:guest\d{2}|lnx\w{5})
+37
View File
@@ -0,0 +1,37 @@
#! /bin/sh
#
# iucvconn_on_login - start terminal connection at login
#
# Shell script to connect to a Linux guest operation system
# using the iucvconn(1) program.
# The z/VM guest virtual machine to which iucvconn_on_login will connect
# is the name of the Linux user that logs in.
#
# Copyright IBM Corp. 2008, 2017
#
# s390-tools is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.
#
prog_name=`basename $0`
guest_name=${USER:-`whoami 2>/dev/null`}
terminal=lnxhvc0
iucvconn=`which iucvconn 2>/dev/null`
__error() {
printf "$prog_name: $@\n" >&2
exit 1
}
# check if we have been called with -c <name> to specify an alternate
# terminal identifier. This can be used by ssh: "ssh -t guest@ts my_term"
case "$1" in
-c) test -n "$2" && terminal=$2 ;;
esac
test -t 1 || __error "The $prog_name program requires a terminal to run on"
test "x$guest_name" = x && \
__error "Failed to determine the target z/VM guest virtual machine"
test -x "$iucvconn" || __error "Failed to run the 'iucvconn' program"
printf "$prog_name: Connecting to $guest_name (terminal ID: $terminal)\n\n"
exec $iucvconn $guest_name $terminal
+11
View File
@@ -0,0 +1,11 @@
# Terminal server shell -- system list
#
# This file lists z/VM guest virtual machines, each name on a separate line.
# Empty lines or lines starting with '#' are ignored.
# See ts-shell(1) for more information.
#
#------|<---------------------------------------------------
LNXSYSA
LNXSYSB
LNXSYS01
LNXSYS42