#include "hcconn_ssl.h"
#include "tcp_connect.h"
+#include "usermap.h"
+
#define CONFFILE SYSCONFDIR "/popproxy.conf"
struct pop_address
int server_ssl;
gchar *certfile;
gchar *ssl_keyfile;
+ gchar *policy;
struct pop_address pop_address;
gnutls_global_init ();
g_error_free (error);
}
+ error = NULL;
+ policy = g_key_file_get_string (keyfile, "global", "policy",
+ &error);
+ if (policy == NULL && error != NULL)
+ {
+ policy = g_strdup ("deny");
+ g_error_free (error);
+ }
+
+ if (!strcmp (policy, "allow"))
+ ACCESS_DEFAULT = ACCESS_ALLOW;
+ g_free (policy);
+
pop_address.server = server_address;
pop_address.port = server_port;
pop_log_init ();
g_message ("Listening at %s:%s.", conf_address, port);
+ if (ACCESS_DEFAULT == ACCESS_ALLOW)
+ g_message ("Authorizing users by default.");
if (!foreground)
daemon (0, 0);