]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mountd: Fix handling of usernames that start with a digit
authorRick Macklem <rmacklem@FreeBSD.org>
Thu, 18 Nov 2021 21:35:25 +0000 (13:35 -0800)
committerRick Macklem <rmacklem@FreeBSD.org>
Thu, 18 Nov 2021 21:35:25 +0000 (13:35 -0800)
commitf4bf849bb894f4934b8df6c04a820dfa52e9576c
tree8ca9bb9a6ecab2dc452b6780a360b35ff3c7a6fd
parent1ac5586c6d86134922e18871b270ca483c00bf8b
mountd: Fix handling of usernames that start with a digit

yocalebo_gmail.com submitted a patch for mountd.c that
fixes the case where a username starts with a digit.
Without this patch, the username that starts with a
digit is misinterpreted as a numeric uid.
With this patch, any string that does not entirely
convert to a decimal number via strtoul() is considered
a user/group name.

Submitted by: yocalebo_gmail.com
Reviewed by: rmacklem
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D32993
usr.sbin/mountd/mountd.c