Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only assume ID if entire string is numeric #1756

Merged
merged 1 commit into from
Jun 17, 2014
Merged

only assume ID if entire string is numeric #1756

merged 1 commit into from
Jun 17, 2014

Conversation

garywall
Copy link
Contributor

The Str2Uid/Str2Gid functions in libpromises/conversion.c check only the first character of the provided string to see if it is a digit - if so the whole string is treated as an ID. This breaks handling of access/ownership promises for user/group names that start with a digit. This commit checks to see if the entire string is digits before assuming an ID, using the StringIsNumeric function from the bundled libutils/string_lib.c.

https://dev.cfengine.com/issues/6099

kacf added a commit that referenced this pull request Jun 17, 2014
only assume ID if entire string is numeric
@kacf kacf merged commit 7cbe181 into cfengine:master Jun 17, 2014
@kacf
Copy link
Contributor

kacf commented Jun 17, 2014

Thanks, makes sense!

@garywall garywall deleted the str2uidgid_fix branch June 17, 2014 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants