Coder Social home page Coder Social logo

LoadCredential= doesn't fail with 243/CREDENTIALS but silently skips if non-existent ID is specified (without explicit PATH) about systemd HOT 6 CLOSED

arianvp avatar arianvp commented on June 16, 2024
LoadCredential= doesn't fail with 243/CREDENTIALS but silently skips if non-existent ID is specified (without explicit PATH)

from systemd.

Comments (6)

arianvp avatar arianvp commented on June 16, 2024

I guess this is somewhat similar to #27373 by the way (Except this one is for paths instead of unix sockets)

from systemd.

YHNdnzj avatar YHNdnzj commented on June 16, 2024

This is intentional: https://github.com/systemd/systemd/blob/main/src/core/exec-credential.c#L500

from systemd.

arianvp avatar arianvp commented on June 16, 2024

To give an anecdote about why this bit me:

Nix uses the existence of the signing key whether packaging signing is enabled or not after building a package. So a missing credential caused my packages not to be signed. We can brush that off as "Nix made a stupid design choice there" but that's why I ran into this.

I'm fine with documenting this as "expected behaviour" by the way. and perhaps that means we can close #27373 with the same reason

from systemd.

YHNdnzj avatar YHNdnzj commented on June 16, 2024

Hmm, I think #27373 can serve as a valid RFE?

from systemd.

arianvp avatar arianvp commented on June 16, 2024

Well. If we can agree on "Hey it's up to the application to actually check that the credential exists" then we can just make all LoadCredential= stanzas work the same. That is: Always succeed silently if the credential doesn't exist. Then people do not get surprised. And then we do not need to change the AF_UNIX protocol to handle "Credential does not exist" scenario"

from systemd.

poettering avatar poettering commented on June 16, 2024

This is intended, the idea is that we import creds down the tree that are specified, but gracefully handle the ones that aren't.

from systemd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.