HomeFreeBSD

mountd: Fix handling of usernames that start with a digit

Description

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

Details

Provenance
rmacklemAuthored on Nov 18 2021, 9:35 PM
Reviewer
rmacklem
Differential Revision
D32993: Fix mountd parsing of user/group info in /etc/exports
Parents
rG1ac5586c6d86: style.Makefile.5: Do not require $FreeBSD$ SCM IDs
Branches
Unknown
Tags
Unknown