shadow-utils write locks with NUL-terminated contents while uutils/shadow does not.
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 64/100
Hướng nghiên cứu
The report points to shadow-utils' lib/commonio.c and describes lock parsing in uutils/shadow, but names no uutils file or test. Start by tracing lock creation and stale-lock parsing in uu_shadow_core, then look for lock tests. Done when a lock written with a NUL-terminated PID is handled without deleting a lock that is still held.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
stprintf_a(buf, "%lu", (unsigned long) pid);
len = (ssize_t) strlen (buf) + 1;
if (write_full(fd, buf, len) == -1) {
and with shadow-utils + strace I got:
write(5<.../etc/subuid.633201>, "633201\0", 7) = 7
write(6<.../etc/subgid.633201>, "633201\0", 7) = 7
while uutils/shadow doesn't.
This itself does not pose a compatibility issue since users are not expected to have both running on the same system live. However, there maybe edge cases (e.g. switching between the two). Additionally, I ran into this because I was trying to reuse uutils's uu_shadow_core in another small util of mine to handle locking.
This may cause the following:
- shadow-utils holds a lock containing 633201\0.
- uutils’
trim().parse::<i32>()rejects the NUL. - uutils interprets the parse failure as a stale lock and deletes it.
- uutils can then acquire the lock while shadow-utils is still working, breaking mutual exclusion.
A PR is possible if you decided this to be fixed.
- Ngôn ngữ chính
- Rust
- Star
- 20
- Fork
- 10
- Merge trung bình
- 22 giờ 17 phút
- Pull request đã merge (30 ngày)
- 37
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của uutils/shadow
-
chfn: writes five GECOS fields, GNU writes four when "other" is emptyCó thể đã có người làm @pierre-warnier đã nhận 4 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
uutils/shadow#362 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
chage -E, usermod -e: dates other than YYYY-MM-DD are rejectedCó thể đã có người làm @pierre-warnier đã nhận 4 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
uutils/shadow#365 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Dependency DashboardĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 20/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của uutils/shadow
Issue tương tự
-
[cosmic-applet-battery] Division by zero displays NaN% when UPower reports max_brightness = 0Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
pop-os/cosmic-applets#1619 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
binding:python bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
coollabsio/orbit#72 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
swc_common: Mark::least_ancestor never returns when the answer is the root mark (ANT-2026-JYDQGGRT)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
swc-project/swc-ai-issues#137 ·
-
Synth suite fails unless run from the repo root: signal_flow's default machine path is cwd-relativeĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Nimblesite/osprey#370 ·
Maintainer thường phản hồi trong vòng 1 ngày