mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-22 14:23:19 -06:00
Fix permission problem with DS user.
This commit is contained in:
parent
326b37371b
commit
0d0f83f603
@ -24,6 +24,7 @@ import tempfile
|
|||||||
import shutil
|
import shutil
|
||||||
import logging
|
import logging
|
||||||
import pwd
|
import pwd
|
||||||
|
import os
|
||||||
|
|
||||||
SHARE_DIR = "/usr/share/ipa/"
|
SHARE_DIR = "/usr/share/ipa/"
|
||||||
|
|
||||||
@ -102,6 +103,7 @@ class DsInstance:
|
|||||||
self.__setup_sub_dict()
|
self.__setup_sub_dict()
|
||||||
|
|
||||||
self.__create_ds_user()
|
self.__create_ds_user()
|
||||||
|
self.__set_ds_perms()
|
||||||
self.__create_instance()
|
self.__create_instance()
|
||||||
self.__add_default_schemas()
|
self.__add_default_schemas()
|
||||||
self.__enable_ssl()
|
self.__enable_ssl()
|
||||||
@ -141,6 +143,12 @@ class DsInstance:
|
|||||||
run(args)
|
run(args)
|
||||||
logging.debug("done adding user")
|
logging.debug("done adding user")
|
||||||
|
|
||||||
|
def __set_ds_perms(self):
|
||||||
|
p = pwd.getpwnam(self.ds_user)
|
||||||
|
uid = p.pw_uid
|
||||||
|
gid = p.pg_gid
|
||||||
|
os.chown("/var/tmp/fedora-ds", uid, gid)
|
||||||
|
|
||||||
def __create_instance(self):
|
def __create_instance(self):
|
||||||
logging.debug("creating ds instance . . . ")
|
logging.debug("creating ds instance . . . ")
|
||||||
inf_txt = template_str(INF_TEMPLATE, self.sub_dict)
|
inf_txt = template_str(INF_TEMPLATE, self.sub_dict)
|
||||||
|
Loading…
Reference in New Issue
Block a user