sdap_sudo.c revision cb235ec146f1ba81c211f8506736edea436be28a
/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2011 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 <errno.h>
#include <string.h>
#include <tevent.h>
#include "providers/dp_backend.h"
#include "providers/ldap/ldap_common.h"
#include "providers/ldap/sdap_async.h"
#include "providers/ldap/sdap_sudo.h"
#include "providers/ldap/sdap_sudo_cache.h"
#include "db/sysdb_sudo.h"
static void
{
}
struct bet_ops sdap_sudo_ops = {
};
static void sdap_sudo_online_cb(void *pvt)
{
struct sdap_sudo_ctx *sudo_ctx;
return;
}
"be renewed on next refresh.\n");
sudo_ctx->run_hostinfo = true;
}
struct sdap_id_ctx *id_ctx,
void **pvt_data)
{
int ret;
return ENOMEM;
}
*ops = &sdap_sudo_ops;
/* we didn't do any full refresh now,
* so we don't have current usn values available */
sudo_ctx->full_refresh_done = false;
goto done;
}
if (sudo_ctx->use_host_filter) {
goto done;
}
/* Obtain hostinfo with the first refresh. */
sudo_ctx->run_hostinfo = true;
}
"Unable to setup periodical refresh of sudo rules [%d]: %s\n",
/* periodical updates will not work, but specific-rule update
* is no affected by this, therefore we don't have to fail here */
}
done:
}
return ret;
}
{
int dp_error;
bool deleted;
int ret;
case BE_REQ_SUDO_FULL:
break;
case BE_REQ_SUDO_RULES:
}
break;
default:
ret = ERR_INTERNAL;
break;
}
}
{
if (be_is_offline(be_ctx)) {
return;
}
struct sdap_sudo_ctx);
case BE_REQ_SUDO_FULL:
break;
case BE_REQ_SUDO_RULES:
break;
default:
goto fail;
}
goto fail;
}
return;
fail:
}