*/
- if (!strlen(r->user)) {
+ if (!*r->user) {
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01699)
"ldap authorize: Userid is blank, AuthType=%s",
r->ap_auth_type);
}
- if (req->dn == NULL || strlen(req->dn) == 0) {
+ if (req->dn == NULL || !*req->dn) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01702)
"auth_ldap authorize: require user: user's DN has not "
"been defined; failing authorization");
* and populated with the userid and DN of the account in LDAP
*/
- if (!strlen(r->user)) {
+ if (!*r->user) {
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01709)
"ldap authorize: Userid is blank, AuthType=%s",
r->ap_auth_type);
ent = (struct mod_auth_ldap_groupattr_entry_t *) sec->groupattr->elts;
if (sec->group_attrib_is_dn) {
- if (req->dn == NULL || strlen(req->dn) == 0) {
+ if (req->dn == NULL || !*req->dn) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01712)
"auth_ldap authorize: require group: user's DN has "
"not been defined; failing authorization for user %s",
}
}
else {
- if (req->user == NULL || strlen(req->user) == 0) {
+ if (req->user == NULL || !*req->user) {
/* We weren't called in the authentication phase, so we didn't have a
* chance to set the user field. Do so now. */
req->user = r->user;
* and populated with the userid and DN of the account in LDAP
*/
- if (!strlen(r->user)) {
+ if (!*r->user) {
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01722)
"ldap authorize: Userid is blank, AuthType=%s",
r->ap_auth_type);
t = require;
- if (req->dn == NULL || strlen(req->dn) == 0) {
+ if (req->dn == NULL || !*req->dn) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01725)
"auth_ldap authorize: require dn: user's DN has not "
"been defined; failing authorization");
* and populated with the userid and DN of the account in LDAP
*/
- if (!strlen(r->user)) {
+ if (!*r->user) {
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01730)
"ldap authorize: Userid is blank, AuthType=%s",
r->ap_auth_type);
ldc = get_connection_for_authz(r, LDAP_COMPARE);
}
- if (req->dn == NULL || strlen(req->dn) == 0) {
+ if (req->dn == NULL || !*req->dn) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01733)
"auth_ldap authorize: require ldap-attribute: user's DN "
"has not been defined; failing authorization");
* and populated with the userid and DN of the account in LDAP
*/
- if (!strlen(r->user)) {
+ if (!*r->user) {
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01739)
"ldap authorize: Userid is blank, AuthType=%s",
r->ap_auth_type);
ldc = get_connection_for_authz(r, LDAP_SEARCH);
}
- if (req->dn == NULL || strlen(req->dn) == 0) {
+ if (req->dn == NULL || !*req->dn) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01742)
"auth_ldap authorize: require ldap-filter: user's DN "
"has not been defined; failing authorization");
}
}
if ((val = apr_table_get(params, "w_wr"))) {
- if (strlen(val) && strlen(val) < sizeof(wsel->s->route))
+ if (*val && strlen(val) < sizeof(wsel->s->route))
strcpy(wsel->s->route, val);
else
*wsel->s->route = '\0';
}
if ((val = apr_table_get(params, "w_rr"))) {
- if (strlen(val) && strlen(val) < sizeof(wsel->s->redirect))
+ if (*val && strlen(val) < sizeof(wsel->s->redirect))
strcpy(wsel->s->redirect, val);
else
*wsel->s->redirect = '\0';
}
}
if ((val = apr_table_get(params, "w_hu"))) {
- if (strlen(val) && strlen(val) < sizeof(wsel->s->hcuri))
+ if (*val && strlen(val) < sizeof(wsel->s->hcuri))
strcpy(wsel->s->hcuri, val);
else
*wsel->s->hcuri = '\0';
}
if (hc_valid_expr_f && (val = apr_table_get(params, "w_he"))) {
- if (strlen(val) && hc_valid_expr_f(r, val) && strlen(val) < sizeof(wsel->s->hcexpr))
+ if (*val && hc_valid_expr_f(r, val) && strlen(val) < sizeof(wsel->s->hcexpr))
strcpy(wsel->s->hcexpr, val);
else
*wsel->s->hcexpr = '\0';