Re: [PATCH v2] credential-cache: respect request capabilities
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Jan 6, 2025, 23:05 UTC
- Message-ID
- <Z3xhqCf7Gr74BHO4@tapette.crustytoothpaste.net>
- In-Reply-To
- <CAGJzqsn6kV4LeYKk=qWu3GvbtNrJ5LG9LvbDVMQoHqibR9ieSA@mail.gmail.com>
On 2025-01-06 at 22:57:06, M Hickford wrote:
Show 24 quoted lines
> On Mon, 6 Jan 2025 at 22:32, brian m. carlson
> <sandals@crustytoothpaste.net> wrote:
> >
> > On 2025-01-06 at 19:52:11, M Hickford via GitGitGadget wrote:
> > > From: M Hickford <mirth.hickford@gmail.com>
> > > diff --git a/builtin/credential-cache--daemon.c b/builtin/credential-cache--daemon.c
> > > index bc22f5c6d24..692216cf83c 100644
> > > --- a/builtin/credential-cache--daemon.c
> > > +++ b/builtin/credential-cache--daemon.c
> > > @@ -134,17 +134,16 @@ static void serve_one_client(FILE *in, FILE *out)
> > > else if (!strcmp(action.buf, "get")) {
> > > struct credential_cache_entry *e = lookup_credential(&c);
> > > if (e) {
> > > - e->item.capa_authtype.request_initial = 1;
> > > - e->item.capa_authtype.request_helper = 1;
> > > -
> > > - fprintf(out, "capability[]=authtype\n");
> > > + if (credential_has_capability(&c.capa_authtype, CREDENTIAL_OP_RESPONSE)) {
> > > + fprintf(out, "capability[]=authtype\n");
> > > + }
> >
> > This part is not correct.
>
> Thanks for the review. I'll revert this part and amend the commit message.I applied this without that change and it does still pass the test, which I think is good and shows that can be omitted. If I have some time, I may send a follow-up patch to add some additional tests.
-- brian m. carlson (they/them or he/him) Toronto, Ontario, CA