Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command to check if a path in qubesdb exists #54

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DemiMarie
Copy link
Contributor

qubesdb-exists will be used in the firewall code to check if a given network device is going to be part of a bridge or not.

qubesdb-exists will be used in the firewall code to check if a given
network device is going to be part of a bridge or not.
@marmarek
Copy link
Member

Why not simply qubesdb-read and look at its exit code? Separate tool for this seems to be an overkill.

@DemiMarie
Copy link
Contributor Author

This approach is less error-prone. On success, one gets either true (exists) or false (missing) and an exit status of 0. On failure, one gets a nonzero exit status.

@marmarek
Copy link
Member

marmarek commented Mar 6, 2023

qubesdb-exists will be used in the firewall code to check if a given network device is going to be part of a bridge or not.

Can you be a bit more specific? Don't you need to read a value anyway?

@DemiMarie
Copy link
Contributor Author

qubesdb-exists will be used in the firewall code to check if a given network device is going to be part of a bridge or not.

Can you be a bit more specific? Don't you need to read a value anyway?

I need to check if an interface is managed by @fepitre’s bridge extension. My current plan is to have that extension use a specific qubesdb entry (currently /net-config/$MAC/custom) to indicate that it is managed by something other than the normal logic. The value doesn’t matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants