sysdb_gpo.c revision 04d138472cc086fb7961f0d378852b09961b1a33
/*
SSSD
Authors:
Yassir Elley <yelley@redhat.com>
Copyright (C) 2014 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 "db/sysdb_private.h"
static struct ldb_dn *
const char *gpo_guid)
{
char *clean_gpo_guid;
return NULL;
}
return dn;
}
const char *gpo_guid,
int gpo_version,
int cache_timeout,
{
int lret;
struct ldb_message *update_msg;
struct ldb_message **msgs;
static const char *attrs[] = SYSDB_GPO_ATTRS;
bool in_transaction = false;
if (!update_msg) {
goto done;
}
if (!update_msg->dn) {
goto done;
}
goto done;
}
if (!now) {
}
in_transaction = true;
/* Check for an existing gpo_guid entry */
/* Create new GPO */
"Adding new GPO [gpo_guid:%s][gpo_version:%d]\n",
/* Add the objectClass */
NULL);
if (lret != LDB_SUCCESS) {
goto done;
}
if (lret != LDB_SUCCESS) {
goto done;
}
/* Add the GPO GUID */
NULL);
if (lret != LDB_SUCCESS) {
goto done;
}
if (lret != LDB_SUCCESS) {
goto done;
}
/* Add the Version */
NULL);
if (lret != LDB_SUCCESS) {
goto done;
}
"%d", gpo_version);
if (lret != LDB_SUCCESS) {
goto done;
}
/* Add the Policy File Timeout */
if (lret != LDB_SUCCESS) {
goto done;
}
if (lret != LDB_SUCCESS) {
goto done;
}
if (lret != LDB_SUCCESS) {
"Failed to add GPO: [%s]\n",
ldb_strerror(lret));
goto done;
}
/* Update the existing GPO */
/* Add the Version */
NULL);
if (lret != LDB_SUCCESS) {
goto done;
}
"%d", gpo_version);
if (lret != LDB_SUCCESS) {
goto done;
}
/* Add the Policy File Timeout */
if (lret != LDB_SUCCESS) {
goto done;
}
if (lret != LDB_SUCCESS) {
goto done;
}
if (lret != LDB_SUCCESS) {
"Failed to modify GPO: [%s](%d)[%s]\n",
goto done;
}
} else {
goto done;
}
goto done;
}
in_transaction = false;
done:
if (in_transaction) {
}
}
return ret;
}
struct sss_domain_info *domain,
const char *gpo_guid,
struct ldb_result **_result)
{
int lret;
struct ldb_result *res;
const char *attrs[] = SYSDB_GPO_ATTRS;
if (!base_dn) {
goto done;
}
if (lret) {
"Could not locate GPO: [%s]\n",
ldb_strerror(lret));
goto done;
}
"one object.\n", gpo_guid);
goto done;
goto done;
}
done:
} else if (ret) {
}
return ret;
}
struct sss_domain_info *domain,
struct ldb_result **_result)
{
int lret;
struct ldb_result *res;
const char *attrs[] = SYSDB_GPO_ATTRS;
if (!base_dn) {
goto done;
}
if (lret) {
"Could not locate GPOs: [%s]\n",
ldb_strerror(lret));
goto done;
}
goto done;
}
done:
} else if (ret) {
}
return ret;
}
/* GPO Result */
static struct ldb_dn *
struct sss_domain_info *domain,
const char *result_name)
{
char *clean_result_name;
return NULL;
}
return dn;
}
const char *ini_key,
const char *ini_value)
{
int lret;
struct ldb_message *update_msg;
struct ldb_message **msgs;
bool in_transaction = false;
if (!update_msg) {
goto done;
}
if (!update_msg->dn) {
goto done;
}
goto done;
}
in_transaction = true;
/* Check for an existing GPO Result object */
/* Create new GPO Result object */
/* Add the objectClass */
NULL);
if (lret != LDB_SUCCESS) {
goto done;
}
if (lret != LDB_SUCCESS) {
goto done;
}
/* Store the policy_setting if it is non-NULL */
if (ini_value) {
NULL);
if (lret != LDB_SUCCESS) {
goto done;
}
if (lret != LDB_SUCCESS) {
goto done;
}
}
if (lret != LDB_SUCCESS) {
"Failed to add GPO Result: [%s]\n",
ldb_strerror(lret));
goto done;
}
/* Update existing GPO Result object*/
if (ini_value) {
/* Update the policy setting */
NULL);
if (lret != LDB_SUCCESS) {
goto done;
}
if (lret != LDB_SUCCESS) {
goto done;
}
} else {
/* If the value is NULL, we need to remove it from the cache */
/* Update the policy setting */
NULL);
if (lret != LDB_SUCCESS) {
goto done;
}
}
if (lret != LDB_SUCCESS) {
"Failed to modify GPO Result: [%s](%d)[%s]\n",
goto done;
}
} else {
goto done;
}
goto done;
}
in_transaction = false;
done:
if (in_transaction) {
}
}
return ret;
}
static errno_t
struct sss_domain_info *domain,
const char **attrs,
struct ldb_result **_result)
{
int lret;
struct ldb_result *res;
if (!base_dn) {
goto done;
}
if (lret) {
"Could not locate GPO Result object: [%s]\n",
ldb_strerror(lret));
goto done;
}
goto done;
}
done:
} else if (ret) {
}
return ret;
}
struct sss_domain_info *domain,
const char *ini_key,
const char **_ini_value)
{
struct ldb_result *res;
const char *ini_value;
goto done;
}
NULL);
if (!*_ini_value && ini_value) {
/* If ini_value was NULL, this is expected to also be NULL */
goto done;
}
done:
} else if (ret) {
}
return ret;
}
struct sss_domain_info *domain)
{
struct ldb_result *res;
bool in_transaction = false;
goto done;
}
in_transaction = true;
"Could not delete GPO result object: %d\n", ret);
goto done;
"Could not delete GPO Result cache entry\n");
goto done;
}
}
goto done;
}
in_transaction = false;
done:
if (in_transaction) {
}
}
return ret;
}