8000 update firewall module to use sudo ufw status properly by docsmooth · Pull Request #1700 · wtfutil/wtf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

update firewall module to use sudo ufw status properly #1700

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

Merged
merged 2 commits into from
Jun 22, 2025

Conversation

docsmooth
Copy link
Contributor

This re-orders the "ufw status" logic to assume it's being run as a regular user, and use "sudo /usr/sbin/ufw status". If the username is root, then instead use simply "ufw status".

This update does NOT take variable elevation commands like pbrun/dzdo/pbsudo into account. I may add that in a future update.

Copy link
stale bot commented Jan 15, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 15, 2025
@docsmooth
Copy link
Contributor Author

Why was this marked wontfix? The UFW status comes up empty on Ubuntu as a regular user without, do I need to reference an issue?

@FelicianoTech
Copy link
Collaborator

I tried testing out this PR and it hangs my WTF instance. Not sure what's going on right now but I can try to revisit sometime soon.

@docsmooth
Copy link
Contributor Author

@FelicianoTech do you have a NOPASSWD entry in your sudoers for the ufw command? If not, it's hanging for your password

@FelicianoTech
Copy link
Collaborator

@docsmooth I did not. I would love to figure out a way to notify the user that that's the problem rather than just locking up. I don't want to hold up this PR though so that can happen latter.

Verified this works. Thank you for contributing.

@FelicianoTech FelicianoTech merged commit d3e2826 into wtfutil:master Jun 22, 2025
5 checks passed
@docsmooth
Copy link
Contributor Author

@FelicianoTech that's a great point. I'll think about this, I have some thoughts

Sign up for free to join this conve 5350 rsation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0