Commit Graph

2565 Commits

Author SHA1 Message Date
Harald Freudenberger
73d5e17026 lszcrypt: fix random domain printout when no config available
The sysfs files ap_control_domain_mask and ap_usage_domain_mask
may hold just a string "not supported" if there's no crypto
configuration available. However, lszcrypt always processed
the content of these files as hex number and so produced funny
output if there's no configuration data available.

Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-08-31 17:41:15 +02:00
Peter Oberparleiter
f3e552d67c zdev: Fix zdev dracut module temp file location
During processing, the zdev-provided dracut module creates a temporary
file using the mktemp tool. Due to a missing path specification
in the filename template, mktemp tries to create the temporary file
in the current working directory which fails if that directory is not
writable:

  # cd /sys
  # dracut -Nf
  mktemp: failed to create file via template 'dracut-zdev.XXXX': No such
  file or directory
  chzdev: Could not write to file : No such file or directory
  sed: can't read : No such file or directory
  chzdev: Could not open file : No such file or directory

Fix this by specifying option --tmpdir when calling mktemp.

Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-08-31 17:41:15 +02:00
Hendrik Brueckner
5ba519973f zkey: rename abrev_len -> abbrev_len
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-08-31 17:41:15 +02:00
Hendrik Brueckner
18f1730b92 zkey: correctly detect abbreviated commands
Abbreviated commands are not recognized and zkey issues an invalid
command error.

In is_command(), the abbreviated command string is copied into the
command_str variable.  Because this variable is not initialized and,
thus, might contain arbitrary data, a NUL-terminated is not guaranteed.
The following string comparison is very likely to fail.  Correct this
problem by comparing up to the length of the command string only.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-08-31 17:41:15 +02:00
Hendrik Brueckner
f1a5ab20b7 zkey: add blank between option and argument
Few options are displayed with their argument concatenated.  This
is due to the nature of the .BR roff macro.  Ensure to separate them
with a blank (using "\~" which is an unbreakable space that stretches
like a normal inter-word space when a line is adjusted).

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-08-31 17:41:15 +02:00
Philipp Kern
39382ec5fd systemd: Fix deprecated BindTo usage in ttyrun-getty@.service.in
BindTo was renamed to BindsTo in systemd back in v187 from July 2012.

Fixes: #1

Signed-off-by: Philipp Kern <pkern@debian.org>
Acked-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-08-23 10:41:55 +02:00
Ingo Franzki
2e8ad91d3d zkey: validate XTS key: ignore domain and card
When validating an XTS key, the 2 key parts are validated separately.
This can happen on different crypto cards, when more than one crypto
card is available to the system. Each key part can be validated on
a different card, however, the 2 cards need to have the same master
key, thus the master key validation pattern contained in the 2 key
parts are checked.

Signed-off-by: Ingo Franzki <ifranzki@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-08-22 19:24:48 +02:00
Michael Holzheu
7548b470c2 Prepare for next release
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-08-21 12:54:52 +02:00
Hendrik Brueckner
b4714e6113 zkey: use octal values instead of S_IRWX* constants
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-08-21 12:36:33 +02:00
Hendrik Brueckner
fe0b2d96f7 zkey: properly set umask to prohibit permissions to group and others
Set the umask for the zkey process to clear permissions for genernated
secure key files for group and others.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-08-21 12:36:33 +02:00
Hendrik Brueckner
b53793d1b6 zkey: add -ldl to LDLIBS (not LDFLAGS)
The LDFLAGS content is added before the object files causing unresolved
symbol dereferences during the build.  This actually happens so far on
Debian/Ubuntu instances.

Hence, use LDLIBS instead.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-08-21 12:36:33 +02:00
Ingo Franzki
9b5568d2ef zkey: Typo in man page
Signed-off-by: Ingo Franzki <ifranzki@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-08-21 12:36:33 +02:00
Michael Holzheu
e0c48d6af8 Fix copyright dates
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
v2.0.0
2017-08-21 12:06:12 +02:00
Michael Holzheu
f77e401cd2 Fix release date and version
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-08-21 12:01:35 +02:00
Michael Holzheu
b627b8d8e1 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>
2017-08-21 10:55:40 +02:00