summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Briesenick <sbriesen@gentoo.org>2006-02-10 21:00:04 +0000
committerStefan Briesenick <sbriesen@gentoo.org>2006-02-10 21:00:04 +0000
commita6d9a23f28ed25b69458f7aaa96336ff7c9d1380 (patch)
treef7822ed41bf5eaf4c1f5914c017f3301f7a584f7 /net-dns/ez-ipupdate/files
parentmodular-x-ified (diff)
downloadhistorical-a6d9a23f28ed25b69458f7aaa96336ff7c9d1380.tar.gz
historical-a6d9a23f28ed25b69458f7aaa96336ff7c9d1380.tar.bz2
historical-a6d9a23f28ed25b69458f7aaa96336ff7c9d1380.zip
bumped debian patches to revision 10, added dnsexit patch (see bug #116439).
Package-Manager: portage-2.1_pre4-r1
Diffstat (limited to 'net-dns/ez-ipupdate/files')
-rw-r--r--net-dns/ez-ipupdate/files/digest-ez-ipupdate-3.0.11_beta8-r36
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11_beta8-dnsexit.diff262
2 files changed, 268 insertions, 0 deletions
diff --git a/net-dns/ez-ipupdate/files/digest-ez-ipupdate-3.0.11_beta8-r3 b/net-dns/ez-ipupdate/files/digest-ez-ipupdate-3.0.11_beta8-r3
new file mode 100644
index 000000000000..b920684a0dc0
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/digest-ez-ipupdate-3.0.11_beta8-r3
@@ -0,0 +1,6 @@
+MD5 e400c9c8d594922e394806b717250c35 ez-ipupdate_3.0.11b8-10.diff.gz 58420
+RMD160 916da2553c2901bae62de43a09ee4ad9da492c95 ez-ipupdate_3.0.11b8-10.diff.gz 58420
+SHA256 a380abc3173ef49be5cf8600278e1bc941b4503129dd9e682707bb79e1538175 ez-ipupdate_3.0.11b8-10.diff.gz 58420
+MD5 000211add4c4845ffa4211841bff4fb0 ez-ipupdate_3.0.11b8.orig.tar.gz 81975
+RMD160 f193969c5d3c9faa1b6fec41d530557614d62c55 ez-ipupdate_3.0.11b8.orig.tar.gz 81975
+SHA256 9da694439049d225b49e9c7087c515d71256827c75c6c4ac0aa56f8e8b4ffc43 ez-ipupdate_3.0.11b8.orig.tar.gz 81975
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11_beta8-dnsexit.diff b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11_beta8-dnsexit.diff
new file mode 100644
index 000000000000..9991693f6581
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11_beta8-dnsexit.diff
@@ -0,0 +1,262 @@
+diff -Naur ez-ipupdate-3.0.11b8-patched/example-dnsexit.conf ez-ipupdate-3.0.11b8-dnsexit/example-dnsexit.conf
+--- example-dnsexit.conf.orig 1970-01-01 01:00:00.000000000 +0100
++++ example-dnsexit.conf 2005-12-23 01:34:51.000000000 +0000
+@@ -0,0 +1,19 @@
++#!/usr/sbin/ez-ipupdate -c
++#
++# example config file for ez-ipupdate
++#
++# this file is actually executable!
++#
++
++service-type=dnsexit
++user=loginname:password
++host=www.yourdomain.com
++interface=eth1
++
++run-as-user=ez-ipupd
++cache-file=/var/cache/ez-ipupdate/default-cache
++
++# uncomment this once you have everything working how you want and you are
++# ready to have ez-ipupdate running in the background all the time. to stop it
++# you can use "killall -QUIT ez-ipupdate" under linux.
++#daemon
+diff -Naur ez-ipupdate-3.0.11b8-patched/ez-ipupdate.c ez-ipupdate-3.0.11b8-dnsexit/ez-ipupdate.c
+--- ez-ipupdate.c.orig 2005-12-23 01:33:54.000000000 +0000
++++ ez-ipupdate.c 2005-12-23 02:51:19.000000000 +0000
+@@ -103,6 +103,10 @@
+ #define HEIPV6TB_DEFAULT_PORT "80"
+ #define HEIPV6TB_REQUEST "/index.cgi"
+
++#define DNSEXIT_DEFAULT_SERVER "www.dnsexit.com"
++#define DNSEXIT_DEFAULT_PORT "80"
++#define DNSEXIT_REQUEST "/RemoteUpdate.sv"
++
+ #define DEFAULT_TIMEOUT 120
+ #define DEFAULT_UPDATE_PERIOD 120
+ #define DEFAULT_RESOLV_PERIOD 30
+@@ -344,6 +348,11 @@
+ int HEIPV6TB_check_info(void);
+ static char *HEIPV6TB_fields_used[] = { "server", "user", NULL };
+
++int DNSEXIT_update_entry(void);
++int DNSEXIT_check_info(void);
++static char *DNSEXIT_fields_used[] = { "server", "user", "address", "wildcard", "mx", "host", NULL };
++
++
+ struct service_t services[] = {
+ { "NULL",
+ { "null", "NULL", 0, },
+@@ -517,6 +526,16 @@
+ HEIPV6TB_DEFAULT_PORT,
+ HEIPV6TB_REQUEST
+ },
++ { "dnsexit",
++ { "dnsexit", 0, 0, },
++ NULL,
++ DNSEXIT_update_entry,
++ DNSEXIT_check_info,
++ DNSEXIT_fields_used,
++ DNSEXIT_DEFAULT_SERVER,
++ DNSEXIT_DEFAULT_PORT,
++ DNSEXIT_REQUEST
++ },
+ };
+
+ static struct service_t *service = NULL;
+@@ -4251,6 +4270,195 @@
+ return(UPDATERES_OK);
+ }
+
++int DNSEXIT_check_info(void)
++{
++ char buf[BUFSIZ+1];
++
++ if((host == NULL) || (*host == '\0'))
++ {
++ if(options & OPT_DAEMON)
++ {
++ return(-1);
++ }
++ if(host) { free(host); }
++ printf("host: ");
++ *buf = '\0';
++ fgets(buf, BUFSIZ, stdin);
++ host = strdup(buf);
++ chomp(host);
++ }
++
++ if(interface == NULL && address == NULL)
++ {
++ if(options & OPT_DAEMON)
++ {
++ fprintf(stderr, "you must provide either an interface or an address\n");
++ return(-1);
++ }
++ if(interface) { free(interface); }
++ printf("interface: ");
++ *buf = '\0';
++ fgets(buf, BUFSIZ, stdin);
++ chomp(buf);
++ option_handler(CMD_interface, buf);
++ }
++
++ warn_fields(service->fields_used);
++
++ return 0;
++}
++
++int DNSEXIT_update_entry(void)
++{
++ char buf[BUFFER_SIZE+1];
++ char *bp = buf;
++ int bytes;
++ int btot;
++ int ret;
++
++ buf[BUFFER_SIZE] = '\0';
++
++ if(do_connect((int*)&client_sockfd, server, port) != 0)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ show_message("error connecting to %s:%s\n", server, port);
++ }
++ return(UPDATERES_ERROR);
++ }
++
++ snprintf(buf, BUFFER_SIZE, "GET %s?action=edit&", request);
++ output(buf);
++ if(address != NULL && *address != '\0')
++ {
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "myip", address);
++ output(buf);
++ }
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "wildcard", wildcard ? "ON" : "OFF");
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "mx", mx);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "backmx", *mx == '\0' ? "NO" : "YES");
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "host", host);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "login", user_name);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "password", password);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, " HTTP/1.0\015\012");
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "Authorization: Basic %s\015\012", auth);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "User-Agent: %s-%s %s [%s] (%s)\015\012",
++ "ez-update", VERSION, OS, (options & OPT_DAEMON) ? "daemon" : "", "by Angus Mackay");
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "Host: %s\015\012", server);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "\015\012");
++ output(buf);
++
++ bp = buf;
++ bytes = 0;
++ btot = 0;
++ while((bytes=read_input(bp, BUFFER_SIZE-btot)) > 0)
++ {
++ bp += bytes;
++ btot += bytes;
++ dprintf((stderr, "btot: %d\n", btot));
++ }
++ close(client_sockfd);
++ buf[btot] = '\0';
++
++ dprintf((stderr, "server output: %s\n", buf));
++
++ if(sscanf(buf, " HTTP/1.%*c %3d", &ret) != 1)
++ {
++ ret = -1;
++ }
++
++ switch(ret)
++ {
++ case -1:
++ if(!(options & OPT_QUIET))
++ {
++ show_message("strange server response, are you connecting to the right server?\n");
++ }
++ return(UPDATERES_ERROR);
++ break;
++
++ case 200:
++
++ if(strstr(buf, "0=Success") != NULL)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ printf("Request successful\n");
++ }
++ }
++ else if(strstr(buf, "1=IP is the same as the IP on the system") != NULL)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ printf("Request successful but the IP is the same as previous update\n");
++ }
++ }
++ else if(strstr(buf, "2=Invalid passwords") != NULL)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ printf("Invalid Password\n");
++ }
++ }
++ else if(strstr(buf, "3=User not found") != NULL)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ printf("Username not found\n");
++ }
++ }
++ else if(strstr(buf, "4=Update too often") != NULL)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ printf("Updatting too often\n");
++ }
++ }
++ else
++ {
++ show_message("Errors return from server\n");
++ if(!(options & OPT_QUIET))
++ {
++ fprintf(stderr, "server output: %s\n", buf);
++ }
++ return(UPDATERES_ERROR);
++ }
++ break;
++
++ case 401:
++ if(!(options & OPT_QUIET))
++ {
++ show_message("authentication failure\n");
++ }
++ return(UPDATERES_SHUTDOWN);
++ break;
++
++ default:
++ if(!(options & OPT_QUIET))
++ {
++ // reuse the auth buffer
++ *auth = '\0';
++ sscanf(buf, " HTTP/1.%*c %*3d %255[^\r\n]", auth);
++ show_message("unknown return code: %d\n", ret);
++ show_message("server response: %s\n", auth);
++ }
++ return(UPDATERES_ERROR);
++ break;
++ }
++
++ return(UPDATERES_OK);
++}
++
+ static int is_in_list(char *needle, char **haystack)
+ {
+ char **p;