[ssl_mgmt] Fix copying of user/group ownership

This commit is contained in:
Thomas Preud'homme 2014-05-04 23:23:16 +08:00
parent 4f51528611
commit 92962f6168
1 changed files with 4 additions and 0 deletions

View File

@ -281,6 +281,7 @@ generate_cert ()
return 1
fi
getfacl "$keyPath" | setfacl --set-file=- $keySubdir/$keyFile
chown --reference="$keyPath" $keySubdir/$keyFile
if [ -z "$no_overwrite" ]
then
if [ ! -f "$keyDestDir/$keyFile" ]
@ -294,6 +295,7 @@ generate_cert ()
-keyfile $CAKeyPath -passin file:$rootCAPwdPath \
-out $certSubdir/$certFile -infiles $csrSubdir/$reqFile
getfacl "$certPath" | setfacl --set-file=- $certSubdir/$certFile
chown --reference="$certPath" $certSubdir/$certFile
if [ -z "$no_overwrite" ]
then
if [ ! -f "$certDestDir/$certFile" ]
@ -314,6 +316,8 @@ EOF
mv $certSubdir/$certFile $certDestDir
fi
cat $keyDestDir/$keyFile $certDestDir/$certFile > $keyDestDir/$keycertFile
getfacl "$keyPath" | setfacl --set-file=- $keyDestDir/$keycertFile
chown --reference="$keyPath" $keyDestDir/$keycertFile
return 0
}