Commit eebb340a authored by Karl Heyes's avatar Karl Heyes

merge URL listener auth

svn path=/icecast/trunk/icecast/; revision=9714
parent 15b3a5f8
......@@ -106,24 +106,27 @@ XIPH_VAR_APPEND([XIPH_CFLAGS],[$PTHREAD_CFLAGS])
XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$PTHREAD_CPPFLAGS])
XIPH_VAR_PREPEND([XIPH_LIBS],[$PTHREAD_LIBS])
dnl -- YP support --
AC_ARG_ENABLE([yp],
AC_HELP_STRING([--disable-yp],[disable YP directory support]),
enable_yp="$enableval",
enable_yp="yes")
if test "x$enable_yp" = "xyes"
then
XIPH_PATH_CURL([
AC_CHECK_DECL([CURLOPT_NOSIGNAL],
[ AC_DEFINE([USE_YP], 1, [Define to compile in YP support code])
ICECAST_OPTIONAL="$ICECAST_OPTIONAL yp.o"
[ AC_DEFINE([HAVE_AUTH_URL], 1, [Define to compile in auth URL support code])
ICECAST_OPTIONAL="$ICECAST_OPTIONAL auth_url.o"
enable_curl="yes"
XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$CURL_CFLAGS])
XIPH_VAR_PREPEND([XIPH_LIBS],[$CURL_LIBS])
], [ AC_MSG_NOTICE([Your curl dev files are too old (7.10 or above required), YP disabled])
], [#include <curl/curl.h>
])
],[ AC_MSG_NOTICE([libcurl not found, YP disabled])
],[ AC_MSG_NOTICE([libcurl not found])
])
dnl -- YP support --
AC_ARG_ENABLE([yp],
AC_HELP_STRING([--disable-yp],[disable YP directory support]),
enable_yp="$enableval",
enable_yp="yes")
if test "x$enable_yp" = "xyes" -a "x$enable_curl" = xyes
then
AC_DEFINE([USE_YP], 1, [Define to compile in YP support code])
ICECAST_OPTIONAL="$ICECAST_OPTIONAL yp.o"
else
AC_MSG_NOTICE([YP support disabled])
fi
......
......@@ -9,7 +9,7 @@ bin_PROGRAMS = icecast
noinst_HEADERS = admin.h cfgfile.h os.h logging.h sighandler.h connection.h \
global.h util.h slave.h source.h stats.h refbuf.h client.h \
compat.h fserve.h xslt.h yp.h event.h md5.h \
auth.h auth_htpasswd.h \
auth.h auth_htpasswd.h auth_url.h \
format.h format_ogg.h format_mp3.h \
format_vorbis.h format_theora.h format_flac.h format_speex.h format_midi.h
icecast_SOURCES = cfgfile.c main.c logging.c sighandler.c connection.c global.c \
......@@ -18,6 +18,7 @@ icecast_SOURCES = cfgfile.c main.c logging.c sighandler.c connection.c global.c
format.c format_ogg.c format_mp3.c format_midi.c format_flac.c \
auth.c auth_htpasswd.c
EXTRA_icecast_SOURCES = yp.c \
auth_url.c \
format_vorbis.c format_theora.c format_speex.c
icecast_DEPENDENCIES = @ICECAST_OPTIONAL@ net/libicenet.la thread/libicethread.la \
......
......@@ -25,6 +25,7 @@
#include "auth.h"
#include "auth_htpasswd.h"
#include "auth_url.h"
#include "source.h"
#include "client.h"
#include "cfgfile.h"
......@@ -423,6 +424,13 @@ static void get_authenticator (auth_t *auth, config_options_t *options)
do
{
DEBUG1 ("type is %s", auth->type);
#ifdef HAVE_AUTH_URL
if (strcmp (auth->type, "url") == 0)
{
auth_get_url_auth (auth, options);
break;
}
#endif
if (strcmp (auth->type, "htpasswd") == 0)
{
auth_get_htpasswd_auth (auth, options);
......
This diff is collapsed.
/* Icecast
*
* This program is distributed under the GNU General Public License, version 2.
* A copy of this license is included with this source.
*
* Copyright 2000-2004, Jack Moffitt <jack@xiph.org,
* Michael Smith <msmith@xiph.org>,
* oddsock <oddsock@xiph.org>,
* Karl Heyes <karl@xiph.org>
* and others (see AUTHORS for details).
*/
#ifndef __AUTH_URL_H__
#define __AUTH_URL_H__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
int *auth_get_url_auth (auth_t *authenticator, config_options_t *options);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment