Исправлена работа с шифрованным профилем

master3.4 3.4.7.1
parent b4a8299b89
commit c713cd6cb8

@ -24,6 +24,7 @@ get_kdm_icon_face_dir() {
get_sddm_icon_face_dir() {
local config_file=/etc/sddm.conf
if [[ -f $config_file ]]
then
if grep ^FacesDir $config_file &>/dev/null
then
sed -rn 's/^FacesDir=(.*)/\1/p' $config_file

@ -119,15 +119,22 @@ class Desktop(MethodsInterface):
_(": ") +
_("The home directory contains mount points"))
# поместить данные во временный tarfile
calculateName = ".calculate"
calculatePath = path.join(userDir, calculateName)
remove_files = []
tf = tempfile.TemporaryFile()
with tarfile.open(fileobj=tf, mode='w:') as tarf:
tarf.add(calculatePath, calculateName)
for fn in (".calculate", ".dmrc", ".face", ".face.icon"):
full_fn = path.join(userDir, fn)
if path.lexists(full_fn):
with tarfile.open(fileobj=tf, mode='w:') as tarf:
tarf.add(full_fn, fn)
remove_files.append(full_fn)
tf.flush()
tf.seek(0)
# удалить эти данные
shutil.rmtree(calculatePath)
for fn in remove_files:
if not path.islink(fn) and path.isdir(fn):
shutil.rmtree(fn)
else:
os.unlink(fn)
# создать шифрованные данные
e = process('/usr/bin/ecryptfs-setup-private', '-u', userName,

Loading…
Cancel
Save