/*
Copyright (C) 2017 Red Hat
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "tools/common/sss_tools.h"
#include "sbus/sssd_dbus.h"
#include "responder/ifp/ifp_iface.h"
/*
* We're searching the cache directly..
*/
#include "providers/ipa/ipa_hbac_private.h"
#include "providers/ipa/ipa_rules_common.h"
struct sss_domain_info *domain);
struct sss_domain_info *dom,
const char *dn_attr,
const char **_rdn_value)
{
const char *rdn_str;
return ENOMEM;
}
goto done;
}
goto done;
}
goto done;
}
done:
return ret;
}
const char *dn_attr,
const char *group_rdn,
bool *_is_group)
{
const char *comp_name;
bool is_group = false;
return ENOMEM;
}
goto done;
}
&& strncasecmp(group_rdn,
is_group = true;
}
done:
return ret;
}
struct ldb_message *rule_msg,
const char *category_attr_name,
const char *category_label)
{
if (category_attr == NULL) {
return;
}
if (category_attr->num_values > 0) {
for (unsigned i = 0; i < category_attr->num_values; i++) {
PRINT("%s%s",
i > 0 ? ", " : "",
}
PRINT("\n");
}
}
struct ldb_message *rule_msg,
const char *member_attr_name,
const char *group_rdn,
const char *object_label,
const char *group_label)
{
return;
}
if (member_attr == NULL) {
goto done;
}
const char *,
const char *,
goto done;
}
bool is_group;
const char *rdn_string;
const char *dn_attr;
continue;
}
continue;
}
if (is_group == false) {
goto done;
}
name_count++;
} else {
goto done;
}
group_count++;
}
}
if (member_names[0] != NULL) {
for (int i = 0; member_names[i]; i++) {
}
PRINT("\n");
}
if (member_group_names[0] != NULL) {
for (int i = 0; member_group_names[i]; i++) {
}
PRINT("\n");
}
done:
}
struct ldb_message *rule_msg)
{
return;
}
"groups",
_("Member users"),
_("Member groups"));
_("User category"));
"hbacservicegroups",
_("Member services"),
_("Member service groups"));
_("Service category"));
PRINT("\n");
}
struct sss_domain_info *domain)
{
const char *path;
return ENOMEM;
}
printf(_("Out of memory!\n"));
goto done;
}
if (error != SSS_SIFP_OK) {
goto done;
}
if (error != SSS_SIFP_OK) {
goto done;
}
goto done;
}
done:
return ret;
}
struct sss_domain_info *domain)
{
const char *attrs[] = {
NULL,
};
/* Run the pam account phase to make sure the rules are fetched by SSSD */
ERROR("Unable to refresh HBAC rules, using cached content\n");
/* Non-fatal */
}
return ENOMEM;
}
goto done;
}
&rule_count, &msgs);
goto done;
}
PRINT("No cached rules. All users will be denied access\n");
goto done;
}
for (size_t i = 0; i < rule_count; i++) {
}
done:
return ret;
}
{
return sssctl_ipa_access_report;
}
return NULL;
}
struct sss_tool_ctx *tool_ctx,
void *pvt)
{
return ret;
}
return ERR_DOMAIN_NOT_FOUND;
}
ERROR("Access report not implemented for domains of type %1$s\n",
return ret;
}
}