-
Notifications
You must be signed in to change notification settings - Fork 97
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
Cleanup config parsing #47
base: master
Are you sure you want to change the base?
Conversation
Conflicts: src/mod_auth_cas.c src/mod_auth_cas.h
if(apr_stat(&f, value, APR_FINFO_TYPE, cmd->temp_pool) == APR_INCOMPLETE) | ||
return(apr_psprintf(cmd->pool, "MOD_AUTH_CAS: Could not find CASCookiePath '%s'", value)); | ||
if ((errno == ERANGE && (l == LONG_MAX || l == LONG_MIN)) || | ||
(errno != 0 && l == 0) || l < 0 || *eptr != '\0') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems rather convoluted: if (errno != 0 || *eptr != '\0' || l < 0)
should be enough, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's convoluted (taken from man strtol) but the more succint version you suggest is clearly sufficient.
Some nits but mostly LGTM. I would suggest to rebase and squash it into sensible commits. |
Remove last remnants of wildcard cert directive.
Conflicts: src/mod_auth_cas.c tests/mod_auth_cas_test.c
Refactor valid domain check and adjust cast of cmd_parm info member.
OK, I think I addressed all your comments, and I tried to rebase/squash but I have no clue if I did it right :-) |
Okay, so ideally you'd do something like this:
And end up with two commits - one that removes CASAllowWildcardCert, the other that reworks option parsing - that you can fast-forward merge into the master branch (if you were working from a feature-branch). You get bonus karma for nice kernel-style commit logs. :-) Aside from that, it LGTM. |
Can someone take a look at this? I forgot to submit this a while ago. Basically, tries to make the config parsing block less of an eyesore.