[ssl_mgmt] copy access right from existing file

This commit is contained in:
Thomas Preud'homme 2014-03-09 18:18:58 +08:00
parent 1309f7d718
commit 2674b4341d
1 changed files with 2 additions and 0 deletions

View File

@ -219,8 +219,10 @@ generate_cert ()
then
return 1
fi
getfacl "$keyPath" | setfacl --set-file=- newkeys/$keyFile
mv newkeys/$keyFile private
openssl ca -batch -out newcerts/$certFile -config $confFile -passin file:/root/passwords/root_ca -infiles csr/$reqFile
getfacl "$certPath" | setfacl --set-file=- newcerts/$certFile
mv newcerts/$certFile certs
cat private/$keyFile certs/$certFile > private/$keycertFile
return 0