From dadbf90ae524b1511c74f9e173fbc47f75d80f8a Mon Sep 17 00:00:00 2001 From: Gianluca Gabrielli Date: Mon, 13 Jun 2022 11:36:06 +0200 Subject: [PATCH] Remove FdoSecret 'dummy-entry' workaround for KPXC Thanks to the merge of PR#6943 [0] whenever a process runs a search while the keyring is locked the user will be prompted to unlock it. [0] https://github.com/keepassxreboot/keepassxc/pull/6943 --- .githooks/pre-commit | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 3cd5a6c..6942254 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -1,21 +1,12 @@ #!/usr/bin/env -S bash -i -unlock_wallet() { - echo "check the explanation attribute ;)" | secret-tool store --label="dummy-entry" explanation \ - "Because of quirks in the gnome libsecret API, a dummy entry needs to be stored in order to \ - guarantee that this keyring was properly unlocked. More details at http://crbug.com/660005 and \ - https://github.com/keepassxreboot/keepassxc/issues/4443" -} - get_user() { - unlock_wallet secret-tool search client sieveshell workstation wintermute 2>&1 | \ grep -E "^attribute\.UserName" | \ cut -d " " -f3 } get_pass() { - unlock_wallet secret-tool search client sieveshell workstation wintermute 2>&1 | \ grep -E "^secret" | \ cut -d " " -f3 @@ -29,9 +20,6 @@ local managesieve_port=4190 # If sieveshell is not installed skip this check w/o blocking the commit type sieveshell >/dev/null 2>&1 || return 0 -# Ensure the local wallet is unlocked before query for username and password -unlock_wallet - # This hook has to be run from there or it won't find all the sieve files find $(git rev-parse --show-toplevel) -type f -name "*.sieve" -printf "put %p %f\n" | sort -nr | \ sieveshell --user $(get_user) \ @@ -41,4 +29,4 @@ sieveshell --user $(get_user) \ $managesieve_address } -main \ No newline at end of file +main