1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-21 18:50:38 +03:00

sqlite_storage.get_hkcu_entry()

This commit is contained in:
Игорь Чудов 2020-06-29 16:59:30 +04:00
parent b616221562
commit 23983f7316
Signed by untrusted user: nir
GPG Key ID: 0F3883600CAE7AAC

View File

@ -309,14 +309,14 @@ class sqlite_registry(registry):
def get_hkcu_entry(self, sid, hive_key):
res = (self
.db_session
.query(samba_preg)
.query(samba_hkcu_preg)
.filter(samba_hkcu_preg.sid == sid)
.filter(samba_hkcu_preg.hive_key == hive_key)
.first())
# Try to get the value from machine SID as a default if no option is set.
if not res:
machine_sid = self.get_info('machine_sid')
res = self.db_session.query(samba_preg).filter(samba_hkcu_preg.sid == machine_sid).filter(samba_hkcu_preg.hive_key == hive_key).first()
res = self.db_session.query(samba_hkcu_preg).filter(samba_hkcu_preg.sid == machine_sid).filter(samba_hkcu_preg.hive_key == hive_key).first()
return res
def filter_hkcu_entries(self, sid, startswith):