git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4] credential: new attribute password_expiry_utc

From
Calvin Wan <calvinwan@google.com>
Date
Feb 22, 2023, 19:22 UTC
Message-ID
<CAFySSZA-f+Qgs2bT_Vkj79PvXqGarBLtqeyEN3vWCj44no6Eig@mail.gmail.com>
In-Reply-To
<pull.1443.v4.git.git.1676701977347.gitgitgadget@gmail.com>
Show 14 quoted lines
>  static int run_credential_helper(struct credential *c,
> @@ -342,6 +353,12 @@ void credential_fill(struct credential *c)
>
>         for (i = 0; i < c->helpers.nr; i++) {
>                 credential_do(c, c->helpers.items[i].string, "get");
> +               if (c->password_expiry_utc < time(NULL)) {
> +                       /* Discard expired password */
> +                       FREE_AND_NULL(c->password);
> +                       /* Reset expiry to maintain consistency */
> +                       c->password_expiry_utc = TIME_MAX;
> +               }
>                 if (c->username && c->password)
>                         return;
>                 if (c->quit)
Thanks for clarifying this block!

Overall, this patch is additive and shouldn't cause any regressions for current users of credential/credential-helper so I'm all for adding an expiry attribute to alleviate the use case pains you described above.

Reviewed-by: Calvin Wan <calvinwan@google.com>
Previous: M Hickford via GitGitGadget
Message 26 of 26 in “credential: new attribute password_expiry_utc”
  1. credential: new attribute password_expiry_utcM Hickford via GitGitGadget, Jan 28, 2023
  2. Junio C HamanoJan 29, 2023
  3. M HickfordFeb 1, 2023
  4. Junio C HamanoFeb 1, 2023
  5. Eric SunshineJan 30, 2023
  6. M HickfordFeb 5, 2023
  7. credential: new attribute password_expiry_utcM Hickford via GitGitGadget, Feb 1, 2023
  8. Jeff KingFeb 1, 2023
  9. Junio C HamanoFeb 1, 2023
  10. Jeff KingFeb 2, 2023
  11. Matthew John CheethamFeb 1, 2023
  12. Jeff KingFeb 2, 2023
  13. M HickfordFeb 5, 2023
  14. Matthew John CheethamFeb 6, 2023
  15. M HickfordFeb 5, 2023
  16. credential: new attribute password_expiry_utcM Hickford via GitGitGadget, Feb 4, 2023
  17. Junio C HamanoFeb 14, 2023
  18. M HickfordFeb 14, 2023
  19. Lessley DenningtonFeb 17, 2023
  20. Junio C HamanoFeb 17, 2023
  21. M HickfordFeb 18, 2023
  22. Martin ÅgrenFeb 14, 2023
  23. Calvin WanFeb 16, 2023
  24. M HickfordFeb 18, 2023
  25. credential: new attribute password_expiry_utcM Hickford via GitGitGadget, Feb 18, 2023
  26. Calvin WanFeb 22, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.