ShibMLP mlp;
const char *procState = "Authorization Processing Error";
const char *targetURL = NULL;
- HTAccessInfo *ht = NULL;
- HTGroupTable* grpstatus = NULL;
try {
if (!m_priv->m_app)
}
// Perform HTAccess Checks
- ht = getAccessInfo();
+ auto_ptr<HTAccessInfo> ht(getAccessInfo());
// No Info means OK. Just return
- if (!ht)
+ if (!ht.get())
return pair<bool,void*>(false, NULL);
vector<bool> auth_OK(ht->elements.size(), false);
#define CHECK_OK do { \
if (ht->requireAll) { \
- delete ht; \
- if (grpstatus) delete grpstatus; \
return pair<bool,void*>(false, NULL); \
} \
auth_OK[x] = true; \
}
}
else if (!strcmp(w,"group")) {
- grpstatus = getGroupTable(remote_user);
- if (!grpstatus) {
- delete ht;
+ auto_ptr<HTGroupTable> grpstatus(getGroupTable(remote_user));
+ if (!grpstatus.get()) {
return pair<bool,void*>(true, returnDecline());
}
CHECK_OK;
}
}
- delete grpstatus;
- grpstatus = NULL;
}
else {
Iterator<IAAP*> provs = m_priv->m_app->getAAPProviders();
auth_all_OK &= auth_OK[i];
}
- delete ht;
- if (grpstatus) delete grpstatus;
if (auth_all_OK || !method_restricted)
return pair<bool,void*>(false, NULL);
if (targetURL)
mlp.insert("requestURL", targetURL);
- delete ht;
-
return pair<bool,void*>(true,m_priv->sendError(this, "access", mlp));
}