Feature Request - Notify Prompt - Willing to create PR
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 20/100
Rechercherichtung
The proof of concept points to src/tgetpass.c, in tgetpass just before the prompt is written. First read how prompt handling and sudoers defaults are defined and validated, including their visudo editing path; the issue does not identify those entry points. Done means a scoped, safe configuration design and implementation that notifies when sudo waits for a password, with behavior and security expectations defined.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
I often have multiple terminals open with each terminal running some pipeline, (compiling, linting, installing, etc).
Some of those pipelines take a very long time and other than intermittently checking back in with each terminal, I have no way of knowing if a pipeline is done compiling and waiting to install and sitting at a sudo prompt for installation permission.
I would like to provide a user-configurable way to hook some (pre-approved and defined) external tool to let me know that sudo is waiting for input before it eventually times out the and pipeline fails.
I have a proof of concept which accomplishes exactly what I want:
// in src/tgetpass.c::tgetpass
// right before writing the prompt to output
if (notify) {
system("notify-send \"sudo\" \"sudo is prompting for a password\"");
}
I realize I don't want the external tool to be any arbitrary executable which could allow an injection and I don't want the notification to be configurable either. I would imagine that the user could specify something in the sudoers conf file something like:
Defaults promptpass_notify=notify-send
And the values for that option would be checked at init time to ensure there are no arbitrary calls to unexpected notifier scripts. (Although I realize someone could just symlink whatever they want, is this even a concern? This would be executed before sudo was even authorized to execute the given command)
I would be willing to do the legwork on this feature, but I got stuck in understanding how to implement this with support for editing with visudo and where a flag like this would live in conf or if it should just be an env flag.
- Vorherrschende Sprache
- C
- Sterne
- 1.7k
- Forks
- 306
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 24
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus sudo-project/sudo
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
sudo-project/sudo#583 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Signal forwarded to the command is lost when it arrives between fork() and execve() of the commandOffen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
sudo-project/sudo#566 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
sudo-project/sudo#553 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
sudo-project/sudo#552 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Documentation text overflows container instead of wrappingEvtl. wieder frei @BittuBarnwal7479 hat das vor 132 Tagen übernommen, und es ist kein Pull Request offen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 58/100
sudo-project/sudo#547 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in sudo-project/sudo
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 80/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
eunomia-bpf/bpfix#7 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
python-pillow/Pillow#10370 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag