Displaying 4 results from an estimated 4 matches for "net_getsockname".
2007 Nov 14
1
libwrap-ing IMAP and POP logins
...eturn;
}
+#ifdef LIBWRAP
+ strlcat(daemon, login_protocol, sizeof(daemon));
+ request_init(&req, RQ_DAEMON, daemon, RQ_FILE, fd, NULL);
+ fromhost(&req);
+ if (!hosts_access(&req)) {
+ i_info("libwrap: access denied");
+ net_disconnect(fd);
+ return;
+ }
+#endif
+
if (net_getsockname(fd, &local_ip, &local_port) < 0) {
memset(&local_ip, 0, sizeof(local_ip));
local_port = 0;
@@ -99,6 +121,10 @@
struct client *client;
struct ssl_proxy *proxy;
int fd, fd_ssl;
+#ifdef LIBWRAP
+ struct request_info req;
+ char daemon[17] = "dovecot-";
+#endif...
2003 Nov 04
0
PATCH: make local IP address available to auth modules
The attached patch makes the local IP address to which the client
connected available to the authentication modules; i.e., the local IP
address is available for substitution as %i for the mysql and pgsql
modules. We needed this feature to support thousands of our legacy
accounts which are authenticated by username/local_part (not the full
email address) and IP address (one per domain).
Timo,
2008 Nov 07
6
Cannot get the libwrap patch work
Hello there,
I have been trying to make the patch work for libwrap(TCP
Wrappers) posted on http://dovecot.org/patches
<http://dovecot.org/patches%20Patch%20of%201.1> Patch of 1.1 but could not
get it work. Any help will be highly appreciated. After compiling and
running it I get error "Error: login_tcp_wrappers can't be used because
Dovecot wasn't built with
2008 Nov 08
1
dovecot Digest, Vol 67, Issue 19
...ed();
+ }
+ if (ssl) {
+ str_free(&process_name_ssl);
+ }
+#endif
+}
+
static void login_accept(void *context)
{
int listen_fd = POINTER_CAST_TO(context, int);
@@ -89,6 +136,7 @@
i_error("accept() failed: %m");
return;
}
+ access_check(fd, &remote_ip, FALSE);
if (net_getsockname(fd, &local_ip, &local_port) < 0) {
memset(&local_ip, 0, sizeof(local_ip));
@@ -120,6 +168,7 @@
i_error("accept() failed: %m");
return;
}
+ access_check(fd, &remote_ip, TRUE);
if (net_getsockname(fd, &local_ip, &local_port) < 0) {
memset(&am...