summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGünther Deschner <gdeschner@redhat.com>2013-04-12 15:45:00 +0200
committerGünther Deschner <gdeschner@redhat.com>2013-04-12 16:12:42 +0200
commita047d9ad6dd3cc16f593b388f1f4153ce056c6e8 (patch)
tree21b401bb07e5ac3c068428f85b03d1a47d74f6eb
parentc2c44d952663fd4cf83302021f06a7106e70baec (diff)
downloadgss-proxy-a047d9ad6dd3cc16f593b388f1f4153ce056c6e8.tar.gz
gss-proxy-a047d9ad6dd3cc16f593b388f1f4153ce056c6e8.tar.xz
gss-proxy-a047d9ad6dd3cc16f593b388f1f4153ce056c6e8.zip
Remove iniparser configuration backend.master-cred_store_config
-rw-r--r--proxy/Makefile.am2
-rw-r--r--proxy/configure.ac13
-rw-r--r--proxy/src/gp_config.c49
-rw-r--r--proxy/src/gp_config_iniparser.c136
-rw-r--r--proxy/src/gp_config_iniparser.h40
5 files changed, 1 insertions, 239 deletions
diff --git a/proxy/Makefile.am b/proxy/Makefile.am
index 05f64af..2ebf323 100644
--- a/proxy/Makefile.am
+++ b/proxy/Makefile.am
@@ -129,7 +129,6 @@ dist_noinst_HEADERS = \
src/gp_export.h \
src/gp_conv.h \
src/gp_config.h \
- src/gp_config_iniparser.h \
src/gp_config_dinglibs.h \
src/gp_debug.h \
src/gp_rpc_creds.h \
@@ -142,7 +141,6 @@ dist_noinst_HEADERS = \
gssproxy_SOURCES = \
src/gp_config.c \
- src/gp_config_iniparser.c \
src/gp_config_dinglibs.c \
src/gp_init.c \
src/gp_socket.c \
diff --git a/proxy/configure.ac b/proxy/configure.ac
index f605b65..420a4d1 100644
--- a/proxy/configure.ac
+++ b/proxy/configure.ac
@@ -82,14 +82,6 @@ if test x$have_libverto = x; then
AC_MSG_ERROR([Could not find VERTO headers])
fi
-#Check for iniparser
-have_iniparser=
-AC_CHECK_HEADERS([iniparser.h],
- [AC_CHECK_LIB(iniparser, iniparser_set, [ have_iniparser=1 ],
- [AC_MSG_ERROR([Iniparser library must support iniparser_set])])],
- [AC_MSG_WARN([Could not find Iniparser headers])]
-)
-
#Check for libini_config
PKG_CHECK_MODULES([LIBINI_CONFIG], [ini_config >= 1.0.0], [have_libini_config=1], [have_libini_config=])
if test x$have_libini_config = x; then
@@ -106,11 +98,8 @@ if test x$have_libini_config = x1; then
AC_DEFINE([WITH_DINGLIBS], [1], [Using ini_config])
INI_CFLAGS="$INI_CONFIG_CFLAGS"
INI_LIBS="$INI_CONFIG_LIBS"
-elif test x$have_iniparser = x1; then
- AC_DEFINE([WITH_INIPARSER], [1], [Using iniparser])
- INI_LIBS="-liniparser"
else
- AC_MSG_ERROR([Neither iniparser nor ini_config development packages available])
+ AC_MSG_ERROR([ini_config development packages available])
fi
AC_SUBST(INI_LIBS)
diff --git a/proxy/src/gp_config.c b/proxy/src/gp_config.c
index b9166dd..41adf0a 100644
--- a/proxy/src/gp_config.c
+++ b/proxy/src/gp_config.c
@@ -412,55 +412,6 @@ void free_config(struct gp_config **cfg)
*cfg = NULL;
}
-#ifdef WITH_INIPARSER
-#include "gp_config_iniparser.h"
-
-int gp_config_init(const char *config_file,
- struct gp_ini_context *ctx)
-{
- return gp_iniparser_init(config_file, ctx);
-}
-
-char *gp_config_get_string(struct gp_ini_context *ctx,
- const char *secname,
- const char *keyname)
-{
- return gp_iniparser_get_string(ctx, secname, keyname);
-}
-
-char **gp_config_get_string_array(struct gp_ini_context *ctx,
- const char *secname,
- const char *keyname,
- int *num_values)
-{
- return NULL;
-}
-
-int gp_config_get_int(struct gp_ini_context *ctx,
- const char *secname,
- const char *keyname)
-{
- return gp_iniparser_get_int(ctx, secname, keyname);
-}
-
-int gp_config_get_nsec(struct gp_ini_context *ctx)
-{
- return gp_iniparser_get_nsec(ctx);
-}
-
-char *gp_config_get_secname(struct gp_ini_context *ctx,
- int i)
-{
- return gp_iniparser_get_secname(ctx, i);
-}
-
-int gp_config_close(struct gp_ini_context *ctx)
-{
- return gp_iniparser_close(ctx);
-}
-
-#endif /* WITH_INIPARSER */
-
#ifdef WITH_DINGLIBS
#include "gp_config_dinglibs.h"
diff --git a/proxy/src/gp_config_iniparser.c b/proxy/src/gp_config_iniparser.c
deleted file mode 100644
index b0c4c1f..0000000
--- a/proxy/src/gp_config_iniparser.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- GSS-PROXY
-
- Copyright (C) 2011 Red Hat, Inc.
- Copyright (C) 2011 Simo Sorce <simo.sorce@redhat.com>
- Copyright (C) 2012 Guenther Deschner <guenther.deschner@redhat.com>
-
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the "Software"),
- to deal in the Software without restriction, including without limitation
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THE SOFTWARE.
-*/
-
-#include "config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include "gp_proxy.h"
-#include "gp_config.h"
-#include "gp_config_iniparser.h"
-
-#ifdef WITH_INIPARSER
-
-#include <iniparser.h>
-
-char *gp_iniparser_get_string(struct gp_ini_context *ctx,
- const char *secname,
- const char *key)
-{
- dictionary *dict;
- char *skey;
- char *value;
- int ret;
-
- dict = (dictionary *)ctx->private_data;
-
- ret = asprintf(&skey, "%s:%s", secname, key);
- if (ret == -1) {
- return NULL;
- }
-
- value = iniparser_getstring(dict, skey, NULL);
- free(skey);
- return value;
-}
-
-int gp_iniparser_get_int(struct gp_ini_context *ctx,
- const char *secname,
- const char *key)
-{
- dictionary *dict;
- char *skey;
- int ret;
-
- dict = (dictionary *)ctx->private_data;
-
- ret = asprintf(&skey, "%s:%s", secname, key);
- if (ret == -1) {
- return -1;
- }
-
- ret = iniparser_getint(dict, skey, -1);
- free(skey);
- return ret;
-}
-
-int gp_iniparser_init(const char *config_file,
- struct gp_ini_context *ctx)
-{
- dictionary *d;
-
- if (!ctx) {
- return EINVAL;
- }
-
- d = iniparser_load(config_file);
- if (!d) {
- return ENOENT;
- }
-
- ctx->private_data = d;
-
- return 0;
-}
-
-int gp_iniparser_close(struct gp_ini_context *ctx)
-{
- dictionary *dict;
-
- if (!ctx) {
- return 0;
- }
-
- dict = (dictionary *)ctx->private_data;
-
- iniparser_freedict(dict);
-
- return 0;
-}
-
-int gp_iniparser_get_nsec(struct gp_ini_context *ctx)
-{
- dictionary *dict = dict = (dictionary *)ctx->private_data;
-
- return iniparser_getnsec(dict);
-}
-
-char *gp_iniparser_get_secname(struct gp_ini_context *ctx,
- int i)
-{
- dictionary *dict = dict = (dictionary *)ctx->private_data;
- char *value;
-
- value = iniparser_getsecname(dict, i);
- if (!value) {
- return NULL;
- }
-
- return strdup(value);
-}
-
-#endif /* WITH_INIPARSER */
diff --git a/proxy/src/gp_config_iniparser.h b/proxy/src/gp_config_iniparser.h
deleted file mode 100644
index b68a3fc..0000000
--- a/proxy/src/gp_config_iniparser.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- GSS-PROXY
-
- Copyright (C) 2011 Red Hat, Inc.
- Copyright (C) 2011 Simo Sorce <simo.sorce@redhat.com>
- Copyright (C) 2012 Guenther Deschner <guenther.deschner@redhat.com>
-
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the "Software"),
- to deal in the Software without restriction, including without limitation
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THE SOFTWARE.
-*/
-
-#include "gp_config.h"
-
-char *gp_iniparser_get_string(struct gp_ini_context *ctx,
- const char *secname,
- const char *key);
-int gp_iniparser_get_int(struct gp_ini_context *ctx,
- const char *secname,
- const char *key);
-int gp_iniparser_init(const char *config_file,
- struct gp_ini_context *ctx);
-int gp_iniparser_close(struct gp_ini_context *ctx);
-int gp_iniparser_get_nsec(struct gp_ini_context *ctx);
-char *gp_iniparser_get_secname(struct gp_ini_context *ctx,
- int i);