/*
SSSD
SELinux-related utility functions
Authors:
Jan Zeleny <jzeleny@redhat.com>
Copyright (C) 2012 Red Hat
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "util/sss_selinux.h"
#include "util/sss_utf8.h"
#include "db/sysdb_selinux.h"
struct ldb_message_element *sought_values)
{
int i, j;
for (i = 0; i < values->num_values; i++) {
for (j = 0; j < sought_values->num_values; j++) {
continue;
}
return true;
}
}
return false;
}
struct sysdb_attrs *user,
struct sysdb_attrs *host,
{
int i;
bool matched_name;
bool matched_group;
bool matched_category;
return false;
}
/* Search for user and host related elements */
}
}
if (user) {
return false;
}
"User does not have orig memberof, "
"therefore it can't match to any rule\n");
return false;
}
/**
* The rule won't match if user category != "all" and user map doesn't
* contain neither user nor any of his groups in memberUser attribute
*/
matched_category = false;
for (i = 0; i < usercat->num_values; i++) {
matched_category = true;
break;
}
}
}
if (!matched_category) {
return false;
} else {
if (matched_name) {
} else if (matched_group) {
} else {
return false;
}
}
} else {
}
}
if (host) {
return false;
}
"Host does not have orig memberof, "
"therefore it can't match to any rule\n");
return false;
}
/**
* The rule won't match if host category != "all" and user map doesn't
* contain neither host nor any of its groups in memberHost attribute
*/
matched_category = false;
for (i = 0; i < hostcat->num_values; i++) {
matched_category = true;
break;
}
}
}
if (!matched_category) {
return false;
} else {
if (matched_name) {
} else if (matched_group) {
} else {
return false;
}
}
} else {
}
}
}
return true;
}
struct sss_domain_info *domain,
const char *username,
struct sysdb_attrs **_user_attrs)
{
const char **attrs;
goto done;
}
goto done;
}
attrs[0] = SYSDB_ORIG_DN;
&user_msg);
goto done;
}
if (user_attrs == NULL) {
goto done;
}
done:
return ret;
}
{
int i;
}
}
return NULL;
}