Project

General

Profile

Actions

Submit #3275

closed

[PATCH] pw_scan: remove checks for (u|g)ids > USHRT_MAX.

Added by dancrossnyc almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Userland
Target version:
Start date:
05/21/2021
Due date:
% Done:

0%

Estimated time:

Description

Remove the check and simplify the logic for checking
UID/GID validity in `pw_scan()` by calling `strtonum`
instead of `strtoul`.

I ran into this because I use a non-default UID/GID
numbering scheme where both are typically greater
than 2^16 for normal users. The width of UIDs has
been 32 bits since before 4.4BSD in 1994, almost 27
years ago; if larger UIDs were going to show up as
a problem it would have already happened.


Files

Actions #1

Updated by dancrossnyc almost 3 years ago

A gentle ping on this? I should note that FreeBSD effectively disabled this check in 2009: https://cgit.freebsd.org/src/commit/lib/libc/gen/pw_scan.c?id=764eca2591d4b1b0fdb45e4e839b1163bf76219f

Actions #2

Updated by liweitianux almost 3 years ago

Hi. I've contacted Sascha Wildner to review and handle your patch. I think it will be merged soon.

Thank you for the help with this project :D

Cheers,
Aaron

Actions #3

Updated by swildner almost 3 years ago

  • Status changed from New to Closed

I've pushed it (with some minor adjustments in manual pages). Thanks!

https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8f13a1c5481b54b10c81c0fb1c1f2b46f93cd643

Actions #4

Updated by dancrossnyc almost 3 years ago

Thank you!

Actions #5

Updated by tuxillo almost 3 years ago

  • Target version changed from 13 to 6.2
Actions

Also available in: Atom PDF