krb5_common.c revision f520e7a2f4fe29747f25118621e20b0d89d296fc
/*
SSSD
Kerberos Provider Common Functions
Authors:
Sumit Bose <sbose@redhat.com>
Copyright (C) 2008-2009 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 <unistd.h>
#include <netdb.h>
#include <ctype.h>
#include "providers/dp_backend.h"
#include "providers/krb5/krb5_common.h"
struct dp_option default_krb5_opts[] = {
};
struct sss_domain_info *dom)
{
int ret;
const char *realm;
const char *dummy;
return ret;
}
}
}
}
"using the KDC or defaults.\n"));
}
return EINVAL;
}
"and krb5ccname_template must start with '/' or 'FILE:'\n"));
return EINVAL;
}
return EOK;
}
{
int ret;
return ENOMEM;
}
goto done;
}
done:
}
return ret;
}
const char *service)
{
int ret;
int fd = -1;
char *krb5info_name = NULL;
int server_len;
return EINVAL;
}
} else {
return EINVAL;
}
return ENOMEM;
}
goto done;
}
if (krb5info_name == NULL) {
goto done;
}
if (fd == -1) {
goto done;
}
written = 0;
while (written < server_len) {
if (ret == -1) {
continue;
}
goto done;
}
else {
}
}
if (written != server_len) {
written, server_len));
goto done;
}
if (ret == -1) {
goto done;
}
if (ret == -1) {
goto done;
}
if (ret == -1) {
goto done;
}
done:
return ret;
}
{
struct krb5_service *krb5_service;
char *address;
int ret;
if (!krb5_service) {
return;
}
if (!srvaddr) {
return;
}
return;
}
return;
}
return;
}
krb5_service->name);
}
return;
}
const char *service_name, const char *servers,
{
struct krb5_service *service;
int ret;
int i;
char *port_str;
long port;
char *server_spec;
char *endptr;
if (!tmp_ctx) {
return ENOMEM;
}
if (!service) {
goto done;
}
goto done;
}
goto done;
}
goto done;
}
if (!servers) {
}
goto done;
}
for (i = 0; list[i]; i++) {
if (!server_spec) {
goto done;
}
if (be_fo_is_srv_identifier(server_spec)) {
if (ret) {
DEBUG(0, ("Failed to add server\n"));
goto done;
}
continue;
}
port = 0;
} else {
*port_str = '\0';
++port_str;
errno = 0;
if (errno != 0) {
goto done;
}
if (*endptr != '\0') {
goto done;
}
goto done;
}
port_str));
goto done;
}
} else {
goto done;
}
}
list[i]);
DEBUG(0, ("Failed to add server\n"));
goto done;
}
}
goto done;
}
done:
}
return ret;
}
{
int ret;
char *file;
return ENOMEM;
}
errno = 0;
if (ret == -1) {
}
return ENOMEM;
}
errno = 0;
if (ret == -1) {
}
return EOK;
}
void remove_krb5_info_files_callback(void *pvt)
{
int ret;
struct remove_info_files_ctx);
"krb5 info files will not be removed, because "
"it is unclear if they will be recreated properly.\n"));
return;
}
"krb5 info files will not be removed, because "
"it is unclear if they will be recreated properly.\n"));
return;
}
}
return;
}
}
}
struct tevent_signal *se,
int signum,
int count,
void *siginfo,
void *private_data)
{
char *realm = (char *)private_data;
int ret;
}
}
{
int ret;
struct remove_info_files_ctx *ctx;
const char *krb5_realm;
return EINVAL;
}
return ENOMEM;
}
if (krb5_realm == NULL) {
goto done;
}
goto done;
}
} else {
}
NULL);
goto done;
}
done:
}
return ret;
}
{
const char *krb5_realm;
char *sig_realm;
struct tevent_signal *sige;
BlockSignals(false, SIGTERM);
if (krb5_realm == NULL) {
return EINVAL;
}
return ENOMEM;
}
return ENOMEM;
}
return EOK;
}