]> git.ipfire.org Git - thirdparty/git.git/commitdiff
osxkeychain: erase all matching credentials
authorBo Anderson <mail@boanderson.me>
Sat, 17 Feb 2024 23:34:54 +0000 (23:34 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Apr 2024 22:38:20 +0000 (15:38 -0700)
Other credential managers erased all matching credentials, as indicated
by a test case that osxkeychain failed:

    15 - helper (osxkeychain) erases all matching credentials

Signed-off-by: Bo Anderson <mail@boanderson.me>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/credential/osxkeychain/git-credential-osxkeychain.c

index dc294ae944ac5f4ab493684832f1ccdf1f2c66bd..e9cee3aed4591d2422b6f59513e1950a8fa90c26 100644 (file)
@@ -182,7 +182,8 @@ static OSStatus delete_internet_password(void)
        if (!protocol || !host)
                return -1;
 
-       attrs = CREATE_SEC_ATTRIBUTES(NULL);
+       attrs = CREATE_SEC_ATTRIBUTES(kSecMatchLimit, kSecMatchLimitAll,
+                                     NULL);
        result = SecItemDelete(attrs);
        CFRelease(attrs);