ipa_sudo.c revision a641a13889d617aca6bd998025e9087e822ff7f0
/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2015 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 "providers/ipa/ipa_opts.h"
#include "providers/ipa/ipa_common.h"
#include "providers/ldap/sdap_sudo.h"
#include "providers/ipa/ipa_sudo.h"
#include "db/sysdb_sudo.h"
struct bet_ops ipa_sudo_ops = {
};
enum sudo_schema {
};
static errno_t
enum sudo_schema *_schema)
{
char *ipa_search_base;
char *search_base;
char *basedn;
return ENOMEM;
}
IPA_KRB5_REALM), &basedn);
goto done;
}
if (ipa_search_base == NULL) {
goto done;
}
if (search_base == NULL) {
goto done;
}
}
/* Use IPA schema only if search base is cn=sudo,$dc. */
} else {
}
done:
return ret;
}
static int
struct ipa_id_ctx *id_ctx,
void **pvt_data)
{
struct ipa_sudo_ctx *sudo_ctx;
return ENOMEM;
}
&sudo_ctx->sudorule_map);
goto done;
}
goto done;
}
&sudo_ctx->sudocmd_map);
goto done;
}
return ret;
}
goto done;
}
*ops = &ipa_sudo_ops;
done:
}
return ret;
}
struct ipa_id_ctx *id_ctx,
void **pvt_data)
{
enum sudo_schema schema;
&schema);
return ret;
}
switch (schema) {
case SUDO_SCHEMA_IPA:
break;
case SUDO_SCHEMA_LDAP:
break;
}
return ret;
}
return EOK;
}
static void
{
struct be_sudo_req *sudo_req;
int dp_error;
int ret;
case BE_REQ_SUDO_FULL:
break;
default:
ret = ERR_INTERNAL;
break;
}
}
static void
{
struct ipa_sudo_ctx *sudo_ctx;
struct be_sudo_req *sudo_req;
struct tevent_req *req;
int ret;
if (be_is_offline(be_ctx)) {
return;
}
struct ipa_sudo_ctx);
case BE_REQ_SUDO_FULL:
break;
default:
goto fail;
}
goto fail;
}
return;
fail:
}