[ssl_mgmt] Fix copying of user/group ownership
This commit is contained in:
parent
4f51528611
commit
92962f6168
|
@ -281,6 +281,7 @@ generate_cert ()
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
getfacl "$keyPath" | setfacl --set-file=- $keySubdir/$keyFile
|
getfacl "$keyPath" | setfacl --set-file=- $keySubdir/$keyFile
|
||||||
|
chown --reference="$keyPath" $keySubdir/$keyFile
|
||||||
if [ -z "$no_overwrite" ]
|
if [ -z "$no_overwrite" ]
|
||||||
then
|
then
|
||||||
if [ ! -f "$keyDestDir/$keyFile" ]
|
if [ ! -f "$keyDestDir/$keyFile" ]
|
||||||
|
@ -294,6 +295,7 @@ generate_cert ()
|
||||||
-keyfile $CAKeyPath -passin file:$rootCAPwdPath \
|
-keyfile $CAKeyPath -passin file:$rootCAPwdPath \
|
||||||
-out $certSubdir/$certFile -infiles $csrSubdir/$reqFile
|
-out $certSubdir/$certFile -infiles $csrSubdir/$reqFile
|
||||||
getfacl "$certPath" | setfacl --set-file=- $certSubdir/$certFile
|
getfacl "$certPath" | setfacl --set-file=- $certSubdir/$certFile
|
||||||
|
chown --reference="$certPath" $certSubdir/$certFile
|
||||||
if [ -z "$no_overwrite" ]
|
if [ -z "$no_overwrite" ]
|
||||||
then
|
then
|
||||||
if [ ! -f "$certDestDir/$certFile" ]
|
if [ ! -f "$certDestDir/$certFile" ]
|
||||||
|
@ -314,6 +316,8 @@ EOF
|
||||||
mv $certSubdir/$certFile $certDestDir
|
mv $certSubdir/$certFile $certDestDir
|
||||||
fi
|
fi
|
||||||
cat $keyDestDir/$keyFile $certDestDir/$certFile > $keyDestDir/$keycertFile
|
cat $keyDestDir/$keyFile $certDestDir/$certFile > $keyDestDir/$keycertFile
|
||||||
|
getfacl "$keyPath" | setfacl --set-file=- $keyDestDir/$keycertFile
|
||||||
|
chown --reference="$keyPath" $keyDestDir/$keycertFile
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue