Skip to content

Commit

Permalink
libsecret: include the keyring owner in output
Browse files Browse the repository at this point in the history
It could be confusing when searching multiple user's keyrings as root.
Additionally, ordered the output keys more intuitively.
  • Loading branch information
exploide committed Aug 6, 2023
1 parent 16000b9 commit 91d890a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Linux/lazagne/softwares/wallet/libsecret.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from lazagne.config.module_info import ModuleInfo
from lazagne.config import homes
from binascii import hexlify
import pwd
import traceback

try:
Expand Down Expand Up @@ -80,12 +81,13 @@ def run(self):

for item in storage:
values = {
'created': str(datetime.datetime.fromtimestamp(item.get_created())),
'modified': str(datetime.datetime.fromtimestamp(item.get_modified())),
'content-type': item.get_secret_content_type(),
'label': item.get_label(),
'Owner': pwd.getpwuid(uid).pw_name,
'Collection': label,
'Label': item.get_label(),
'Content-Type': item.get_secret_content_type(),
'Password': item.get_secret().decode('utf8'),
'collection': label,
'Created': str(datetime.datetime.fromtimestamp(item.get_created())),
'Modified': str(datetime.datetime.fromtimestamp(item.get_modified())),
}

# for k, v in item.get_attributes().iteritems():
Expand Down

0 comments on commit 91d890a

Please sign in to comment.