mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
genconfig: set 0700/0600 on /etc/ssl/private
This is needed so that private keys provided via default/customer configuration do not become world readable. Change-Id: I0e5d1b22730c7a44c82c34611412085fd500ce3a
This commit is contained in:
parent
b318a5b6f2
commit
c05e258ceb
2 changed files with 8 additions and 0 deletions
|
|
@ -436,6 +436,10 @@ function genconfig {
|
|||
v "chmod 0600 $FILEDIR/etc/shadow"
|
||||
chmod 0600 "$FILEDIR/etc/shadow"
|
||||
fi
|
||||
if [ -d "$FILEDIR/etc/ssl/private" ]; then
|
||||
v "find $FILEDIR/etc/ssl/private -type d -exec chmod 0700 '{}' ';' -o -type f -exec chmod 0600 '{}' ';'"
|
||||
find "$FILEDIR/etc/ssl/private" -type d -exec chmod 0700 '{}' ';' -o -type f -exec chmod 0600 '{}' ';'
|
||||
fi
|
||||
|
||||
# Set target version
|
||||
local git_version
|
||||
|
|
|
|||
|
|
@ -410,6 +410,10 @@ function genconfig_min {
|
|||
v "chmod 0600 $FILEDIR/etc/shadow"
|
||||
chmod 0600 "$FILEDIR/etc/shadow"
|
||||
fi
|
||||
if [ -d "$FILEDIR/etc/ssl/private" ]; then
|
||||
v "find $FILEDIR/etc/ssl/private -type d -exec chmod 0700 '{}' ';' -o -type f -exec chmod 0600 '{}' ';'"
|
||||
find "$FILEDIR/etc/ssl/private" -type d -exec chmod 0700 '{}' ';' -o -type f -exec chmod 0600 '{}' ';'
|
||||
fi
|
||||
|
||||
# Set target version
|
||||
local git_version
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue