View | Details | Raw Unified | Return to bug 38859 | Differences between
and this patch

Collapse All | Expand All

(-)a/base/univention-ssl/gencertificate.py (-5 / +6 lines)
 Lines 36-41    Link Here 
36
from listener import configRegistry, setuid, unsetuid
36
from listener import configRegistry, setuid, unsetuid
37
import grp
37
import grp
38
import os
38
import os
39
import tempfile
39
40
40
import univention.debug as ud
41
import univention.debug as ud
41
import subprocess
42
import subprocess
 Lines 159-169   def create_certificate(hostname, domainname): Link Here 
159
		ud.debug(ud.LISTENER, ud.INFO,
160
		ud.debug(ud.LISTENER, ud.INFO,
160
				'CERTIFICATE: Creating certificate %s' % hostname)
161
				'CERTIFICATE: Creating certificate %s' % hostname)
161
162
162
		cmd = '. /usr/share/univention-ssl/make-certificates.sh;gencert "%s" "%s"' % \
163
		with tempfile.NamedTemporaryFile() as fd:
163
				(fqdn, fqdn)
164
			fd.write('. /usr/share/univention-ssl/make-certificates.sh; gencert "$@"; exit $?')
164
		ret = subprocess.call(cmd, shell=True)
165
			fd.flush()
165
		if ret:
166
			if subprocess.call(('/bin/sh', fd.name, fqdn, fqdn)):
166
			raise Exception("Certificate creation failed.")
167
				raise Exception("Certificate creation failed.")
167
168
168
	# Create symlink
169
	# Create symlink
169
	try:
170
	try:

Return to bug 38859