Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

`visudo`: Prevent locking yourself out

Đang mở
#190 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
c
Lĩnh vực
cli, security

Hướng nghiên cứu

Start by tracing how visudo parses and validates sudoers rules, then find where it decides whether a file can be saved. The issue proposes warning when a root user adds ALL ALL=(ALL) !ALL and preventing the save, but does not name files or tests. Done means this case is detected and the proposed safeguard is covered by tests.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hello!

Would it be possible to check the following syntax and intercept it?:

ALL ALL=(ALL) !ALL

I am thinking of a condition something this:

if(<command> == "!ALL" && <username_euid> == 0)
{
     printf("%s", "Not a syntax error, but do not lock yourself out!");
     <sudo_not_save_file>
}

A few sentences for insults`:

  • You do not want to lock yourself out, do you?
  • Oh, he did it again!
  • What would you do without me? :)
  • Blasphemy!
  • No! Bad human! Sit!

Having su or other alternatives as backup should be considered as a workaround solution.

-Ramon

PS: This emerged from the Gentoo User mailing list discussion: [gentoo-user] Update to /etc/sudoers disables wheel users!!!. Word pun intended. 😄

Ngôn ngữ chính
C
Star
1.7k
Fork
306
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
24

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của sudo-project/sudo

Tất cả issue của sudo-project/sudo

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.