sysdb_gpo.c revision eb0cde4e6dfdbda08588860534f7ece5776ec3af
/*
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) {
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;
}
static inline bool
{
size_t i;
for (i = 0; i < num_gpos; i++) {
break;
}
}
return (i < num_gpos) ? true : false;
}
struct sss_domain_info *domain,
const char **gpo_guid_list,
int num_gpos)
{
struct ldb_result *res;
int i;
bool in_transaction = false;
const char *cached_gpo_guid;
bool stale_gpo_found = false;
goto done;
}
in_transaction = true;
goto done;
NULL);
if (cached_gpo_guid == NULL) {
"No gpo_guid attribute found in gpo cache entry\n");
goto done;
}
/* the cached_gpo_guid is still applicable, skip it */
continue;
} else {
stale_gpo_found = true;
/* the cached_gpo_guid is no longer applicable, delete it */
"Could not delete GPO cache entry [gpo_guid:%s]\n",
goto done;
}
}
}
}
if (!stale_gpo_found) {
}
goto done;
}
in_transaction = false;
done:
if (in_transaction) {
}
}
return ret;
}