dom0: do not use os.getlogin()

It doesn't work when VM started from init.d script
This commit is contained in:
Marek Marczykowski 2011-07-17 01:12:59 +02:00
parent 059ecb3224
commit 906741c361

View File

@ -47,7 +47,7 @@ def handle_dom0updates(updatevm):
shutil.rmtree(updates_rpm_dir) shutil.rmtree(updates_rpm_dir)
os.mkdir(updates_rpm_dir) os.mkdir(updates_rpm_dir)
os.chmod(updates_rpm_dir, 0775) os.chmod(updates_rpm_dir, 0775)
subprocess.check_call(["/usr/lib/qubes/qfile-dom0-unpacker", os.getlogin(), updates_rpm_dir]) subprocess.check_call(["/usr/lib/qubes/qfile-dom0-unpacker", str(os.getuid()), updates_rpm_dir])
# Verify received files # Verify received files
for f in os.listdir(updates_rpm_dir): for f in os.listdir(updates_rpm_dir):
if package_regex.match(f): if package_regex.match(f):