ez-ipupdate-3.0.11b8/ 777 764 764 0 7647563644 7377 5ez-ipupdate-3.0.11b8/Makefile.in 664 764 764 22516 7647563643 11467 # Makefile.in generated automatically by automake 1.3 from Makefile.am # Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = /bin/sh srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DISTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ CC = @CC@ CPP = @CPP@ EXTRAOBJ = @EXTRAOBJ@ EXTRASRC = @EXTRASRC@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ bin_PROGRAMS = ez-ipupdate ez_ipupdate_SOURCES = ez-ipupdate.c conf_file.c conf_file.h md5.c md5.h cache_file.c cache_file.h error.h pid_file.c pid_file.h dprintf.h @EXTRASRC@ ez_ipupdate_LDADD = @EXTRAOBJ@ EXTRA_DIST = getpass.c ez-ipupdate.lsm example.conf example-pgpow.conf example-dhs.conf example-dyndns.conf example-ods.conf example-tzo.conf example-gnudip.conf example-easydns.conf example-justlinux.conf example-dyns.conf CHANGELOG mkbinary example-heipv6tb.conf AUTOMAKE_OPTIONS=foreign ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = PROGRAMS = $(bin_PROGRAMS) DEFS = @DEFS@ -I. -I$(srcdir) -I. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ ez_ipupdate_OBJECTS = ez-ipupdate.o conf_file.o md5.o cache_file.o \ pid_file.o ez_ipupdate_DEPENDENCIES = ez_ipupdate_LDFLAGS = CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = README COPYING INSTALL Makefile.am Makefile.in acconfig.h \ aclocal.m4 config.guess config.h.in config.sub configure configure.in \ install-sh missing mkinstalldirs stamp-h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP = --best SOURCES = $(ez_ipupdate_SOURCES) OBJECTS = $(ez_ipupdate_OBJECTS) all: Makefile $(PROGRAMS) config.h .SUFFIXES: .SUFFIXES: .S .c .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status $(ACLOCAL_M4): configure.in cd $(srcdir) && $(ACLOCAL) config.status: $(srcdir)/configure $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) config.h: stamp-h @: stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=config.h \ $(SHELL) ./config.status @echo timestamp > stamp-h $(srcdir)/config.h.in: $(srcdir)/stamp-h.in $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h cd $(top_srcdir) && $(AUTOHEADER) @echo timestamp > $(srcdir)/stamp-h.in mostlyclean-hdr: clean-hdr: distclean-hdr: -rm -f config.h maintainer-clean-hdr: mostlyclean-binPROGRAMS: clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) distclean-binPROGRAMS: maintainer-clean-binPROGRAMS: install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) list='$(bin_PROGRAMS)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ done .c.o: $(COMPILE) -c $< .s.o: $(COMPILE) -c $< .S.o: $(COMPILE) -c $< mostlyclean-compile: -rm -f *.o core *.core clean-compile: distclean-compile: -rm -f *.tab.c maintainer-clean-compile: ez-ipupdate: $(ez_ipupdate_OBJECTS) $(ez_ipupdate_DEPENDENCIES) @rm -f ez-ipupdate $(LINK) $(ez_ipupdate_LDFLAGS) $(ez_ipupdate_OBJECTS) $(ez_ipupdate_LDADD) $(LIBS) tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP) TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist -rm -rf $(distdir) GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz mkdir $(distdir)/=build mkdir $(distdir)/=inst dc_install_base=`cd $(distdir)/=inst && pwd`; \ cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix=$$dc_install_base \ && $(MAKE) \ && $(MAKE) dvi \ && $(MAKE) check \ && $(MAKE) install \ && $(MAKE) installcheck \ && $(MAKE) dist -rm -rf $(distdir) @echo "========================"; \ echo "$(distdir).tar.gz is ready for distribution"; \ echo "========================" dist: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) dist-all: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) distdir: $(DISTFILES) -rm -rf $(distdir) mkdir $(distdir) -chmod 777 $(distdir) @for file in $(DISTFILES); do \ d=$(srcdir); \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file; \ done cache_file.o: cache_file.c config.h cache_file.h conf_file.o: conf_file.c config.h conf_file.h ez-ipupdate.o: ez-ipupdate.c config.h error.h md5.h dprintf.h \ conf_file.h cache_file.h pid_file.h md5.o: md5.c config.h md5.h pid_file.o: pid_file.c config.h error.h dprintf.h info: dvi: check: all $(MAKE) installcheck: install-exec: install-binPROGRAMS @$(NORMAL_INSTALL) install-data: @$(NORMAL_INSTALL) install: install-exec install-data all @: uninstall: uninstall-binPROGRAMS install-strip: $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install installdirs: $(mkinstalldirs) $(DATADIR)$(bindir) mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f Makefile $(DISTCLEANFILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) mostlyclean: mostlyclean-hdr mostlyclean-binPROGRAMS \ mostlyclean-compile mostlyclean-tags \ mostlyclean-generic clean: clean-hdr clean-binPROGRAMS clean-compile clean-tags \ clean-generic mostlyclean distclean: distclean-hdr distclean-binPROGRAMS distclean-compile \ distclean-tags distclean-generic clean -rm -f config.status maintainer-clean: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ maintainer-clean-compile maintainer-clean-tags \ maintainer-clean-generic distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." -rm -f config.status .PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile tags mostlyclean-tags distclean-tags \ clean-tags maintainer-clean-tags distdir info dvi installcheck \ install-exec install-data install uninstall all installdirs \ mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ez-ipupdate-3.0.11b8/README 644 764 764 1717 7205604721 10237 "ez-ipupdate" Ez-ipupdate is a client for the dynamic IP service offered by http://www.ez-ip.net. It has several options and is quite complete. It is written in pure C and supports a daemon mode (Linux only right now). This program has been tested under Linux and Solaris. See the file INSTALL for compilation and installation instructions. For more info check "http://www.gusnet.cx/proj/ez-ipupdate" For user contributed documentation check "http://www.gusnet.cx/proj/ez-ipupdate/userdoc.php" When setting it up please try to use daemon mode WITH A CACHE FILE! This will be much apreciated by all the people offering dynamic DNS services. INCOMPATIBILITIES -With version 3.0.0 you must specify a service-type (no more default to ez-ip.net) and you must specify an interface (no more default to eth0) -With version 2.9.2 the justlinux service became the name of the justlinux v2.0 service and pgpow is still the same old justlinux v1.0 service. Angus Mackay ez-ipupdate-3.0.11b8/COPYING 644 764 764 43114 7143731074 10432 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ez-ipupdate-3.0.11b8/INSTALL 644 764 764 17230 7143731074 10430 Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. ez-ipupdate-3.0.11b8/Makefile.am 644 764 764 764 7321676347 11410 bin_PROGRAMS = ez-ipupdate ez_ipupdate_SOURCES = ez-ipupdate.c conf_file.c conf_file.h md5.c md5.h cache_file.c cache_file.h error.h pid_file.c pid_file.h dprintf.h @EXTRASRC@ ez_ipupdate_LDADD = @EXTRAOBJ@ EXTRA_DIST = getpass.c ez-ipupdate.lsm example.conf example-pgpow.conf example-dhs.conf example-dyndns.conf example-ods.conf example-tzo.conf example-gnudip.conf example-easydns.conf example-justlinux.conf example-dyns.conf CHANGELOG mkbinary example-heipv6tb.conf AUTOMAKE_OPTIONS=foreign ez-ipupdate-3.0.11b8/acconfig.h 644 764 764 204 7143731074 11252 #undef PACKAGE #undef VERSION #undef DEBUG #undef HAVE_GETPASS #undef HAVE_SYS_ERRLIST #undef OS #undef USE_MD5 #undef DEF_SERVICE ez-ipupdate-3.0.11b8/aclocal.m4 644 764 764 10664 7647563274 11261 dnl aclocal.m4 generated automatically by aclocal 1.3 dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. dnl This Makefile.in is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. dnl This file resides in the same directory as the config header dnl that is generated. We must strip everything past the first ":", dnl and everything past the last "/". AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, <>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, <>; do case " <<$>>CONFIG_HEADERS " in *" <<$>>am_file "*<<)>> echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx ;; esac am_indx=`expr "<<$>>am_indx" + 1` done<<>>dnl>>) changequote([,]))]) # Do all the work for Automake. This macro actually does too much -- # some checks are only needed if your package does certain things. # But this isn't really a big deal. # serial 1 dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) AC_DEFUN(AM_INIT_AUTOMAKE, [AC_REQUIRE([AM_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) VERSION=[$2] AC_SUBST(VERSION) dnl test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi ifelse([$3],, AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") AC_DEFINE_UNQUOTED(VERSION, "$VERSION")) AC_REQUIRE([AM_SANITY_CHECK]) AC_REQUIRE([AC_ARG_PROGRAM]) dnl FIXME This is truly gross. missing_dir=`cd $ac_aux_dir && pwd` AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) AC_REQUIRE([AC_PROG_MAKE_SET])]) # serial 1 AC_DEFUN(AM_PROG_INSTALL, [AC_REQUIRE([AC_PROG_INSTALL]) test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' AC_SUBST(INSTALL_SCRIPT)dnl ]) # # Check to make sure that the build environment is sane. # AC_DEFUN(AM_SANITY_CHECK, [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` if test "[$]*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi if test "[$]*" != "X $srcdir/configure conftestfile" \ && test "[$]*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "[$]2" = conftestfile ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi rm -f conftest* AC_MSG_RESULT(yes)]) dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl The program must properly implement --version. AC_DEFUN(AM_MISSING_PROG, [AC_MSG_CHECKING(for working $2) # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if ($2 --version) < /dev/null > /dev/null 2>&1; then $1=$2 AC_MSG_RESULT(found) else $1="$3/missing $2" AC_MSG_RESULT(missing) fi AC_SUBST($1)]) ez-ipupdate-3.0.11b8/config.guess 755 764 764 57745 7143731074 11736 #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . # The master version of this file is at the FSF in /home/gd/gnu/lib. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit system type (host/target name). # # Only a few systems have been added to this list; please add others # (but try to keep the structure clean). # # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 8/24/94.) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. cat <dummy.s .globl main .ent main main: .frame \$30,0,\$26,0 .prologue 0 .long 0x47e03d80 # implver $0 lda \$2,259 .long 0x47e20c21 # amask $2,$1 srl \$1,8,\$2 sll \$2,2,\$2 sll \$0,3,\$0 addl \$1,\$0,\$0 addl \$2,\$0,\$0 ret \$31,(\$26),1 .end main EOF ${CC-cc} dummy.s -o dummy 2>/dev/null if test "$?" = 0 ; then ./dummy case "$?" in 7) UNAME_MACHINE="alpha" ;; 15) UNAME_MACHINE="alphaev5" ;; 14) UNAME_MACHINE="alphaev56" ;; 10) UNAME_MACHINE="alphapca56" ;; 16) UNAME_MACHINE="alphaev6" ;; esac fi rm -f dummy.s dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-cbm-sysv4 exit 0;; amiga:NetBSD:*:*) echo m68k-cbm-netbsd${UNAME_RELEASE} exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc64:OpenBSD:*:*) echo mips64el-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hkmips:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; arm32:NetBSD:*:*) echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; SR2?01:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:*|MIS*:OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; atari*:NetBSD:*:*) echo m68k-atari-netbsd${UNAME_RELEASE} exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3*:NetBSD:*:*) echo m68k-sun-netbsd${UNAME_RELEASE} exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:NetBSD:*:*) echo m68k-apple-netbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) sed 's/^ //' << EOF >dummy.c int main (argc, argv) int argc; char **argv; { #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF ${CC-cc} dummy.c -o dummy \ && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm dummy.c dummy && exit 0 rm -f dummy.c dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ -o ${TARGET_BINARY_INTERFACE}x = x ] ; then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 rm -f dummy.c dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:4) if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=4.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[3478]??:HP-UX:*:*) case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; 9000/8?? ) HP_ARCH=hppa1.0 ;; esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 rm -f dummy.c dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i?86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; F300:UNIX_System_V:*:*) FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; F301:UNIX_System_V:*:*) echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` exit 0 ;; hp3[0-9][05]:NetBSD:*:*) echo m68k-hp-netbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; i?86:BSD/386:*:* | *:BSD/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:NetBSD:*:*) echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin32 exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin32 exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:Linux:*:*) # uname on the ARM produces all sorts of strangeness, and we need to # filter it out. case "$UNAME_MACHINE" in arm* | sa110*) UNAME_MACHINE="arm" ;; esac # The BFD linker knows what the default object file format is, so # first see if it will tell us. ld_help_string=`ld --help 2>&1` ld_supported_emulations=`echo $ld_help_string \ | sed -ne '/supported emulations:/!d s/[ ][ ]*/ /g s/.*supported emulations: *// s/ .*// p'` case "$ld_supported_emulations" in i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; esac if test "${UNAME_MACHINE}" = "alpha" ; then sed 's/^ //' <dummy.s .globl main .ent main main: .frame \$30,0,\$26,0 .prologue 0 .long 0x47e03d80 # implver $0 lda \$2,259 .long 0x47e20c21 # amask $2,$1 srl \$1,8,\$2 sll \$2,2,\$2 sll \$0,3,\$0 addl \$1,\$0,\$0 addl \$2,\$0,\$0 ret \$31,(\$26),1 .end main EOF LIBC="" ${CC-cc} dummy.s -o dummy 2>/dev/null if test "$?" = 0 ; then ./dummy case "$?" in 7) UNAME_MACHINE="alpha" ;; 15) UNAME_MACHINE="alphaev5" ;; 14) UNAME_MACHINE="alphaev56" ;; 10) UNAME_MACHINE="alphapca56" ;; 16) UNAME_MACHINE="alphaev6" ;; esac objdump --private-headers dummy | \ grep ld.so.1 > /dev/null if test "$?" = 0 ; then LIBC="libc1" fi fi rm -f dummy.s dummy echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 elif test "${UNAME_MACHINE}" = "mips" ; then cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 rm -f dummy.c dummy else # Either a pre-BFD a.out linker (linux-gnuoldld) # or one that does not give us useful --help. # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. # If ld does not provide *any* "supported emulations:" # that means it is gnuoldld. echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 case "${UNAME_MACHINE}" in i?86) VENDOR=pc; ;; *) VENDOR=unknown; ;; esac # Determine whether the default compiler is a.out or elf cat >dummy.c < main(argc, argv) int argc; char *argv[]; { #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); # endif # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); # endif #else printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); #endif return 0; } EOF ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 rm -f dummy.c dummy fi ;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. i?86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; i?86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} fi exit 0 ;; i?86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i?86:LynxOS:2.*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:*:6*) echo mips-sony-newsos6 exit 0 ;; R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 cat >dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) printf ("vax-dec-bsd\n"); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 rm -f dummy.c dummy # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi #echo '(Unable to guess system type)' 1>&2 exit 1 ez-ipupdate-3.0.11b8/config.h.in 664 764 764 7535 7647563376 11434 /* config.h.in. Generated automatically from configure.in by autoheader. */ /* Define as the return type of signal handlers (int or void). */ #undef RETSIGTYPE #undef PACKAGE #undef VERSION #undef DEBUG #undef HAVE_GETPASS #undef HAVE_SYS_ERRLIST #undef OS #undef USE_MD5 #undef DEF_SERVICE /* Define if you have the fork function. */ #undef HAVE_FORK /* Define if you have the getegid function. */ #undef HAVE_GETEGID /* Define if you have the geteuid function. */ #undef HAVE_GETEUID /* Define if you have the getgid function. */ #undef HAVE_GETGID /* Define if you have the gethostbyaddr function. */ #undef HAVE_GETHOSTBYADDR /* Define if you have the getopt function. */ #undef HAVE_GETOPT /* Define if you have the getopt_long function. */ #undef HAVE_GETOPT_LONG /* Define if you have the getpid function. */ #undef HAVE_GETPID /* Define if you have the getservbyname function. */ #undef HAVE_GETSERVBYNAME /* Define if you have the getuid function. */ #undef HAVE_GETUID /* Define if you have the herror function. */ #undef HAVE_HERROR /* Define if you have the inet_addr function. */ #undef HAVE_INET_ADDR /* Define if you have the inet_aton function. */ #undef HAVE_INET_ATON /* Define if you have the inet_ntoa function. */ #undef HAVE_INET_NTOA /* Define if you have the setegid function. */ #undef HAVE_SETEGID /* Define if you have the seteuid function. */ #undef HAVE_SETEUID /* Define if you have the setgid function. */ #undef HAVE_SETGID /* Define if you have the setuid function. */ #undef HAVE_SETUID /* Define if you have the snprintf function. */ #undef HAVE_SNPRINTF /* Define if you have the socket function. */ #undef HAVE_SOCKET /* Define if you have the stat function. */ #undef HAVE_STAT /* Define if you have the strdup function. */ #undef HAVE_STRDUP /* Define if you have the strerror function. */ #undef HAVE_STRERROR /* Define if you have the strftime function. */ #undef HAVE_STRFTIME /* Define if you have the vfork function. */ #undef HAVE_VFORK /* Define if you have the vfprintf function. */ #undef HAVE_VFPRINTF /* Define if you have the vsnprintf function. */ #undef HAVE_VSNPRINTF /* Define if you have the vsprintf function. */ #undef HAVE_VSPRINTF /* Define if you have the wait function. */ #undef HAVE_WAIT /* Define if you have the waitpid function. */ #undef HAVE_WAITPID /* Define if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define if you have the header file. */ #undef HAVE_ERRNO_H /* Define if you have the header file. */ #undef HAVE_FCNTL_H /* Define if you have the header file. */ #undef HAVE_GETOPT_H /* Define if you have the header file. */ #undef HAVE_GRP_H /* Define if you have the header file. */ #undef HAVE_NETDB_H /* Define if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define if you have the header file. */ #undef HAVE_PWD_H /* Define if you have the header file. */ #undef HAVE_SIGNAL_H /* Define if you have the header file. */ #undef HAVE_STDARG_H /* Define if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define if you have the header file. */ #undef HAVE_SYS_SOCKIO_H /* Define if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define if you have the header file. */ #undef HAVE_SYS_WAIT_H /* Define if you have the header file. */ #undef HAVE_SYSLOG_H /* Define if you have the header file. */ #undef HAVE_UNISTD_H /* Define if you have the nsl library (-lnsl). */ #undef HAVE_LIBNSL /* Define if you have the socket library (-lsocket). */ #undef HAVE_LIBSOCKET ez-ipupdate-3.0.11b8/config.sub 755 764 764 46462 7143731074 11373 #! /bin/sh # Configuration validation subroutine script, version 1.1. # Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. if [ x$1 = x ] then echo Configuration name missing. 1>&2 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 echo "or $0 ALIAS" 1>&2 echo where ALIAS is a recognized configuration type. 1>&2 exit 1 fi # First pass through any local machine types. case $1 in *local*) echo $1 exit 0 ;; *) ;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in linux-gnu*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple) os= basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ | arme[lb] | pyramid | mn10200 | mn10300 \ | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ | mipstx39 | mipstx39el \ | sparc | sparclet | sparclite | sparc64 | v850) basic_machine=$basic_machine-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i[34567]86) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \ | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ | sparc64-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mipstx39-* | mipstx39el-* \ | f301-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-cbm ;; amigaos | amigados) basic_machine=m68k-cbm os=-amigaos ;; amigaunix | amix) basic_machine=m68k-cbm os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | ymp) basic_machine=ymp-cray os=-unicos ;; cray2) basic_machine=cray2-cray os=-unicos ;; [ctj]90-cray) basic_machine=c90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; i370-ibm* | ibm*) basic_machine=i370-ibm os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i[34567]86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i[34567]86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i[34567]86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i[34567]86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; miniframe) basic_machine=m68000-convergent ;; mipsel*-linux*) basic_machine=mipsel-unknown os=-linux-gnu ;; mips*-linux*) basic_machine=mips-unknown os=-linux-gnu ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; np1) basic_machine=np1-gould ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | nexen) basic_machine=i586-pc ;; pentiumpro | p6 | k6 | 6x86) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | nexen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | k6-* | 6x86-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=rs6000-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; symmetry) basic_machine=i386-sequent os=-dynix ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; xmp) basic_machine=xmp-cray os=-unicos ;; xps | xps100) basic_machine=xps100-honeywell ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. mips) if [ x$os = x-linux-gnu ]; then basic_machine=mips-unknown else basic_machine=mips-mips fi ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sparc) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv*) # Remember, each alternative MUST END IN *, to match a version number. ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -xenix) os=-xenix ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-semi) os=-aout ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-ibm) os=-aix ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f301-fujitsu) os=-uxpv ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -hpux*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks*) vendor=wrs ;; -aux*) vendor=apple ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os ez-ipupdate-3.0.11b8/configure 755 764 764 205550 7647563302 11340 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.12 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help --enable-default-service=SERVICE the default service type to use possibilities are: ezip, pgpow, justlinux, dhs, dyndns, dyndns-static, ods, tzo, gnudip, easydns, easydns-partner, dyns, hn, zoneedit, heipv6tb" ac_help="$ac_help --enable-debug include support for debugging" ac_help="$ac_help --disable-md5 disable MD5 support" # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.12" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file=ez-ipupdate.c # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo "configure:564: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. for ac_prog in ginstall installbsd scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. # OSF/1 installbsd also uses dspmsg, but is usable. : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 fi fi done ;; esac done IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL="$ac_install_sh" fi fi echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 echo "configure:617: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi if test "$*" != "X $srcdir/configure conftestfile" \ && test "$*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { echo "configure: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" 1>&2; exit 1; } fi test "$2" = conftestfile ) then # Ok. : else { echo "configure: error: newly created file is older than distributed files! Check your system clock" 1>&2; exit 1; } fi rm -f conftest* echo "$ac_t""yes" 1>&6 if test "$program_transform_name" = s,x,x,; then program_transform_name= else # Double any \ or $. echo might interpret backslashes. cat <<\EOF_SED > conftestsed s,\\,\\\\,g; s,\$,$$,g EOF_SED program_transform_name="`echo $program_transform_name|sed -f conftestsed`" rm -f conftestsed fi test "$program_prefix" != NONE && program_transform_name="s,^,${program_prefix},; $program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo "configure:674: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF all: @echo 'ac_maketemp="${MAKE}"' EOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftestmake fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$ac_t""yes" 1>&6 SET_MAKE= else echo "$ac_t""no" 1>&6 SET_MAKE="MAKE=${MAKE-make}" fi PACKAGE=ez-ipupdate VERSION=3.0.11b8 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } fi cat >> confdefs.h <> confdefs.h <&6 echo "configure:720: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (aclocal --version) < /dev/null > /dev/null 2>&1; then ACLOCAL=aclocal echo "$ac_t""found" 1>&6 else ACLOCAL="$missing_dir/missing aclocal" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 echo "configure:733: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (autoconf --version) < /dev/null > /dev/null 2>&1; then AUTOCONF=autoconf echo "$ac_t""found" 1>&6 else AUTOCONF="$missing_dir/missing autoconf" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 echo "configure:746: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (automake --version) < /dev/null > /dev/null 2>&1; then AUTOMAKE=automake echo "$ac_t""found" 1>&6 else AUTOMAKE="$missing_dir/missing automake" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 echo "configure:759: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (autoheader --version) < /dev/null > /dev/null 2>&1; then AUTOHEADER=autoheader echo "$ac_t""found" 1>&6 else AUTOHEADER="$missing_dir/missing autoheader" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 echo "configure:772: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (makeinfo --version) < /dev/null > /dev/null 2>&1; then MAKEINFO=makeinfo echo "$ac_t""found" 1>&6 else MAKEINFO="$missing_dir/missing makeinfo" echo "$ac_t""missing" 1>&6 fi if test "$program_transform_name" = s,x,x,; then program_transform_name= else # Double any \ or $. echo might interpret backslashes. cat <<\EOF_SED > conftestsed s,\\,\\\\,g; s,\$,$$,g EOF_SED program_transform_name="`echo $program_transform_name|sed -f conftestsed`" rm -f conftestsed fi test "$program_prefix" != NONE && program_transform_name="s,^,${program_prefix},; $program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:810: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:839: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ac_prog_rejected=no for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" break fi done IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$ac_dir/$ac_word" "$@" shift ac_cv_prog_CC="$@" fi fi fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:887: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_works=no fi rm -fr conftest* echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:921: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:926: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo "configure:950: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then CFLAGS="-g -O2" else CFLAGS="-O2" fi else GCC= test "${CFLAGS+set}" = set || CFLAGS="-g" fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:978: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo "configure:1049: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. for ac_prog in ginstall installbsd scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. # OSF/1 installbsd also uses dspmsg, but is usable. : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 fi fi done ;; esac done IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL="$ac_install_sh" fi fi echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 echo "configure:1100: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #ifdef signal #undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main() { int i; ; return 0; } EOF if { (eval echo configure:1122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_type_signal=int fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_signal" 1>&6 cat >> confdefs.h <&6 echo "configure:1143: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me #else gethostbyname(); #endif ; return 0; } EOF if { (eval echo configure:1171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_gethostbyname=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 echo "configure:1192: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi fi echo $ac_n "checking for connect""... $ac_c" 1>&6 echo "configure:1240: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_connect) || defined (__stub___connect) choke me #else connect(); #endif ; return 0; } EOF if { (eval echo configure:1268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_connect=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_connect=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 echo "configure:1289: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi fi for ac_func in socket \ strdup \ getopt_long \ gethostbyaddr \ getservbyname \ inet_addr \ inet_ntoa \ snprintf \ vfprintf \ stat \ vsprintf \ vsnprintf \ strerror \ strftime \ wait \ waitpid \ getpid \ fork \ vfork \ getuid \ geteuid \ setuid \ seteuid \ getgid \ getegid \ setgid \ setegid \ inet_aton \ herror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:1368: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:1396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done for ac_hdr in arpa/inet.h \ sys/types.h \ sys/time.h \ sys/stat.h \ fcntl.h \ signal.h \ syslog.h \ pwd.h \ stdarg.h \ grp.h \ errno.h \ sys/sockio.h \ sys/wait.h \ getopt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1438: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in unistd.h \ netinet/in.h \ netdb.h \ sys/socket.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1482: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 { echo "configure: error: could not locate neccessary system header files" 1>&2; exit 1; } fi done echo $ac_n "checking for sys_errlist in -lc""... $ac_c" 1>&6 echo "configure:1521: checking for sys_errlist in -lc" >&5 ac_lib_var=`echo c'_'sys_errlist | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define HAVE_SYS_ERRLIST 1 EOF else echo "$ac_t""no" 1>&6 fi for ac_func in getopt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:1567: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:1595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done if test "$ac_cv_func_getopt" != yes; then { echo "configure: error: getopt is needed for this program to work" 1>&2; exit 1; } fi echo $ac_n "checking for getpass""... $ac_c" 1>&6 echo "configure:1624: checking for getpass" >&5 if eval "test \"`echo '$''{'ac_cv_func_getpass'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getpass(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_getpass) || defined (__stub___getpass) choke me #else getpass(); #endif ; return 0; } EOF if { (eval echo configure:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_getpass=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_getpass=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'getpass`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define HAVE_GETPASS 1 EOF else echo "$ac_t""no" 1>&6 EXTRASRC="$EXTRASRC \$(srcdir)/getpass.c" EXTRAOBJ="$EXTRAOBJ \$(srcdir)/getpass.o" fi # Make sure we can run config.sub. if $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 echo "configure:1684: checking host system type" >&5 host_alias=$host case "$host_alias" in NONE) case $nonopt in NONE) if host_alias=`$ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac host=`$ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 cat >> confdefs.h <&6 echo "configure:1710: checking for user supplied default service" >&5 # Check whether --enable-default-service or --disable-default-service was given. if test "${enable_default_service+set}" = set; then enableval="$enable_default_service" use_SERVICE=$enableval; echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 use_SERVICE=null echo "configure: warning: not setting default service" 1>&2 fi case "$use_SERVICE" in ezip ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "ezip" EOF ;; ez-ip ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "ezip" EOF ;; pgpow ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "pgpow" EOF ;; penguinpowered ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "pgpow" EOF ;; justlinux ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "justlinux" EOF ;; dhs ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "dhs" EOF ;; dyndns ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "dyndns" EOF ;; dyndns-stat ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "dyndns-stat" EOF ;; dyndns-static ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "dyndns-static" EOF ;; ods ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "ods" EOF ;; tzo ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "tzo" EOF ;; gnudip ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "gnudip" EOF ;; easydns ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "easydns" EOF ;; easydns-partner ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "easydns-partner" EOF ;; dyns ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "dyns" EOF ;; hn ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "hn" EOF ;; zoneedit ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "zoneedit" EOF ;; heipv6tb ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "heipv6tb" EOF ;; null ) cat >> confdefs.h <<\EOF #define DEF_SERVICE "NULL" EOF ;; "" ) ;; * ) { echo "configure: error: unknown default service type" 1>&2; exit 1; };; esac echo $ac_n "checking whether user wants debugging support""... $ac_c" 1>&6 echo "configure:1804: checking whether user wants debugging support" >&5 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" cat >> confdefs.h <<\EOF #define DEBUG 1 EOF echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking whether user wants to dissable MD5 support""... $ac_c" 1>&6 echo "configure:1819: checking whether user wants to dissable MD5 support" >&5 # Check whether --enable-md5 or --disable-md5 was given. if test "${enable_md5+set}" = set; then enableval="$enable_md5" echo "$ac_t""yes" 1>&6 else cat >> confdefs.h <<\EOF #define USE_MD5 1 EOF echo "$ac_t""no" 1>&6 fi trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 DEFS=-DHAVE_CONFIG_H # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.12" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@PACKAGE@%$PACKAGE%g s%@VERSION@%$VERSION%g s%@ACLOCAL@%$ACLOCAL%g s%@AUTOCONF@%$AUTOCONF%g s%@AUTOMAKE@%$AUTOMAKE%g s%@AUTOHEADER@%$AUTOHEADER%g s%@MAKEINFO@%$MAKEINFO%g s%@SET_MAKE@%$SET_MAKE%g s%@CC@%$CC%g s%@CPP@%$CPP%g s%@host@%$host%g s%@host_alias@%$host_alias%g s%@host_cpu@%$host_cpu%g s%@host_vendor@%$host_vendor%g s%@host_os@%$host_os%g s%@EXTRASRC@%$EXTRASRC%g s%@EXTRAOBJ@%$EXTRAOBJ%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac case "$ac_given_INSTALL" in [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` cat $ac_file_inputs > conftest.in EOF # Transform confdefs.h into a sed script conftest.vals that substitutes # the proper values into config.h.in to produce config.h. And first: # Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF sed -n -f conftest.hdr confdefs.h > conftest.vals rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >> conftest.vals <<\EOF s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. rm -f conftest.tail while : do ac_lines=`grep -c . conftest.vals` # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi # Write a limited-size here document to conftest.frag. echo ' cat > conftest.frag <> $CONFIG_STATUS sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF sed -f conftest.frag conftest.in > conftest.out rm -f conftest.in mv conftest.out conftest.in ' >> $CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail rm -f conftest.vals mv conftest.tail conftest.vals done rm -f conftest.vals cat >> $CONFIG_STATUS <<\EOF rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h cat conftest.in >> conftest.h rm -f conftest.in if cmp -s $ac_file conftest.h 2>/dev/null; then echo "$ac_file is unchanged" rm -f conftest.h else # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" fi rm -f $ac_file mv conftest.h $ac_file fi fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 ez-ipupdate-3.0.11b8/configure.in 644 764 764 10067 7647562462 11725 dnl Process this file with autoconf to produce a configure script. AC_INIT(ez-ipupdate.c) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(ez-ipupdate,3.0.11b8) dnl Checks for programs. AC_ARG_PROGRAM AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_TYPE_SIGNAL dnl Checks for libraries. AC_CHECK_FUNC(gethostbyname) if test $ac_cv_func_gethostbyname = no; then AC_CHECK_LIB(nsl, gethostbyname) fi AC_CHECK_FUNC(connect) if test $ac_cv_func_connect = no; then AC_CHECK_LIB(socket, connect) fi AC_CHECK_FUNCS( socket \ strdup \ getopt_long \ gethostbyaddr \ getservbyname \ inet_addr \ inet_ntoa \ snprintf \ vfprintf \ stat \ vsprintf \ vsnprintf \ strerror \ strftime \ wait \ waitpid \ getpid \ fork \ vfork \ getuid \ geteuid \ setuid \ seteuid \ getgid \ getegid \ setgid \ setegid \ inet_aton \ herror ) dnl Checks for header files. AC_CHECK_HEADERS( arpa/inet.h \ sys/types.h \ sys/time.h \ sys/stat.h \ fcntl.h \ signal.h \ syslog.h \ pwd.h \ stdarg.h \ grp.h \ errno.h \ sys/sockio.h \ sys/wait.h \ getopt.h ) AC_CHECK_HEADERS( unistd.h \ netinet/in.h \ netdb.h \ sys/socket.h ,, AC_MSG_ERROR(could not locate neccessary system header files) ) AC_CHECK_LIB(c, sys_errlist, AC_DEFINE(HAVE_SYS_ERRLIST)) dnl you need at least to have getopt, but getopt_long will be used if it dnl is present AC_CHECK_FUNCS(getopt) if test "$ac_cv_func_getopt" != yes; then AC_MSG_ERROR(getopt is needed for this program to work) fi AC_CHECK_FUNC(getpass, AC_DEFINE(HAVE_GETPASS), [EXTRASRC="$EXTRASRC \$(srcdir)/getpass.c"] [EXTRAOBJ="$EXTRAOBJ \$(srcdir)/getpass.o"] ) dnl Get system canonical name AC_CANONICAL_HOST AC_DEFINE_UNQUOTED(OS, "${host}") dnl allow selection of the default service dnl the default is to use ez-ip AC_MSG_CHECKING(for user supplied default service) AC_ARG_ENABLE(default-service, [ --enable-default-service=SERVICE the default service type to use possibilities are: ezip, pgpow, justlinux, dhs, dyndns, dyndns-static, ods, tzo, gnudip, easydns, easydns-partner, dyns, hn, zoneedit, heipv6tb], [ use_SERVICE=$enableval; AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) use_SERVICE=null AC_MSG_WARN(not setting default service) ] ) case "$use_SERVICE" in ezip ) AC_DEFINE(DEF_SERVICE, "ezip");; ez-ip ) AC_DEFINE(DEF_SERVICE, "ezip");; pgpow ) AC_DEFINE(DEF_SERVICE, "pgpow");; penguinpowered ) AC_DEFINE(DEF_SERVICE, "pgpow");; justlinux ) AC_DEFINE(DEF_SERVICE, "justlinux");; dhs ) AC_DEFINE(DEF_SERVICE, "dhs");; dyndns ) AC_DEFINE(DEF_SERVICE, "dyndns");; dyndns-stat ) AC_DEFINE(DEF_SERVICE, "dyndns-stat");; dyndns-static ) AC_DEFINE(DEF_SERVICE, "dyndns-static");; ods ) AC_DEFINE(DEF_SERVICE, "ods");; tzo ) AC_DEFINE(DEF_SERVICE, "tzo");; gnudip ) AC_DEFINE(DEF_SERVICE, "gnudip");; easydns ) AC_DEFINE(DEF_SERVICE, "easydns");; easydns-partner ) AC_DEFINE(DEF_SERVICE, "easydns-partner");; dyns ) AC_DEFINE(DEF_SERVICE, "dyns");; hn ) AC_DEFINE(DEF_SERVICE, "hn");; zoneedit ) AC_DEFINE(DEF_SERVICE, "zoneedit");; heipv6tb ) AC_DEFINE(DEF_SERVICE, "heipv6tb");; null ) AC_DEFINE(DEF_SERVICE, "NULL");; "" ) ;; * ) AC_MSG_ERROR(unknown default service type);; esac dnl check weather we want debugging support dnl the default is to NOT use debugging support AC_MSG_CHECKING(whether user wants debugging support) AC_ARG_ENABLE(debug, [ --enable-debug include support for debugging], [ AC_DEFINE(DEBUG) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ] ) dnl check weather we want to disable MD5 support AC_MSG_CHECKING(whether user wants to dissable MD5 support) AC_ARG_ENABLE(md5, [ --disable-md5 disable MD5 support], [ AC_MSG_RESULT(yes) ], [ AC_DEFINE(USE_MD5) AC_MSG_RESULT(no) ] ) AC_SUBST(EXTRASRC) AC_SUBST(EXTRAOBJ) AC_OUTPUT(Makefile) ez-ipupdate-3.0.11b8/install-sh 755 764 764 12720 7143731074 11402 #!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 ez-ipupdate-3.0.11b8/missing 644 764 764 50 7143731074 10703 #autoconf complains if this is not here ez-ipupdate-3.0.11b8/mkinstalldirs 755 764 764 1336 7143731074 12165 #! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.1.1.1 1999/04/19 00:34:59 amackay Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" 1>&2 mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here ez-ipupdate-3.0.11b8/stamp-h.in 644 764 764 12 7647563376 11227 timestamp ez-ipupdate-3.0.11b8/ez-ipupdate.c 644 764 764 354411 7443237143 12020 /* ============================================================================ * Copyright (C) 1998-2001 Angus Mackay. All rights reserved; * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ============================================================================ */ /* * ez-ipupdate * * a very simple dynDNS client for the ez-ip dynamic dns service * (http://www.ez-ip.net). * * why this program when something like: * curl -u user:pass http://www.ez-ip.net/members/update/?key=val&... * would do the trick? because there are nicer clients for other OSes and * I don't like to see UNIX get the short end of the stick. * * tested under Linux and Solaris. * */ #ifdef HAVE_CONFIG_H # include #endif // you man very well need to edit this, don't worry though, email is only sent // if bad things happend and it has to exit when in daemon mode. #define SEND_EMAIL_CMD "mail" #define EZIP_DEFAULT_SERVER "www.EZ-IP.Net" #define EZIP_DEFAULT_PORT "80" #define EZIP_REQUEST "/members/update/" #define PGPOW_DEFAULT_SERVER "www.penguinpowered.com" #define PGPOW_DEFAULT_PORT "2345" #define PGPOW_REQUEST "update" #define PGPOW_VERSION "1.0" #define DHS_DEFAULT_SERVER "members.dhs.org" #define DHS_DEFAULT_PORT "80" #define DHS_REQUEST "/nic/hosts" #define DHS_SUCKY_TIMEOUT 60 #define DYNDNS_DEFAULT_SERVER "members.dyndns.org" #define DYNDNS_DEFAULT_PORT "80" #define DYNDNS_REQUEST "/nic/update" #define DYNDNS_STAT_REQUEST "/nic/update" #define DYNDNS_MAX_INTERVAL (25*24*3600) #define ODS_DEFAULT_SERVER "update.ods.org" #define ODS_DEFAULT_PORT "7070" #define ODS_REQUEST "update" #define TZO_DEFAULT_SERVER "cgi.tzo.com" #define TZO_DEFAULT_PORT "80" #define TZO_REQUEST "/webclient/signedon.html" #define GNUDIP_DEFAULT_SERVER "" #define GNUDIP_DEFAULT_PORT "3495" #define GNUDIP_REQUEST "0" #define EASYDNS_DEFAULT_SERVER "members.easydns.com" #define EASYDNS_DEFAULT_PORT "80" #define EASYDNS_REQUEST "/dyn/ez-ipupdate.php" #define EASYDNS_PARTNER_DEFAULT_SERVER "api.easydns.com" #define EASYDNS_PARTNER_DEFAULT_PORT "80" #define EASYDNS_PARTNER_REQUEST "/dyn/ez-ipupdate.php" #define JUSTL_DEFAULT_SERVER "www.justlinux.com" #define JUSTL_DEFAULT_PORT "80" #define JUSTL_REQUEST "/bin/controlpanel/dyndns/jlc.pl" #define JUSTL_VERSION "2.0" #define DYNS_DEFAULT_SERVER "www.dyns.cx" #define DYNS_DEFAULT_PORT "80" #define DYNS_REQUEST "/postscript.php" #define HN_DEFAULT_SERVER "dup.hn.org" #define HN_DEFAULT_PORT "80" #define HN_REQUEST "/vanity/update" #define ZONEEDIT_DEFAULT_SERVER "www.zoneedit.com" #define ZONEEDIT_DEFAULT_PORT "80" #define ZONEEDIT_REQUEST "/auth/dynamic.html" #define HEIPV6TB_DEFAULT_SERVER "ipv6tb.he.net" #define HEIPV6TB_DEFAULT_PORT "80" #define HEIPV6TB_REQUEST "/index.cgi" #define DEFAULT_TIMEOUT 120 #define DEFAULT_UPDATE_PERIOD 120 #define DEFAULT_RESOLV_PERIOD 30 #ifdef DEBUG # define BUFFER_SIZE (16*1024) #else # define BUFFER_SIZE (4*1024-1) #endif #ifdef HAVE_GETOPT_H # include #endif #include #include #include #include #include #if HAVE_FCNTL_H # include #endif #include #if HAVE_ARPA_INET_H # include #endif #if HAVE_ERRNO_H # include #endif #include #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SIGNAL_H # include #endif #if HAVE_SYS_TIME_H # include #endif #if HAVE_SYS_WAIT_H # include #endif #if HAVE_SYSLOG_H # include #endif #if HAVE_STDARG_H # include #endif #include #if HAVE_PWD_H && HAVE_GRP_H # include # include #endif #if defined(HAVE_FORK) && !defined(HAVE_VFORK) # define vfork fork #endif #if USE_MD5 # include # define MD5_DIGEST_BYTES (16) #endif #if __linux__ || __SVR4 || __OpenBSD__ || __FreeBSD__ || __NetBSD__ # define IF_LOOKUP 1 # include # include # ifdef HAVE_SYS_SOCKIO_H # include # endif #endif #include #include #include #include #if !defined(__GNUC__) && !defined(HAVE_SNPRINTF) #error "get gcc, fix this code, or find yourself a snprintf!" #else # if HAVE_SNPRINTF # define snprintf(x, y, z...) snprintf(x, y, ## z) # else # define snprintf(x, y, z...) sprintf(x, ## z) # endif #endif #if HAVE_VSNPRINTF # define vsnprintf(x, y, z...) vsnprintf(x, y, ## z) #else # define vsnprintf(x, y, z...) vsprintf(x, ## z) #endif #ifndef HAVE_HERROR # define herror(x) fprintf(stderr, "%s: error\n", x) #endif #define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0])) #define N_STR(x) (x == NULL ? "(null)" : x) #ifndef OS # define OS "unknown" #endif // the min period for checking the interface #define MIN_UPDATE_PERIOD 10 // the min/max time to wait if we fail to update #define MIN_WAIT_PERIOD 300 #define MAX_WAIT_PERIOD (2*3600) // the min time that max-period can be set to #define MIN_MAXINTERVAL (24*3600) // the max time we will wait if the server tells us to #define MAX_WAITRESPONSE_WAIT (24*3600) #define MAX_MESSAGE_LEN 256 #define ARGLENGTH 32 /**************************************************/ struct service_t { char *title; char *names[3]; void (*init)(void); int (*update_entry)(void); int (*check_info)(void); char **fields_used; char *default_server; char *default_port; char *default_request; }; enum { UPDATERES_OK = 0, UPDATERES_ERROR, UPDATERES_SHUTDOWN, }; /**************************************************/ char *program_name = NULL; char *cache_file = NULL; char *config_file = NULL; char *server = NULL; char *port = NULL; char user[256]; char auth[512]; char user_name[128]; char password[128]; char *address = NULL; char *request = NULL; char *request_over_ride = NULL; int wildcard = 0; char *mx = NULL; char *url = NULL; char *host = NULL; char *cloak_title = NULL; char *interface = NULL; int ntrys = 1; int update_period = DEFAULT_UPDATE_PERIOD; int resolv_period = DEFAULT_RESOLV_PERIOD; struct timeval timeout; int max_interval = 0; int service_set = 0; char *post_update_cmd = NULL; char *post_update_cmd_arg = NULL; int connection_type = 1; time_t last_update = 0; char *notify_email = NULL; char *pid_file = NULL; char *partner = NULL; static volatile int client_sockfd; static volatile int last_sig = 0; /* service objects for various services */ // this one is for when people don't configure a default service at build time int NULL_check_info(void); static char *NULL_fields_used[] = { NULL }; int EZIP_update_entry(void); int EZIP_check_info(void); static char *EZIP_fields_used[] = { "server", "user", "address", "wildcard", "mx", "url", "host", NULL }; int PGPOW_update_entry(void); int PGPOW_check_info(void); static char *PGPOW_fields_used[] = { "server", "host", NULL }; int DHS_update_entry(void); int DHS_check_info(void); static char *DHS_fields_used[] = { "server", "user", "address", "wildcard", "mx", "url", "host", NULL }; void DYNDNS_init(void); int DYNDNS_update_entry(void); int DYNDNS_check_info(void); static char *DYNDNS_fields_used[] = { "server", "user", "address", "wildcard", "mx", "host", NULL }; static char *DYNDNS_STAT_fields_used[] = { "server", "user", "address", "wildcard", "mx", "host", NULL }; int ODS_update_entry(void); int ODS_check_info(void); static char *ODS_fields_used[] = { "server", "host", "address", NULL }; int TZO_update_entry(void); int TZO_check_info(void); static char *TZO_fields_used[] = { "server", "user", "address", "host", "connection-type", NULL }; int EASYDNS_update_entry(void); int EASYDNS_check_info(void); static char *EASYDNS_fields_used[] = { "server", "user", "address", "wildcard", "mx", "host", NULL }; int EASYDNS_PARTNER_update_entry(void); int EASYDNS_PARTNER_check_info(void); static char *EASYDNS_PARTNER_fields_used[] = { "server", "partner", "user", "address", "wildcard", "host", NULL }; #ifdef USE_MD5 int GNUDIP_update_entry(void); int GNUDIP_check_info(void); static char *GNUDIP_fields_used[] = { "server", "user", "host", "address", NULL }; #endif int JUSTL_update_entry(void); int JUSTL_check_info(void); static char *JUSTL_fields_used[] = { "server", "user", "host", NULL }; int DYNS_update_entry(void); int DYNS_check_info(void); static char *DYNS_fields_used[] = { "server", "user", "host", NULL }; int HN_update_entry(void); int HN_check_info(void); static char *HN_fields_used[] = { "server", "user", "address", NULL }; int ZONEEDIT_update_entry(void); int ZONEEDIT_check_info(void); static char *ZONEEDIT_fields_used[] = { "server", "user", "address", "mx", "host", NULL }; int HEIPV6TB_update_entry(void); int HEIPV6TB_check_info(void); static char *HEIPV6TB_fields_used[] = { "server", "user", NULL }; struct service_t services[] = { { "NULL", { "null", "NULL", 0, }, NULL, NULL, NULL_check_info, NULL_fields_used, "", "", "" }, { "ez-ip", { "ezip", "ez-ip", 0, }, NULL, EZIP_update_entry, EZIP_check_info, EZIP_fields_used, EZIP_DEFAULT_SERVER, EZIP_DEFAULT_PORT, EZIP_REQUEST }, { "justlinux v1.0 (penguinpowered)", { "pgpow", "penguinpowered", 0, }, NULL, PGPOW_update_entry, PGPOW_check_info, PGPOW_fields_used, PGPOW_DEFAULT_SERVER, PGPOW_DEFAULT_PORT, PGPOW_REQUEST }, { "dhs", { "dhs", 0, 0, }, NULL, DHS_update_entry, DHS_check_info, DHS_fields_used, DHS_DEFAULT_SERVER, DHS_DEFAULT_PORT, DHS_REQUEST }, { "dyndns", { "dyndns", 0, 0, }, DYNDNS_init, DYNDNS_update_entry, DYNDNS_check_info, DYNDNS_fields_used, DYNDNS_DEFAULT_SERVER, DYNDNS_DEFAULT_PORT, DYNDNS_REQUEST }, { "dyndns-static", { "dyndns-static", "dyndns-stat", "statdns", }, DYNDNS_init, DYNDNS_update_entry, DYNDNS_check_info, DYNDNS_STAT_fields_used, DYNDNS_DEFAULT_SERVER, DYNDNS_DEFAULT_PORT, DYNDNS_STAT_REQUEST }, { "dyndns-custom", { "dyndns-custom", "mydyndns", 0 }, DYNDNS_init, DYNDNS_update_entry, DYNDNS_check_info, DYNDNS_STAT_fields_used, DYNDNS_DEFAULT_SERVER, DYNDNS_DEFAULT_PORT, DYNDNS_REQUEST }, { "ods", { "ods", 0, 0, }, NULL, ODS_update_entry, ODS_check_info, ODS_fields_used, ODS_DEFAULT_SERVER, ODS_DEFAULT_PORT, ODS_REQUEST }, { "tzo", { "tzo", 0, 0, }, NULL, TZO_update_entry, TZO_check_info, TZO_fields_used, TZO_DEFAULT_SERVER, TZO_DEFAULT_PORT, TZO_REQUEST }, { "easydns", { "easydns", 0, 0, }, NULL, EASYDNS_update_entry, EASYDNS_check_info, EASYDNS_fields_used, EASYDNS_DEFAULT_SERVER, EASYDNS_DEFAULT_PORT, EASYDNS_REQUEST }, { "easydns-partner", { "easydns-partner", 0, 0, }, NULL, EASYDNS_PARTNER_update_entry, EASYDNS_PARTNER_check_info, EASYDNS_PARTNER_fields_used, EASYDNS_PARTNER_DEFAULT_SERVER, EASYDNS_PARTNER_DEFAULT_PORT, EASYDNS_PARTNER_REQUEST }, #ifdef USE_MD5 { "gnudip", { "gnudip", 0, 0, }, NULL, GNUDIP_update_entry, GNUDIP_check_info, GNUDIP_fields_used, GNUDIP_DEFAULT_SERVER, GNUDIP_DEFAULT_PORT, GNUDIP_REQUEST }, #endif { "justlinux v2.0 (penguinpowered)", { "justlinux", 0, 0, }, NULL, JUSTL_update_entry, JUSTL_check_info, JUSTL_fields_used, JUSTL_DEFAULT_SERVER, JUSTL_DEFAULT_PORT, JUSTL_REQUEST }, { "dyns", { "dyns", 0, 0, }, NULL, DYNS_update_entry, DYNS_check_info, DYNS_fields_used, DYNS_DEFAULT_SERVER, DYNS_DEFAULT_PORT, DYNS_REQUEST }, { "hammer node", { "hn", 0, 0, }, NULL, HN_update_entry, HN_check_info, HN_fields_used, HN_DEFAULT_SERVER, HN_DEFAULT_PORT, HN_REQUEST }, { "zoneedit", { "zoneedit", 0, 0, }, NULL, ZONEEDIT_update_entry, ZONEEDIT_check_info, ZONEEDIT_fields_used, ZONEEDIT_DEFAULT_SERVER, ZONEEDIT_DEFAULT_PORT, ZONEEDIT_REQUEST }, { "heipv6tb", { "heipv6tb", 0, 0, }, NULL, HEIPV6TB_update_entry, HEIPV6TB_check_info, HEIPV6TB_fields_used, HEIPV6TB_DEFAULT_SERVER, HEIPV6TB_DEFAULT_PORT, HEIPV6TB_REQUEST }, }; static struct service_t *service = NULL; int options; #define OPT_DEBUG 0x0001 #define OPT_DAEMON 0x0004 #define OPT_QUIET 0x0008 #define OPT_FOREGROUND 0x0010 #define OPT_OFFLINE 0x0020 enum { CMD__start = 1, CMD_service_type, CMD_server, CMD_request, CMD_user, CMD_address, CMD_wildcard, CMD_mx, CMD_max_interval, CMD_url, CMD_host, CMD_cloak_title, CMD_interface, CMD_retrys, CMD_resolv_period, CMD_period, CMD_daemon, CMD_debug, CMD_execute, CMD_foreground, CMD_quiet, CMD_timeout, CMD_run_as_user, CMD_run_as_euser, CMD_connection_type, CMD_cache_file, CMD_notify_email, CMD_pid_file, CMD_offline, CMD_partner, CMD__end }; int conf_handler(struct conf_cmd *cmd, char *arg); static struct conf_cmd conf_commands[] = { { CMD_address, "address", CONF_NEED_ARG, 1, conf_handler, "%s=" }, { CMD_cache_file, "cache-file", CONF_NEED_ARG, 1, conf_handler, "%s=" }, { CMD_cloak_title, "cloak-title", CONF_NEED_ARG, 1, conf_handler, "%s=" }, { CMD_daemon, "daemon", CONF_NO_ARG, 1, conf_handler, "%s=<command>" }, { CMD_execute, "execute", CONF_NEED_ARG, 1, conf_handler, "%s=<shell command>" }, { CMD_debug, "debug", CONF_NO_ARG, 1, conf_handler, "%s" }, { CMD_foreground, "foreground", CONF_NO_ARG, 1, conf_handler, "%s" }, { CMD_pid_file, "pid-file", CONF_NEED_ARG, 1, conf_handler, "%s=<file>" }, { CMD_host, "host", CONF_NEED_ARG, 1, conf_handler, "%s=<host>" }, { CMD_interface, "interface", CONF_NEED_ARG, 1, conf_handler, "%s=<interface>" }, { CMD_mx, "mx", CONF_NEED_ARG, 1, conf_handler, "%s=<mail exchanger>" }, { CMD_max_interval, "max-interval", CONF_NEED_ARG, 1, conf_handler, "%s=<number of seconds between updates>" }, { CMD_notify_email, "notify-email", CONF_NEED_ARG, 1, conf_handler, "%s=<address to email if bad things happen>" }, { CMD_offline, "offline", CONF_NO_ARG, 1, conf_handler, "%s" }, { CMD_retrys, "retrys", CONF_NEED_ARG, 1, conf_handler, "%s=<number of trys>" }, { CMD_server, "server", CONF_NEED_ARG, 1, conf_handler, "%s=<server name>" }, { CMD_service_type, "service-type", CONF_NEED_ARG, 1, conf_handler, "%s=<service type>" }, { CMD_timeout, "timeout", CONF_NEED_ARG, 1, conf_handler, "%s=<sec.millisec>" }, { CMD_resolv_period, "resolv-period", CONF_NEED_ARG, 1, conf_handler, "%s=<time between failed resolve attempts>" }, { CMD_period, "period", CONF_NEED_ARG, 1, conf_handler, "%s=<time between update attempts>" }, { CMD_url, "url", CONF_NEED_ARG, 1, conf_handler, "%s=<url>" }, { CMD_user, "user", CONF_NEED_ARG, 1, conf_handler, "%s=<user name>[:password]" }, { CMD_run_as_user, "run-as-user", CONF_NEED_ARG, 1, conf_handler, "%s=<user>" }, { CMD_run_as_euser, "run-as-euser", CONF_NEED_ARG, 1, conf_handler, "%s=<user> (this is not secure)" }, { CMD_wildcard, "wildcard", CONF_NO_ARG, 1, conf_handler, "%s" }, { CMD_quiet, "quiet", CONF_NO_ARG, 1, conf_handler, "%s" }, { CMD_connection_type, "connection-type", CONF_NEED_ARG, 1, conf_handler, "%s=<connection type>" }, { CMD_request, "request", CONF_NEED_ARG, 1, conf_handler, "%s=<request uri>" }, { CMD_partner, "partner", CONF_NEED_ARG, 1, conf_handler, "%s=<easydns partner>" }, { 0, 0, 0, 0, 0 } }; /**************************************************/ void print_usage( void ); void print_version( void ); void parse_args( int argc, char **argv ); int do_connect(int *sock, char *host, char *port); void base64Encode(char *intext, char *output); int main( int argc, char **argv ); void warn_fields(char **okay_fields); static int is_in_list(char *needle, char **haystack); /**************************************************/ void print_usage( void ) { int i; int width; fprintf(stdout, "usage: "); fprintf(stdout, "%s [options] \n\n", program_name); fprintf(stdout, " Options are:\n"); fprintf(stdout, " -a, --address <ip address>\tstring to send as your ip address\n"); fprintf(stdout, " -b, --cache-file <file>\tfile to use for caching the ipaddress\n"); fprintf(stdout, " -c, --config-file <file>\tconfiguration file, almost all arguments can be\n"); fprintf(stdout, "\t\t\t\tgiven with: <name>[=<value>]\n\t\t\t\tto see a list of possible config commands\n"); fprintf(stdout, "\t\t\t\ttry \"echo help | %s -c -\"\n", program_name); fprintf(stdout, " -d, --daemon\t\t\trun as a daemon periodicly updating if \n\t\t\t\tnecessary\n"); #ifdef DEBUG fprintf(stdout, " -D, --debug\t\t\tturn on debuggin\n"); #endif fprintf(stdout, " -e, --execute <command>\tshell command to execute after a successful\n\t\t\t\tupdate\n"); fprintf(stdout, " -f, --foreground\t\twhen running as a daemon run in the foreground\n"); fprintf(stdout, " -F, --pidfile <file>\t\tuse <file> as a pid file\n"); fprintf(stdout, " -g, --request-uri <uri>\tURI to send updates to\n"); fprintf(stdout, " -h, --host <host>\t\tstring to send as host parameter\n"); fprintf(stdout, " -i, --interface <iface>\twhich interface to use\n"); fprintf(stdout, " -L, --cloak_title <host>\tsome stupid thing for DHS only\n"); fprintf(stdout, " -m, --mx <mail exchange>\tstring to send as your mail exchange\n"); fprintf(stdout, " -M, --max-interval <# of sec>\tmax time in between updates\n"); fprintf(stdout, " -N, --notify-email <email>\taddress to send mail to if bad things happen\n"); fprintf(stdout, " -o, --offline\t\t\tset to off line mode\n"); fprintf(stdout, " -p, --resolv-period <sec>\tperiod to check IP if it can't be resolved\n"); fprintf(stdout, " -P, --period <# of sec>\tperiod to check IP in daemon \n\t\t\t\tmode (default: 1800 seconds)\n"); fprintf(stdout, " -q, --quiet \t\t\tbe quiet\n"); fprintf(stdout, " -r, --retrys <num>\t\tnumber of trys (default: 1)\n"); fprintf(stdout, " -R, --run-as-user <user>\tchange to <user> for running, be ware\n\t\t\t\tthat this can cause problems with handeling\n\t\t\t\tSIGHUP properly if that user can't read the\n\t\t\t\tconfig file. also it can't write it's pid file \n\t\t\t\tto a root directory\n"); fprintf(stdout, " -Q, --run-as-euser <user>\tchange to effective <user> for running, \n\t\t\t\tthis is NOT secure but it does solve the \n\t\t\t\tproblems with run-as-user and config files and \n\t\t\t\tpid files.\n"); fprintf(stdout, " -s, --server <server[:port]>\tthe server to connect to\n"); fprintf(stdout, " -S, --service-type <server>\tthe type of service that you are using\n"); width = fprintf(stdout, "\t\t\t\ttry one of: ") + 4*7; for(i=0; i<ARRAY_LEN(services); i++) { if(width > 60) { width = fprintf(stdout, "\n\t\t\t\t") -1 + 4*7; } width += fprintf(stdout, "%s ", services[i].names[0]); } fprintf(stdout, "\n"); fprintf(stdout, " -t, --timeout <sec.millisec>\tthe amount of time to wait on I/O\n"); fprintf(stdout, " -T, --connection-type <num>\tnumber sent to TZO as your connection \n\t\t\t\ttype (default: 1)\n"); fprintf(stdout, " -U, --url <url>\t\tstring to send as the url parameter\n"); fprintf(stdout, " -u, --user <user[:passwd]>\tuser ID and password, if either is left blank \n\t\t\t\tthey will be prompted for\n"); fprintf(stdout, " -w, --wildcard\t\tset your domain to have a wildcard alias\n"); fprintf(stdout, " -z, --partner <partner>\tspecify easyDNS partner (for easydns-partner \n\t\t\t\tservices)\n"); fprintf(stdout, " --help\t\t\tdisplay this help and exit\n"); fprintf(stdout, " --version\t\t\toutput version information and exit\n"); fprintf(stdout, " --credits\t\t\tprint the credits and exit\n"); fprintf(stdout, " --signalhelp\t\tprint help about signals\n"); fprintf(stdout, "\n"); } void print_version( void ) { fprintf(stdout, "%s: - %s - $Id: ez-ipupdate.c,v 1.48 2001/07/17 00:49:41 amackay Exp $\n", program_name, VERSION); } void print_credits( void ) { fprintf( stdout, "AUTHORS / CONTRIBUTORS\n" " Angus Mackay <amackay@gusnet.cx>\n" " Jeremy Bopp <jbopp@mail.utexas.edu>\n" " Mark Jeftovic <markjr@easydns.com>\n" " Stefaan Ponnet <webmaster@dyns.cx>\n" " Colin Viebrock <colin@easydns.com>\n" " Tim Brown <timb@machine.org.uk>\n" "\n" ); } void print_signalhelp( void ) { fprintf(stdout, "\nsignals are only really used when in daemon mode.\n\n"); fprintf(stdout, "signals: \n"); fprintf(stdout, " HUP\t\tcauses it to re-read its config file\n"); fprintf(stdout, " TERM\t\twake up and possibly perform an update\n"); fprintf(stdout, " QUIT\t\tshutdown\n"); fprintf(stdout, "\n"); } #if HAVE_SIGNAL_H RETSIGTYPE sigint_handler(int sig) { char message[] = "interupted.\n"; close(client_sockfd); write(2, message, sizeof(message)-1); #if HAVE_GETPID if(pid_file) { pid_file_delete(pid_file); } #endif exit(1); } RETSIGTYPE generic_sig_handler(int sig) { last_sig = sig; } #endif int get_duration(char *str) { char *multchar; int mult; char save; int duration; for(multchar=str; *multchar != '\0'; multchar++); if(multchar != str) { multchar--; } if(*multchar == '\0' || isdigit(*multchar)) { mult = 1; multchar++; } else if(*multchar == 'M') { mult = 60; } else if(*multchar == 'H') { mult = 60*60; } else if(*multchar == 'd') { mult = 60*60*24; } else if(*multchar == 'w') { mult = 60*60*24*7; } else if(*multchar == 'f') { mult = 60*60*24*7*2; } else if(*multchar == 'm') { mult = 60*60*24*30; } else if(*multchar == 'y') { mult = 60*60*24*365; } else { fprintf(stderr, "invalid multiplier: %c\n", *multchar); fprintf(stderr, "valid multipliers:\n"); fprintf(stderr, " %c -> %s (%d)\n", 'M', "Minute", 60); fprintf(stderr, " %c -> %s (%d)\n", 'H', "Hour", 60*60); fprintf(stderr, " %c -> %s (%d)\n", 'd', "day", 60*60*24); fprintf(stderr, " %c -> %s (%d)\n", 'w', "week", 60*60*24*7); fprintf(stderr, " %c -> %s (%d)\n", 'f', "fortnight", 60*60*24*7*2); fprintf(stderr, " %c -> %s (%d)\n", 'm', "month", 60*60*24*30); fprintf(stderr, " %c -> %s (%d)\n", 'y', "year", 60*60*24*365); exit(1); } save = *multchar; *multchar = '\0'; duration = strtol(str, NULL, 0) * mult; *multchar = save; return(duration); } const char* format_time(int seconds) { static char buf[16]; snprintf(buf, sizeof(buf), "%d:%02d:%02d", seconds/(3600), (seconds%(3600))/(60), (seconds%60)); return(buf); } /* * like "chomp" in perl, take off trailing newline chars */ char *chomp(char *buf) { char *p; for(p=buf; *p != '\0'; p++); if(p != buf) { p--; } while(p>=buf && (*p == '\n' || *p == '\r')) { *p-- = '\0'; } return(buf); } /* * show_message * * if we are running in daemon mode then log to syslog, if not just output to * stderr. * */ void show_message(char *fmt, ...) { va_list args; va_start(args, fmt); if(options & OPT_DAEMON && !(options & OPT_FOREGROUND)) { char buf[MAX_MESSAGE_LEN]; #if defined(HAVE_VSPRINTF) || defined(HAVE_VSNPRINTF) vsnprintf(buf, sizeof(buf), fmt, args); #else sprintf(buf, "message incomplete because your OS sucks: %s\n", fmt); #endif syslog(LOG_NOTICE, buf); } else { #ifdef HAVE_VFPRINTF vfprintf(stderr, fmt, args); #else fprintf(stderr, "message incomplete because your OS sucks: %s\n", fmt); #endif } va_end(args); } /* * returns true if the string passed in is an internet address in dotted quad * notation. */ int is_dotted_quad(char *addr) { int q[4]; char *p; int i; if(sscanf(addr, "%d.%d.%d.%d", &(q[0]), &(q[1]), &(q[2]), &(q[3])) != 4) { return(0); } if(q[0] > 255 || q[0] < 0 || q[1] > 255 || q[1] < 0 || q[2] > 255 || q[2] < 0 || q[3] > 255 || q[3] < 0) { return(0); } /* we know there are 3 dots */ p = addr; if(p != NULL) { p = strchr(p, '.'); p++; } if(p != NULL) { p = strchr(p, '.'); p++; } if(p != NULL) { p = strchr(p, '.'); } for(i=0; *p != '\0' && i<4; i++, p++); if(*p != '\0') { return(0); } return(1); } void parse_service(char *str) { int i; int width; for(i=0; i<ARRAY_LEN(services); i++) { int j; for(j=0; j<ARRAY_LEN(services[i].names) && services[i].names[j] != NULL; j++) { if(strcmp(services[i].names[j], str) == 0) { service = &(services[i]); return; } } } fprintf(stderr, "unknown service type: %s\n", str); fprintf(stderr, "try one of: \n"); width = fprintf(stderr, " "); for(i=0; i<ARRAY_LEN(services); i++) { if(width > 60) { width = fprintf(stderr, "\n ") -1; } width += fprintf(stderr, "%s ", services[i].names[0]); } fprintf(stderr, "\n"); exit(1); } int option_handler(int id, char *optarg) { #if HAVE_PWD_H && HAVE_GRP_H struct passwd *pw; #endif char *tmp; int i; switch(id) { case CMD_address: if(address) { free(address); } address = strdup(optarg); dprintf((stderr, "address: %s\n", address)); break; case CMD_daemon: options |= OPT_DAEMON; dprintf((stderr, "daemon mode\n")); break; case CMD_debug: #ifdef DEBUG options |= OPT_DEBUG; dprintf((stderr, "debugging on\n")); #else fprintf(stderr, "debugging was not enabled at compile time\n"); #endif break; case CMD_execute: #if defined(HAVE_WAITPID) || defined(HAVE_WAIT) if(post_update_cmd) { free(post_update_cmd); } post_update_cmd = malloc(strlen(optarg) + 1 + ARGLENGTH + 1); post_update_cmd_arg = post_update_cmd + strlen(optarg) + 1; sprintf(post_update_cmd, "%s ", optarg); dprintf((stderr, "post_update_cmd: %s\n", post_update_cmd)); #else fprintf(stderr, "command execution not enabled at compile time\n"); exit(1); #endif break; case CMD_foreground: options |= OPT_FOREGROUND; dprintf((stderr, "fork()ing off\n")); break; case CMD_pid_file: #if HAVE_GETPID if(pid_file) { free(pid_file); } pid_file = strdup(optarg); dprintf((stderr, "pid file: %s\n", pid_file)); #else fprintf(stderr, "pid file support not enabled at compile time\n"); #endif break; case CMD_host: if(host) { free(host); } host = strdup(optarg); dprintf((stderr, "host: %s\n", host)); break; case CMD_interface: #ifdef IF_LOOKUP if(interface) { free(interface); } interface = strdup(optarg); dprintf((stderr, "interface: %s\n", interface)); #else fprintf(stderr, "interface lookup not enabled at compile time\n"); exit(1); #endif break; case CMD_mx: if(mx) { free(mx); } mx = strdup(optarg); dprintf((stderr, "mx: %s\n", mx)); break; case CMD_max_interval: max_interval = get_duration(optarg); if(max_interval < MIN_MAXINTERVAL) { fprintf(stderr, "WARNING: max-interval of %d is too short, using %d\n", max_interval, MIN_MAXINTERVAL); max_interval = MIN_MAXINTERVAL; } dprintf((stderr, "max_interval: %d\n", max_interval)); break; case CMD_notify_email: if(notify_email) { free(notify_email); } notify_email = strdup(optarg); dprintf((stderr, "notify_email: %s\n", notify_email)); break; case CMD_offline: options |= OPT_OFFLINE; dprintf((stderr, "offline mode\n")); break; case CMD_period: update_period = get_duration(optarg); if(update_period < MIN_UPDATE_PERIOD) { fprintf(stderr, "WARNING: period of %d is too short, using %d\n", update_period, MIN_UPDATE_PERIOD); update_period = MIN_UPDATE_PERIOD; } dprintf((stderr, "update_period: %d\n", update_period)); break; case CMD_resolv_period: resolv_period = get_duration(optarg); if(resolv_period < 1) { fprintf(stderr, "WARNING: period of %d is too short, using %d\n", resolv_period, 1); resolv_period = 1; } dprintf((stderr, "resolv_period: %d\n", resolv_period)); break; case CMD_quiet: options |= OPT_QUIET; dprintf((stderr, "quiet mode\n")); break; case CMD_retrys: ntrys = atoi(optarg); dprintf((stderr, "ntrys: %d\n", ntrys)); break; case CMD_server: if(server) { free(server); } server = strdup(optarg); tmp = strchr(server, ':'); if(tmp) { *tmp++ = '\0'; if(port) { free(port); } port = strdup(tmp); } dprintf((stderr, "server: %s\n", server)); dprintf((stderr, "port: %s\n", port)); break; case CMD_request: if(request_over_ride) { free(request_over_ride); } request_over_ride = strdup(optarg); dprintf((stderr, "request_over_ride: %s\n", request_over_ride)); break; case CMD_partner: if(partner) { free(partner); } partner = strdup(optarg); dprintf((stderr, "easyDNS partner: %s\n", partner)); break; case CMD_service_type: parse_service(optarg); service_set = 1; dprintf((stderr, "service_type: %s\n", service->title)); dprintf((stderr, "service->name: %s\n", service->names[0])); break; case CMD_user: strncpy(user, optarg, sizeof(user)); user[sizeof(user)-1] = '\0'; dprintf((stderr, "user: %s\n", user)); tmp = strchr(optarg, ':'); if(tmp) { tmp++; while(*tmp) { *tmp++ = '*'; } } break; case CMD_run_as_user: #if HAVE_PWD_H && HAVE_GRP_H if((pw=getpwnam(optarg)) == NULL) { i = atoi(optarg); } else { if(setgid(pw->pw_gid) != 0) { fprintf(stderr, "error changing group id\n"); } dprintf((stderr, "GID now %d\n", pw->pw_gid)); i = pw->pw_uid; } if(setuid(i) != 0) { fprintf(stderr, "error changing user id\n"); } dprintf((stderr, "UID now %d\n", i)); #else fprintf(stderr, "option \"daemon-user\" not supported on this system\n"); #endif break; case CMD_run_as_euser: #if HAVE_PWD_H && HAVE_GRP_H && HAVE_SETEUID && HAVE_SETEGID if((pw=getpwnam(optarg)) == NULL) { i = atoi(optarg); } else { if(setegid(pw->pw_gid) != 0) { fprintf(stderr, "error changing group id\n"); } dprintf((stderr, "GID now %d\n", pw->pw_gid)); i = pw->pw_uid; } if(seteuid(i) != 0) { fprintf(stderr, "error changing user id\n"); } dprintf((stderr, "UID now %d\n", i)); #else fprintf(stderr, "option \"daemon-euser\" not supported on this system\n"); #endif break; case CMD_url: if(url) { free(url); } url = strdup(optarg); dprintf((stderr, "url: %s\n", url)); break; case CMD_wildcard: wildcard = 1; dprintf((stderr, "wildcard: %d\n", wildcard)); break; case CMD_cloak_title: if(cloak_title) { free(cloak_title); } cloak_title = strdup(optarg); dprintf((stderr, "cloak_title: %s\n", cloak_title)); break; case CMD_timeout: timeout.tv_sec = atoi(optarg); timeout.tv_usec = (atof(optarg) - timeout.tv_sec) * 1000000L; dprintf((stderr, "timeout: %ld.%06ld\n", timeout.tv_sec, timeout.tv_usec)); break; case CMD_connection_type: connection_type = atoi(optarg); dprintf((stderr, "connection_type: %d\n", connection_type)); break; case CMD_cache_file: if(cache_file) { free(cache_file); } cache_file = strdup(optarg); dprintf((stderr, "cache_file: %s\n", cache_file)); break; default: dprintf((stderr, "case not handled: %d\n", id)); break; } return 0; } int conf_handler(struct conf_cmd *cmd, char *arg) { return(option_handler(cmd->id, arg)); } #ifdef HAVE_GETOPT_LONG # define xgetopt( x1, x2, x3, x4, x5 ) getopt_long( x1, x2, x3, x4, x5 ) #else # define xgetopt( x1, x2, x3, x4, x5 ) getopt( x1, x2, x3 ) #endif void parse_args( int argc, char **argv ) { #ifdef HAVE_GETOPT_LONG struct option long_options[] = { {"address", required_argument, 0, 'a'}, {"cache-file", required_argument, 0, 'b'}, {"config_file", required_argument, 0, 'c'}, {"config-file", required_argument, 0, 'c'}, {"daemon", no_argument, 0, 'd'}, {"debug", no_argument, 0, 'D'}, {"execute", required_argument, 0, 'e'}, {"foreground", no_argument, 0, 'f'}, {"pid-file", required_argument, 0, 'F'}, {"host", required_argument, 0, 'h'}, {"interface", required_argument, 0, 'i'}, {"cloak_title", required_argument, 0, 'L'}, {"mx", required_argument, 0, 'm'}, {"max-interval", required_argument, 0, 'M'}, {"notify-email", required_argument, 0, 'N'}, {"resolv-period", required_argument, 0, 'p'}, {"period", required_argument, 0, 'P'}, {"quiet", no_argument, 0, 'q'}, {"retrys", required_argument, 0, 'r'}, {"run-as-user", required_argument, 0, 'R'}, {"run-as-euser", required_argument, 0, 'Q'}, {"server", required_argument, 0, 's'}, {"service-type", required_argument, 0, 'S'}, {"timeout", required_argument, 0, 't'}, {"connection-type", required_argument, 0, 'T'}, {"url", required_argument, 0, 'U'}, {"user", required_argument, 0, 'u'}, {"wildcard", no_argument, 0, 'w'}, {"help", no_argument, 0, 'H'}, {"version", no_argument, 0, 'V'}, {"credits", no_argument, 0, 'C'}, {"signalhelp", no_argument, 0, 'Z'}, {0,0,0,0} }; #else # define long_options NULL #endif int opt; while((opt=xgetopt(argc, argv, "a:b:c:dDe:fF:g:h:i:L:m:M:N:o:p:P:qQ:r:R:s:S:t:T:U:u:wHVCZz:", long_options, NULL)) != -1) { switch (opt) { case 'a': option_handler(CMD_address, optarg); break; case 'b': option_handler(CMD_cache_file, optarg); break; case 'c': if(config_file) { free(config_file); } config_file = strdup(optarg); dprintf((stderr, "config_file: %s\n", config_file)); if(config_file) { if(parse_conf_file(config_file, conf_commands) != 0) { fprintf(stderr, "error parsing config file \"%s\"\n", config_file); exit(1); } } break; case 'd': option_handler(CMD_daemon, optarg); break; case 'D': option_handler(CMD_debug, optarg); break; case 'e': option_handler(CMD_execute, optarg); break; case 'f': option_handler(CMD_foreground, optarg); break; case 'F': option_handler(CMD_pid_file, optarg); break; case 'g': option_handler(CMD_request, optarg); break; case 'h': option_handler(CMD_host, optarg); break; case 'i': option_handler(CMD_interface, optarg); break; case 'L': option_handler(CMD_cloak_title, optarg); break; case 'm': option_handler(CMD_mx, optarg); break; case 'M': option_handler(CMD_max_interval, optarg); break; case 'N': option_handler(CMD_notify_email, optarg); break; case 'o': option_handler(CMD_offline, optarg); break; case 'p': option_handler(CMD_resolv_period, optarg); break; case 'P': option_handler(CMD_period, optarg); break; case 'q': option_handler(CMD_quiet, optarg); break; case 'Q': option_handler(CMD_run_as_euser, optarg); break; case 'r': option_handler(CMD_retrys, optarg); break; case 'R': option_handler(CMD_run_as_user, optarg); break; case 's': option_handler(CMD_server, optarg); break; case 'S': option_handler(CMD_service_type, optarg); break; case 't': option_handler(CMD_timeout, optarg); break; case 'T': option_handler(CMD_connection_type, optarg); break; case 'u': option_handler(CMD_user, optarg); break; case 'U': option_handler(CMD_url, optarg); break; case 'w': option_handler(CMD_wildcard, optarg); break; case 'H': print_usage(); exit(0); break; case 'V': print_version(); exit(0); break; case 'C': print_credits(); exit(0); break; case 'Z': print_signalhelp(); exit(0); break; case 'z': option_handler(CMD_partner, optarg); break; default: #ifdef HAVE_GETOPT_LONG fprintf(stderr, "Try `%s --help' for more information\n", argv[0]); #else fprintf(stderr, "Try `%s -H' for more information\n", argv[0]); fprintf(stderr, "warning: this program was compilied without getopt_long\n"); fprintf(stderr, " as such all long options will not work!\n"); #endif exit(1); break; } } } /* * do_connect * * connect a socket and return the file descriptor * */ int do_connect(int *sock, char *host, char *port) { struct sockaddr_in address; int len; int result; struct hostent *hostinfo; struct servent *servinfo; // set up the socket if((*sock=socket(AF_INET, SOCK_STREAM, 0)) == -1) { if(!(options & OPT_QUIET)) { perror("socket"); } return(-1); } address.sin_family = AF_INET; // get the host address hostinfo = gethostbyname(host); if(!hostinfo) { if(!(options & OPT_QUIET)) { herror("gethostbyname"); } close(*sock); return(-1); } address.sin_addr = *(struct in_addr *)*hostinfo -> h_addr_list; // get the host port servinfo = getservbyname(port, "tcp"); if(servinfo) { address.sin_port = servinfo -> s_port; } else { address.sin_port = htons(atoi(port)); } // connect the socket len = sizeof(address); if((result=connect(*sock, (struct sockaddr *)&address, len)) == -1) { if(!(options & OPT_QUIET)) { perror("connect"); } close(*sock); return(-1); } // print out some info if(!(options & OPT_QUIET)) { fprintf(stderr, "connected to %s (%s) on port %d.\n", host, inet_ntoa(address.sin_addr), ntohs(address.sin_port)); } return 0; } static char table64[]= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; void base64Encode(char *intext, char *output) { unsigned char ibuf[3]; unsigned char obuf[4]; int i; int inputparts; while(*intext) { for (i = inputparts = 0; i < 3; i++) { if(*intext) { inputparts++; ibuf[i] = *intext; intext++; } else ibuf[i] = 0; } obuf [0] = (ibuf [0] & 0xFC) >> 2; obuf [1] = ((ibuf [0] & 0x03) << 4) | ((ibuf [1] & 0xF0) >> 4); obuf [2] = ((ibuf [1] & 0x0F) << 2) | ((ibuf [2] & 0xC0) >> 6); obuf [3] = ibuf [2] & 0x3F; switch(inputparts) { case 1: /* only one byte read */ sprintf(output, "%c%c==", table64[obuf[0]], table64[obuf[1]]); break; case 2: /* two bytes read */ sprintf(output, "%c%c%c=", table64[obuf[0]], table64[obuf[1]], table64[obuf[2]]); break; default: sprintf(output, "%c%c%c%c", table64[obuf[0]], table64[obuf[1]], table64[obuf[2]], table64[obuf[3]] ); break; } output += 4; } *output=0; } #if IF_LOOKUP # if !defined(HAVE_INET_ATON) # if defined(HAVE_INET_ADDR) int inet_aton(const char *cp, struct in_addr *inp) { (*inp).s_addr = inet_addr(cp); } # else # error "sorry, can't compile with IF_LOOKUP and no inet_aton" # endif #endif #endif void output(void *buf) { fd_set writefds; int max_fd; struct timeval tv; int ret; dprintf((stderr, "I say: %s\n", (char *)buf)); // set up our fdset and timeout FD_ZERO(&writefds); FD_SET(client_sockfd, &writefds); max_fd = client_sockfd; memcpy(&tv, &timeout, sizeof(struct timeval)); ret = select(max_fd + 1, NULL, &writefds, NULL, &tv); dprintf((stderr, "ret: %d\n", ret)); if(ret == -1) { dprintf((stderr, "select: %s\n", error_string)); } else if(ret == 0) { fprintf(stderr, "timeout\n"); } else { /* if we woke up on client_sockfd do the data passing */ if(FD_ISSET(client_sockfd, &writefds)) { if(send(client_sockfd, buf, strlen(buf), 0) == -1) { fprintf(stderr, "error send()ing request: %s\n", error_string); } } else { dprintf((stderr, "error: case not handled.")); } } } int read_input(char *buf, int len) { fd_set readfds; int max_fd; struct timeval tv; int ret; int bread = -1; // set up our fdset and timeout FD_ZERO(&readfds); FD_SET(client_sockfd, &readfds); max_fd = client_sockfd; memcpy(&tv, &timeout, sizeof(struct timeval)); ret = select(max_fd + 1, &readfds, NULL, NULL, &tv); dprintf((stderr, "ret: %d\n", ret)); if(ret == -1) { dprintf((stderr, "select: %s\n", error_string)); } else if(ret == 0) { fprintf(stderr, "timeout\n"); } else { /* if we woke up on client_sockfd do the data passing */ if(FD_ISSET(client_sockfd, &readfds)) { bread = recv(client_sockfd, buf, len-1, 0); dprintf((stderr, "bread: %d\n", bread)); buf[bread] = '\0'; dprintf((stderr, "got: %s\n", buf)); if(bread == -1) { fprintf(stderr, "error recv()ing reply: %s\n", error_string); } } else { dprintf((stderr, "error: case not handled.")); } } return(bread); } int get_if_addr(int sock, char *name, struct sockaddr_in *sin) { #ifdef IF_LOOKUP struct ifreq ifr; memset(&ifr, 0, sizeof(ifr)); strcpy(ifr.ifr_name, name); /* why does this need to be done twice? */ if(ioctl(sock, SIOCGIFADDR, &ifr) < 0) { perror("ioctl(SIOCGIFADDR)"); memset(sin, 0, sizeof(struct sockaddr_in)); dprintf((stderr, "%s: %s\n", name, "unknown interface")); return -1; } if(ioctl(sock, SIOCGIFADDR, &ifr) < 0) { perror("ioctl(SIOCGIFADDR)"); memset(sin, 0, sizeof(struct sockaddr_in)); dprintf((stderr, "%s: %s\n", name, "unknown interface")); return -1; } if(ifr.ifr_addr.sa_family == AF_INET) { memcpy(sin, &(ifr.ifr_addr), sizeof(struct sockaddr_in)); dprintf((stderr, "%s: %s\n", name, inet_ntoa(sin->sin_addr))); return 0; } else { memset(sin, 0, sizeof(struct sockaddr_in)); dprintf((stderr, "%s: %s\n", name, "could not resolve interface")); return -1; } return -1; #else return -1; #endif } static int PGPOW_read_response(char *buf) { int bytes; bytes = read_input(buf, BUFFER_SIZE); if(bytes < 1) { close(client_sockfd); return(-1); } buf[bytes] = '\0'; dprintf((stderr, "server says: %s\n", buf)); if(strncmp("OK", buf, 2) != 0) { return(1); } else { return(0); } } static int ODS_read_response(char *buf, int len) { int bytes = 0; int bread = 0; char* p = buf; int max_iter = 32; for(; bytes < len && max_iter > 0; max_iter--) { bread = read_input(p, len-bytes); bytes += bread; if(bytes < 1) { close(client_sockfd); return(-1); } if(strstr(buf, "\r\n") > 0) { break; } dprintf((stderr, "server says: %s\n", p)); p += bread; } dprintf((stderr, "server said: %s\n", buf)); return(atoi(buf)); } int NULL_check_info(void) { char buf[64]; if(options & OPT_DAEMON) { fprintf(stderr, "no compile time default service was set therefor you must " "specify a service type.\n"); return(-1); } printf("service: "); *buf = '\0'; fgets(buf, sizeof(buf), stdin); chomp(buf); option_handler(CMD_service_type, buf); return(0); } int EZIP_check_info(void) { warn_fields(service->fields_used); return 0; } int EZIP_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?mode=update&", request); output(buf); if(address) { snprintf(buf, BUFFER_SIZE, "%s=%s&", "ipaddress", address); output(buf); } snprintf(buf, BUFFER_SIZE, "%s=%s&", "wildcard", wildcard ? "yes" : "no"); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s&", "mx", mx); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s&", "url", url); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s&", "host", host); 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(!(options & OPT_QUIET)) { printf("request successful\n"); } 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); fprintf(stderr, "server response: %s\n", auth); } return(UPDATERES_ERROR); break; } return(UPDATERES_OK); } void DYNDNS_init(void) { if(options & OPT_DAEMON) { if(!(max_interval > 0)) { max_interval = DYNDNS_MAX_INTERVAL; } } } int DYNDNS_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(address != NULL && !is_dotted_quad(address)) { fprintf(stderr, "the IP address \"%s\" is invalid\n", address); return(-1); } 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 DYNDNS_update_entry(void) { char buf[BUFFER_SIZE+1]; char *bp = buf; int bytes; int btot; int ret; int retval = UPDATERES_OK; 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?", request); output(buf); if(is_in_list("dyndns-static", service->names)) { snprintf(buf, BUFFER_SIZE, "%s=%s&", "system", "statdns"); output(buf); } else if(is_in_list("dyndns-custom", service->names)) { snprintf(buf, BUFFER_SIZE, "%s=%s&", "system", "custom"); output(buf); } snprintf(buf, BUFFER_SIZE, "%s=%s&", "hostname", host); output(buf); if(address != NULL) { snprintf(buf, BUFFER_SIZE, "%s=%s&", "myip", address); output(buf); } snprintf(buf, BUFFER_SIZE, "%s=%s&", "wildcard", wildcard ? "ON" : "OFF"); output(buf); if(mx != NULL && *mx != '\0') { snprintf(buf, BUFFER_SIZE, "%s=%s&", "mx", mx); output(buf); } //snprintf(buf, BUFFER_SIZE, "%s=%s&", "backmx", "NO"); //output(buf); if(options & OPT_OFFLINE) { snprintf(buf, BUFFER_SIZE, "%s=%s&", "offline", "yes"); 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"); } retval = UPDATERES_ERROR; break; case 200: if(strstr(buf, "\ngood ") != NULL) { if(!(options & OPT_QUIET)) { printf("request successful\n"); } } else { if(strstr(buf, "\nnohost") != NULL) { show_message("invalid hostname: %s\n", host); retval = UPDATERES_SHUTDOWN; } else if(strstr(buf, "\nnotfqdn") != NULL) { show_message("malformed hostname: %s\n", host); retval = UPDATERES_SHUTDOWN; } else if(strstr(buf, "\n!yours") != NULL) { show_message("host \"%s\" is not under your control\n", host); retval = UPDATERES_SHUTDOWN; } else if(strstr(buf, "\nabuse") != NULL) { show_message("host \"%s\" has been blocked for abuse\n", host); retval = UPDATERES_SHUTDOWN; } else if(strstr(buf, "\nnochg") != NULL) { show_message("%s says that your IP address has not changed since the last update\n", server); // lets say that this counts as a successful update // but we'll roll back the last update time to max_interval/2 if(max_interval > 0) { last_update = time(NULL) - max_interval/2; } retval = UPDATERES_OK; } else if(strstr(buf, "\nbadauth") != NULL) { show_message("authentication failure\n"); retval = UPDATERES_SHUTDOWN; } else if(strstr(buf, "\nbadsys") != NULL) { show_message("invalid system parameter\n"); retval = UPDATERES_SHUTDOWN; } else if(strstr(buf, "\nbadagent") != NULL) { show_message("this useragent has been blocked\n"); retval = UPDATERES_SHUTDOWN; } else if(strstr(buf, "\nnumhost") != NULL) { show_message("Too many or too few hosts found\n"); retval = UPDATERES_SHUTDOWN; } else if(strstr(buf, "\ndnserr") != NULL) { char *p = strstr(buf, "\ndnserr"); show_message("dyndns internal error, please report this number to " "their support people: %s\n", N_STR(p)); retval = UPDATERES_ERROR; } else if(strstr(buf, "\n911") != NULL) { show_message("Ahhhh! call 911!\n"); retval = UPDATERES_SHUTDOWN; } else if(strstr(buf, "\n999") != NULL) { show_message("Ahhhh! call 999!\n"); retval = UPDATERES_SHUTDOWN; } else if(strstr(buf, "\n!donator") != NULL) { show_message("a feature requested is only available to donators, please donate.\n", host); retval = UPDATERES_OK; } // this one should be last as it is a stupid string to signify waits // with as it is so short else if(strstr(buf, "\nw") != NULL) { int howlong = 0; char *p = strstr(buf, "\nw"); char reason[256]; char mult; // get time and reason if(strlen(p) >= 2) { sscanf(p, "%d%c %255[^\r\n]", &howlong, &mult, reason); if(mult == 'h') { howlong *= 3600; } else if(mult == 'm') { howlong *= 60; } if(howlong > MAX_WAITRESPONSE_WAIT) { howlong = MAX_WAITRESPONSE_WAIT; }; } else { sprintf(reason, "problem parsing reason for wait response"); } show_message("Wait response received, waiting for %s before next update.\n", format_time(howlong)); show_message("Wait response reason: %d\n", N_STR(reason)); sleep(howlong); retval = UPDATERES_ERROR; } else { show_message("error processing request\n"); if(!(options & OPT_QUIET)) { fprintf(stderr, "==== server output: ====\n%s\n", buf); } retval = UPDATERES_ERROR; } } break; case 401: if(!(options & OPT_QUIET)) { show_message("authentication failure\n"); } retval = 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); fprintf(stderr, "server response: %s\n", auth); } retval = UPDATERES_ERROR; break; } return(retval); } int PGPOW_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 PGPOW_update_entry(void) { char buf[BUFFER_SIZE+1]; 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); } /* read server message */ if(PGPOW_read_response(buf) != 0) { show_message("strange server response, are you connecting to the right server?\n"); close(client_sockfd); return(UPDATERES_ERROR); } /* send version command */ snprintf(buf, BUFFER_SIZE, "VER %s [%s-%s %s (%s)]\015\012", PGPOW_VERSION, "ez-update", VERSION, OS, "by Angus Mackay"); output(buf); if(PGPOW_read_response(buf) != 0) { if(strncmp("ERR", buf, 3) == 0) { show_message("error talking to server: %s\n", &(buf[3])); } else { show_message("error talking to server:\n\t%s\n", buf); } close(client_sockfd); return(UPDATERES_ERROR); } /* send user command */ snprintf(buf, BUFFER_SIZE, "USER %s\015\012", user_name); output(buf); if(PGPOW_read_response(buf) != 0) { if(strncmp("ERR", buf, 3) == 0) { show_message("error talking to server: %s\n", &(buf[3])); } else { show_message("error talking to server:\n\t%s\n", buf); } close(client_sockfd); return(UPDATERES_ERROR); } /* send pass command */ snprintf(buf, BUFFER_SIZE, "PASS %s\015\012", password); output(buf); if(PGPOW_read_response(buf) != 0) { if(strncmp("ERR", buf, 3) == 0) { show_message("error talking to server: %s\n", &(buf[3])); } else { show_message("error talking to server:\n\t%s\n", buf); } close(client_sockfd); return(UPDATERES_ERROR); } /* send host command */ snprintf(buf, BUFFER_SIZE, "HOST %s\015\012", host); output(buf); if(PGPOW_read_response(buf) != 0) { if(strncmp("ERR", buf, 3) == 0) { show_message("error talking to server: %s\n", &(buf[3])); } else { show_message("error talking to server:\n\t%s\n", buf); } close(client_sockfd); return(UPDATERES_ERROR); } /* send oper command */ snprintf(buf, BUFFER_SIZE, "OPER %s\015\012", request); output(buf); if(PGPOW_read_response(buf) != 0) { if(strncmp("ERR", buf, 3) == 0) { show_message("error talking to server: %s\n", &(buf[3])); } else { show_message("error talking to server:\n\t%s\n", buf); } close(client_sockfd); return(UPDATERES_ERROR); } if(strcmp("update", request) == 0) { /* send ip command */ snprintf(buf, BUFFER_SIZE, "IP %s\015\012", address); output(buf); if(PGPOW_read_response(buf) != 0) { if(strncmp("ERR", buf, 3) == 0) { show_message("error talking to server: %s\n", &(buf[3])); } else { show_message("error talking to server:\n\t%s\n", buf); } close(client_sockfd); return(UPDATERES_ERROR); } } /* send done command */ snprintf(buf, BUFFER_SIZE, "DONE\015\012"); output(buf); if(PGPOW_read_response(buf) != 0) { if(strncmp("ERR", buf, 3) == 0) { show_message("error talking to server: %s\n", &(buf[3])); } else { show_message("error talking to server:\n\t%s\n", buf); } close(client_sockfd); return(UPDATERES_ERROR); } if(!(options & OPT_QUIET)) { printf("request successful\n"); } close(client_sockfd); return(UPDATERES_OK); } int DHS_check_info(void) { char buf[BUFSIZ+1]; if((host == NULL) || (*host == '\0')) { if(options & OPT_DAEMON) { return(-1); } if(host) { free(host); } printf("host: "); 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; } /* * grrrrr, it seems that dhs.org requires us to use POST * also DHS doesn't update both the mx record and the address at the same * time, this service really stinks. go with justlinix.com (penguinpowered) * instead, the only advantage is short host names. */ int DHS_update_entry(void) { char buf[BUFFER_SIZE+1]; char putbuf[BUFFER_SIZE+1]; char *bp = buf; int bytes; int btot; int ret; char *domain = NULL; char *hostname = NULL; char *p; int limit; int retval = UPDATERES_OK; buf[BUFFER_SIZE] = '\0'; putbuf[BUFFER_SIZE] = '\0'; /* parse apart the domain and hostname */ hostname = strdup(host); if((p=strchr(hostname, '.')) == NULL) { if(!(options & OPT_QUIET)) { show_message("error parsing hostname from host %s\n", host); } return(UPDATERES_ERROR); } *p = '\0'; p++; if(*p == '\0') { if(!(options & OPT_QUIET)) { show_message("error parsing domain from host %s\n", host); } return(UPDATERES_ERROR); } domain = strdup(p); dprintf((stderr, "hostname: %s, domain: %s\n", hostname, domain)); 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, "POST %s HTTP/1.0\015\012", request); 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); p = putbuf; *p = '\0'; limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(p, limit, "hostscmd=edit&hostscmdstage=2&type=4&"); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(p, limit, "%s=%s&", "updatetype", "Online"); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(p, limit, "%s=%s&", "ip", address); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(p, limit, "%s=%s&", "mx", mx); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(p, limit, "%s=%s&", "offline_url", url); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); if(cloak_title) { snprintf(p, limit, "%s=%s&", "cloak", "Y"); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(p, limit, "%s=%s&", "cloak_title", cloak_title); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); } else { snprintf(p, limit, "%s=%s&", "cloak_title", ""); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); } snprintf(p, limit, "%s=%s&", "submit", "Update"); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(p, limit, "%s=%s&", "domain", domain); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(p, limit, "%s=%s", "hostname", hostname); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(buf, BUFFER_SIZE, "Content-length: %d\015\012", strlen(putbuf)); output(buf); snprintf(buf, BUFFER_SIZE, "\015\012"); output(buf); output(putbuf); 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"); } retval = UPDATERES_ERROR; break; case 200: if(!(options & OPT_QUIET)) { printf("request successful\n"); } break; case 401: if(!(options & OPT_QUIET)) { show_message("authentication failure\n"); } retval = 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); } retval = UPDATERES_ERROR; break; } // this stupid service requires us to do seperate request if we want to // update the mail exchanger (mx). grrrrrr if(*mx != '\0') { // okay, dhs's service is incredibly stupid and will not work with two // requests right after each other. I could care less that this is ugly, // I personally will NEVER use dhs, it is laughable. sleep(DHS_SUCKY_TIMEOUT < timeout.tv_sec ? DHS_SUCKY_TIMEOUT : timeout.tv_sec); 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, "POST %s HTTP/1.0\015\012", request); 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); p = putbuf; *p = '\0'; limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(p, limit, "hostscmd=edit&hostscmdstage=2&type=4&"); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(p, limit, "%s=%s&", "updatetype", "Update+Mail+Exchanger"); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(p, limit, "%s=%s&", "ip", address); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(p, limit, "%s=%s&", "mx", mx); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(p, limit, "%s=%s&", "offline_url", url); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); if(cloak_title) { snprintf(p, limit, "%s=%s&", "cloak", "Y"); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(p, limit, "%s=%s&", "cloak_title", cloak_title); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); } else { snprintf(p, limit, "%s=%s&", "cloak_title", ""); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); } snprintf(p, limit, "%s=%s&", "submit", "Update"); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(p, limit, "%s=%s&", "domain", domain); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(p, limit, "%s=%s", "hostname", hostname); p += strlen(p); limit = BUFFER_SIZE - 1 - strlen(buf); snprintf(buf, BUFFER_SIZE, "Content-length: %d\015\012", strlen(putbuf)); output(buf); snprintf(buf, BUFFER_SIZE, "\015\012"); output(buf); output(putbuf); 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"); } retval = UPDATERES_ERROR; break; case 200: if(!(options & OPT_QUIET)) { printf("request successful\n"); } break; case 401: if(!(options & OPT_QUIET)) { show_message("authentication failure\n"); } retval = 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); } retval = UPDATERES_ERROR; break; } } return(retval); } int ODS_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(address) { free(address); } address = strdup(""); } warn_fields(service->fields_used); return 0; } int ODS_update_entry(void) { char buf[BUFFER_SIZE+1]; int response; 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); } /* read server message */ if(ODS_read_response(buf, sizeof(buf)) != 100) { show_message("strange server response, are you connecting to the right server?\n"); close(client_sockfd); return(UPDATERES_ERROR); } /* send login command */ snprintf(buf, BUFFER_SIZE, "LOGIN %s %s\012", user_name, password); output(buf); response = ODS_read_response(buf, sizeof(buf)); if(!(response == 225 || response == 226)) { if(strlen(buf) > 4) { show_message("error talking to server: %s\n", &(buf[4])); } else { show_message("error talking to server\n"); } close(client_sockfd); return(UPDATERES_ERROR); } /* send delete command */ snprintf(buf, BUFFER_SIZE, "DELRR %s A\012", host); output(buf); if(ODS_read_response(buf, sizeof(buf)) != 901) { if(strlen(buf) > 4) { show_message("error talking to server: %s\n", &(buf[4])); } else { show_message("error talking to server\n"); } close(client_sockfd); return(UPDATERES_ERROR); } /* send address command */ snprintf(buf, BUFFER_SIZE, "ADDRR %s A %s\012", host, *address == '\0' ? "CONNIP" : address); output(buf); response = ODS_read_response(buf, sizeof(buf)); if(!(response == 795 || response == 796)) { if(strlen(buf) > 4) { show_message("error talking to server: %s\n", &(buf[4])); } else { show_message("error talking to server\n"); } close(client_sockfd); return(UPDATERES_ERROR); } if(!(options & OPT_QUIET)) { printf("request successful\n"); } close(client_sockfd); return(UPDATERES_OK); } int TZO_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 TZO_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?", request); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s&", "TZOName", host); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s&", "Email", user_name); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s&", "TZOKey", password); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s&", "IPAddress", address); output(buf); snprintf(buf, BUFFER_SIZE, " HTTP/1.0\015\012"); 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(!(options & OPT_QUIET)) { printf("request successful\n"); } break; case 302: // There is no neat way to determine the exact error other than to // parse the Location part of the mime header to find where we're // being redirected. if(!(options & OPT_QUIET)) { // reuse the auth buffer *auth = '\0'; bp = strstr(buf, "Location: "); if((bp < strstr(buf, "\r\n\r\n")) && (sscanf(bp, "Location: http://%*[^/]%255[^\r\n]", auth) == 1)) { bp = strrchr(auth, '/') + 1; } else { bp = ""; } dprintf((stderr, "location: %s\n", bp)); if(!(strncmp(bp, "domainmismatch.htm", strlen(bp)) && strncmp(bp, "invname.htm", strlen(bp)))) { show_message("invalid host name\n"); } else if(!strncmp(bp, "invkey.htm", strlen(bp))) { show_message("invalid password(tzo key)\n"); } else if(!(strncmp(bp, "emailmismatch.htm", strlen(bp)) && strncmp(bp, "invemail.htm", strlen(bp)))) { show_message("invalid user name(email address)\n"); } else { show_message("unknown error\n"); } } return(UPDATERES_ERROR); 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); } int EASYDNS_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 EASYDNS_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_id", host); 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, "NOERROR\n") != NULL) { if(!(options & OPT_QUIET)) { printf("request successful\n"); } } else { show_message("error processing request\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); } int EASYDNS_PARTNER_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((partner == NULL) || (*partner == '\0')) { if(options & OPT_DAEMON) { return(-1); } if(partner) { free(partner); } printf("easyDNS partner: "); *buf = '\0'; fgets(buf, BUFSIZ, stdin); partner = strdup(buf); chomp(partner); } 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 EASYDNS_PARTNER_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&", "partner", partner); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s&", "wildcard", wildcard ? "ON" : "OFF"); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s", "hostname", host); 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, "OK\n") != NULL) { if(!(options & OPT_QUIET)) { printf("request successful\n"); } } else { show_message("error processing request\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; case 403: if(!(options & OPT_QUIET)) { show_message("updating too frequently\n"); } show_message("sleeping for %s\n", format_time(MAX_WAITRESPONSE_WAIT)); sleep(MAX_WAITRESPONSE_WAIT); return(UPDATERES_ERROR); break; case 404: if(!(options & OPT_QUIET)) { show_message("no dynamic service for this host/domain\n"); } return(UPDATERES_SHUTDOWN); break; case 405: if(!(options & OPT_QUIET)) { show_message("partner not supported\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); } #ifdef USE_MD5 int GNUDIP_check_info(void) { char buf[BUFSIZ+1]; if((server == NULL) || (*server == '\0')) { if(options & OPT_DAEMON) { return(-1); } if(server) { free(server); } printf("server: "); *buf = '\0'; fgets(buf, BUFSIZ, stdin); server = strdup(buf); chomp(server); } 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((address) && (strcmp(address, "0.0.0.0") != 0)) { if(!(options & OPT_QUIET)) { fprintf(stderr, "warning: for GNUDIP the \"address\" parpameter is only used if set to \"0.0.0.0\" thus making an offline request.\n"); } } warn_fields(service->fields_used); return 0; } int GNUDIP_update_entry(void) { unsigned char digestbuf[MD5_DIGEST_BYTES]; char buf[BUFFER_SIZE+1]; char *p; int bytes; int ret; int i; char *domainname; char gnudip_request[2]; // send an offline request if address 0.0.0.0 is used // otherwise, we ignore the address and send an update request gnudip_request[0] = strcmp(address, "0.0.0.0") == 0 ? '1' : '0'; gnudip_request[1] = '\0'; // find domainname for(p=host; *p != '\0' && *p != '.'; p++); if(*p != '\0') { p++; } if(*p == '\0') { return(UPDATERES_ERROR); } domainname = p; 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); } if((bytes=read_input(buf, BUFFER_SIZE)) <= 0) { close(client_sockfd); return(UPDATERES_ERROR); } buf[bytes] = '\0'; dprintf((stderr, "bytes: %d\n", bytes)); dprintf((stderr, "server output: %s\n", buf)); // buf holds the shared secret chomp(buf); // use the auth buffer md5_buffer(password, strlen(password), digestbuf); for(i=0, p=auth; i<MD5_DIGEST_BYTES; i++, p+=2) { sprintf(p, "%02x", digestbuf[i]); } strncat(auth, ".", 255-strlen(auth)); strncat(auth, buf, 255-strlen(auth)); dprintf((stderr, "auth: %s\n", auth)); md5_buffer(auth, strlen(auth), digestbuf); for(i=0, p=buf; i<MD5_DIGEST_BYTES; i++, p+=2) { sprintf(p, "%02x", digestbuf[i]); } strcpy(auth, buf); dprintf((stderr, "auth: %s\n", auth)); snprintf(buf, BUFFER_SIZE, "%s:%s:%s:%s\n", user_name, auth, domainname, gnudip_request); output(buf); bytes = 0; if((bytes=read_input(buf, BUFFER_SIZE)) <= 0) { close(client_sockfd); return(UPDATERES_ERROR); } buf[bytes] = '\0'; dprintf((stderr, "bytes: %d\n", bytes)); dprintf((stderr, "server output: %s\n", buf)); close(client_sockfd); if(sscanf(buf, "%d", &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 0: if(!(options & OPT_QUIET)) { printf("update request successful\n"); } break; case 1: if(!(options & OPT_QUIET)) { show_message("invalid login attempt\n"); } return(UPDATERES_ERROR); break; case 2: if(!(options & OPT_QUIET)) { fprintf(stderr, "offline request successful\n"); } break; default: if(!(options & OPT_QUIET)) { show_message("unknown return code: %d\n", ret); } return(UPDATERES_ERROR); break; } return(UPDATERES_OK); } #endif int JUSTL_check_info(void) { char buf[BUFSIZ+1]; if(host == NULL) { if(options & OPT_DAEMON) { return(-1); } printf("host: "); *buf = '\0'; fgets(buf, BUFSIZ, stdin); chomp(buf); host = strdup(buf); } 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 JUSTL_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?direct=1&", request); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s&", "username", user_name); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s&", "password", password); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s&", "host", host); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s&", "ip", address); 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, " set ") != NULL) { if(!(options & OPT_QUIET)) { printf("request successful\n"); } } else { show_message("error processing request\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); } int DYNS_check_info(void) { char buf[BUFSIZ+1]; if(host == NULL) { if(options & OPT_DAEMON) { return(-1); } printf("host: "); *buf = '\0'; fgets(buf, BUFSIZ, stdin); chomp(buf); host = strdup(buf); } 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 DYNS_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?", request); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s&", "username", user_name); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s&", "password", password); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s&", "host", host); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s", "ip", address); 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, "200 Host") != NULL || strstr(buf, "200 host") != NULL) { if(!(options & OPT_QUIET)) { printf("request successful\n"); } } else if(strstr(buf, "400 Bad Request") != NULL) { if(!(options & OPT_QUIET)) { printf("bad request\n"); } } else if(strstr(buf, "401 User") != NULL) { if(!(options & OPT_QUIET)) { printf("authentication failure (username/password)\n"); } } else if(strstr(buf, "405 Hostname") != NULL) { if(!(options & OPT_QUIET)) { printf("authentication failure (hostname not found)\n"); } } else { show_message("error processing request\n"); if(!(options & OPT_QUIET)) { fprintf(stderr, "server output: %s\n", buf); } return(UPDATERES_ERROR); } break; case 405: if(!(options & OPT_QUIET)) { show_message("authentication failure\n"); } return(UPDATERES_ERROR); 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); } int HN_check_info(void) { warn_fields(service->fields_used); return 0; } int HN_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?ver=%d&", request, 1); output(buf); if(address) { snprintf(buf, BUFFER_SIZE, "%s=%s&", "IP", address); 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) { char *p; 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: ret = -1; if((p=strstr(buf, "DDNS_Response_")) != NULL) { sscanf(p, "DDNS_Response_%*code=%3d", &ret); } /* * 101 - Successfully Updated * 201 - Failure because previous update occured * less than 300 seconds ago * 202 - Failure because of server error * 203 - Failure because account is frozen (by admin) * 204 - Failure because account is locked (by user) */ 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 101: if(!(options & OPT_QUIET)) { printf("request successful\n"); } break; case 201: show_message("Last update was less than %d seconds ago.\n", 300); return(UPDATERES_ERROR); break; case 202: show_message("Server error.\n"); return(UPDATERES_ERROR); break; case 203: show_message("Failure because account is frozen (by admin).\n"); return(UPDATERES_SHUTDOWN); break; case 204: show_message("Failure because account is locked (by user).\n"); return(UPDATERES_SHUTDOWN); break; default: if(!(options & OPT_QUIET)) { show_message("unknown return code: %d\n", ret); fprintf(stderr, "server response: %s\n", buf); } return(UPDATERES_ERROR); break; } 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); fprintf(stderr, "server response: %s\n", auth); } return(UPDATERES_ERROR); break; } return(UPDATERES_OK); } int ZONEEDIT_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); } warn_fields(service->fields_used); return 0; } int ZONEEDIT_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?", request); output(buf); snprintf(buf, BUFFER_SIZE, "%s=%s&", "host", host); output(buf); if (address && *address) { snprintf(buf, BUFFER_SIZE, "%s=%s&", "dnsto", address); output(buf); } if (address && *mx && *mx != '0') { snprintf(buf, BUFFER_SIZE, "%s=%s&", "type", "a,mx"); output(buf); } snprintf(buf, BUFFER_SIZE, " HTTP/1.0\015\012"); output(buf); snprintf(buf, BUFFER_SIZE, "User-Agent: %s-%s %s (%s)\015\012", "zoneedit", VERSION, OS, "by Angus Mackay"); output(buf); snprintf(buf, BUFFER_SIZE, "Host: %s\015\012", server); output(buf); snprintf(buf, BUFFER_SIZE, "Authorization: Basic %s\015\012", auth); 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, "<SUCCESS") != NULL) { if(!(options & OPT_QUIET)) { printf("request successful\n"); } } else { show_message("error processing request\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); } int HEIPV6TB_check_info(void) { char buf[BUFSIZ+1]; if(interface == 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 HEIPV6TB_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?menu=%s&", request, "edit_tunnel_address"); output(buf); snprintf(buf, BUFFER_SIZE, "aname=%s&", user_name); output(buf); snprintf(buf, BUFFER_SIZE, "auth=%s&", password); output(buf); snprintf(buf, BUFFER_SIZE, "ipv4b=%s", address); output(buf); snprintf(buf, BUFFER_SIZE, " HTTP/1.0\015\012"); 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) { char *p; 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(!(options & OPT_QUIET)) { printf("request successful\n"); } 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); fprintf(stderr, "server response: %s\n", auth); } return(UPDATERES_ERROR); break; } return(UPDATERES_OK); } static int is_in_list(char *needle, char **haystack) { char **p; int found = 0; for(p=haystack; *p != NULL; p++) { if(strcmp(needle, *p) == 0) { found = 1; break; } } return(found); } void warn_fields(char **okay_fields) { if(wildcard != 0 && !is_in_list("wildcard", okay_fields)) { fprintf(stderr, "warning: this service does not support the %s option\n", "wildcard"); } if(!(mx == NULL || *mx == '\0') && !is_in_list("mx", okay_fields)) { fprintf(stderr, "warning: this service does not support the %s option\n", "mx"); } if(!(url == NULL || *url == '\0') && !is_in_list("url", okay_fields)) { fprintf(stderr, "warning: this service does not support the %s option\n", "url"); } if(!(cloak_title == NULL || *cloak_title == '\0') && !is_in_list("cloak_title", okay_fields)) { fprintf(stderr, "warning: this service does not support the %s option\n", "cloak_title"); } if(connection_type != 1 && !is_in_list("connection-type", okay_fields)) { fprintf(stderr, "warning: this service does not support the %s option\n", "connection-type"); } } int exec_cmd(char *cmd) { #if (defined(HAVE_WAITPID) || defined(HAVE_WAIT)) && (defined(HAVE_VFORK) || defined(HAVE_FORK)) int kid; int exit_code; switch((kid=vfork())) { case -1: if(!(options & OPT_QUIET)) { perror("fork"); } return(-1); break; case 0: /* child */ execl("/bin/sh", "sh", "-c", cmd, (char *)0); if(!(options & OPT_QUIET)) { perror("exec"); } exit(1); break; default: /* parent */ dprintf((stderr, "forked kid: %d\n", kid)); break; } # ifdef HAVE_WAITPID if(waitpid(kid, &exit_code, 0) != kid) { return(1); } # else if(wait(&exit_code) != kid) { return(1); } # endif exit_code = WEXITSTATUS(exit_code); return(exit_code); #else return(-1); #endif } void handle_sig(int sig) { switch(sig) { case SIGHUP: if(config_file) { show_message("SIGHUP recieved, re-reading config file\n"); if(parse_conf_file(config_file, conf_commands) != 0) { show_message("error parsing config file \"%s\"\n", config_file); } } break; case SIGTERM: /* * this is used to wake up the client so that it will perform an update */ break; case SIGQUIT: show_message("received SIGQUIT, shutting down\n"); #if HAVE_SYSLOG_H closelog(); #endif #if HAVE_GETPID if(pid_file) { pid_file_delete(pid_file); } #endif exit(0); default: dprintf((stderr, "case not handled: %d\n", sig)); break; } } int main(int argc, char **argv) { int ifresolve_warned = 0; int i; int retval = 1; #ifdef IF_LOOKUP int sock = -1; #endif #if defined(DEBUG) && defined(__linux__) mcheck(NULL); #endif dprintf((stderr, "staring...\n")); program_name = argv[0]; options = 0; *user = '\0'; timeout.tv_sec = DEFAULT_TIMEOUT; timeout.tv_usec = 0; parse_service(DEF_SERVICE); #if HAVE_SIGNAL_H // catch user interupts signal(SIGINT, sigint_handler); signal(SIGHUP, generic_sig_handler); signal(SIGTERM, generic_sig_handler); signal(SIGQUIT, generic_sig_handler); #endif parse_args(argc, argv); if(!(options & OPT_QUIET) && !(options & OPT_DAEMON)) { fprintf(stderr, "ez-ipupdate Version %s\nCopyright (C) 1998-2001 Angus Mackay.\n", VERSION); } dprintf((stderr, "options: 0x%04X\n", options)); dprintf((stderr, "interface: %s\n", interface)); dprintf((stderr, "ntrys: %d\n", ntrys)); dprintf((stderr, "server: %s:%s\n", server, port)); dprintf((stderr, "address: %s\n", address)); dprintf((stderr, "wildcard: %d\n", wildcard)); dprintf((stderr, "mx: %s\n", mx)); dprintf((stderr, "auth: %s\n", auth)); while(is_in_list("null", service->names)) { if(service->check_info() != 0) { fprintf(stderr, "invalid data to perform requested action.\n"); exit(1); } } if(server == NULL) { server = strdup(service->default_server); } if(port == NULL) { port = strdup(service->default_port); } *user_name = '\0'; *password = '\0'; if(*user != '\0') { sscanf(user, "%127[^:]:%127[^\n]", user_name, password); dprintf((stderr, "user_name: %s\n", user_name)); dprintf((stderr, "password: %s\n", password)); } if(*user_name == '\0') { printf("user name: "); fgets(user_name, sizeof(user_name), stdin); chomp(user_name); } if(*password == '\0') { strncpy(password, getpass("password: "), sizeof(password)); } sprintf(user, "%s:%s", user_name, password); base64Encode(user, auth); request = strdup(request_over_ride == NULL ? service->default_request : request_over_ride); dprintf((stderr, "request: %s\n", request)); if(service->init != NULL) { service->init(); } if(service->check_info() != 0) { fprintf(stderr, "invalid data to perform requested action.\n"); exit(1); } if(mx == NULL) { mx = strdup(""); } if(url == NULL) { url = strdup(""); } #ifdef IF_LOOKUP if(options & OPT_DAEMON) { sock = socket(AF_INET, SOCK_STREAM, 0); } #endif if(options & OPT_DAEMON) { int local_update_period = update_period; #if IF_LOOKUP struct sockaddr_in sin; struct sockaddr_in sin2; if(interface == NULL) { fprintf(stderr, "invalid data to perform requested action.\n"); fprintf(stderr, "you must provide an interface for daemon mode"); exit(1); } /* background our selves */ if(!(options & OPT_FOREGROUND)) { # if HAVE_SYSLOG_H close(0); close(1); close(2); # endif if(fork() > 0) { exit(0); } /* parent */ } #if HAVE_GETPID if(pid_file && pid_file_create(pid_file) != 0) { fprintf(stderr, "exiting...\n"); exit(1); } #endif # if HAVE_SYSLOG_H openlog(program_name, LOG_PID, LOG_USER ); options |= OPT_QUIET; # endif show_message("ez-ipupdate Version %s, Copyright (C) 1998-2001 Angus Mackay.\n", VERSION); show_message("%s started for interface %s host %s using server %s and service %s\n", program_name, N_STR(interface), N_STR(host), server, service->title); memset(&sin, 0, sizeof(sin)); if(cache_file) { time_t ipdate; char *ipstr; if(read_cache_file(cache_file, &ipdate, &ipstr) == 0) { dprintf((stderr, "cache date: %ld\n", ipdate)); dprintf((stderr, "cache IP: %s\n", ipstr)); if(ipstr && strchr(ipstr, '.')) { struct tm *ts; char timebuf[64]; inet_aton(ipstr, &sin.sin_addr); last_update = ipdate; ts = localtime(&ipdate); strftime(timebuf, sizeof(timebuf), "%Y/%m/%d %H:%M", ts); show_message("got last update %s on %s from cache file\n", ipstr, timebuf); } else { show_message("malformed cache file: %s\n", cache_file); } if(ipstr) { free(ipstr); ipstr = NULL; } } else { show_message("error reading cache file \"%s\": %s\n", cache_file, errno == 0 ? "malformed entry" : strerror(errno)); } } for(;;) { #if HAVE_SIGNAL_H /* check for signals */ if(last_sig != 0) { handle_sig(last_sig); last_sig = 0; } #endif if(get_if_addr(sock, interface, &sin2) == 0) { ifresolve_warned = 0; if(memcmp(&sin.sin_addr, &sin2.sin_addr, sizeof(struct in_addr)) != 0 || (max_interval > 0 && time(NULL) - last_update > max_interval)) { int updateres; // save this new ipaddr memcpy(&sin, &sin2, sizeof(sin)); // update the address buffer if(address) { free(address); } address = strdup(inet_ntoa(sin.sin_addr)); if((updateres=service->update_entry()) == UPDATERES_OK) { last_update = time(NULL); local_update_period = update_period; show_message("successful update for %s->%s (%s)\n", interface, inet_ntoa(sin.sin_addr), N_STR(host)); if(post_update_cmd) { int res; if(post_update_cmd) { sprintf(post_update_cmd_arg, "%s", inet_ntoa(sin.sin_addr)); if((res=exec_cmd(post_update_cmd)) != 0) { if(res == -1) { show_message("(%s) error running post update command: %s\n", N_STR(host), error_string); } else { show_message( "(%s) error running post update command, command exit code: %d\n", N_STR(host), res); } } } } if(cache_file) { char ipbuf[64]; snprintf(ipbuf, sizeof(ipbuf), "%s", inet_ntoa(sin.sin_addr)); if(write_cache_file(cache_file, last_update, ipbuf) != 0) { show_message("unable to write cache file \"%s\": %s\n", cache_file, error_string); } } } else { show_message("failure to update %s->%s (%s)\n", interface, inet_ntoa(sin.sin_addr), N_STR(host)); memset(&sin, 0, sizeof(sin)); // double the time between attempts between each failure to update // this gets set back to the normal value the next time we get a // successful update if(local_update_period < MIN_WAIT_PERIOD) { local_update_period = MIN_WAIT_PERIOD; } else { local_update_period *= 2; } if(local_update_period > MAX_WAIT_PERIOD) { local_update_period = MAX_WAIT_PERIOD; } dprintf((stderr, "local_update_period: %d\n", local_update_period)); dprintf((stderr, "updateres: %d\n", updateres)); if(updateres == UPDATERES_SHUTDOWN) { show_message("shuting down updater for %s due to fatal error\n", N_STR(host)); if(notify_email && *notify_email != '\0') { char buf[1024]; dprintf((stderr, "sending email to %s\n", notify_email)); snprintf(buf, sizeof(buf), "echo \"ez-ipupdate shuting down" " updater for %s due to fatal error.\" | %s %s", host, SEND_EMAIL_CMD, notify_email); system(buf); } break; } } } sleep(local_update_period); } else { if(!ifresolve_warned) { ifresolve_warned = 1; show_message("(%s) unable to resolve interface %s\n", N_STR(host), interface); } sleep(resolv_period); } } #if HAVE_GETPID if(pid_file) { pid_file_delete(pid_file); } #endif #else fprintf(stderr, "sorry, this mode is only available on platforms that the "); fprintf(stderr, "IP address \ncan be determined. feel free to hack the code"); fprintf(stderr, " though.\n"); exit(1); #endif } else { int need_update = 1; if(cache_file) { time_t ipdate; char *ipstr; char ipbuf[64]; if(read_cache_file(cache_file, &ipdate, &ipstr) != 0) { fprintf(stderr, "error reading cache file \"%s\": %s\n", cache_file, errno == 0 ? "malformed entry" : strerror(errno)); } dprintf((stderr, "cache date: %ld\n", ipdate)); dprintf((stderr, "cache IP: %s\n", N_STR(ipstr))); // check that the cache file contained something if(ipstr != NULL) { if(address == NULL || *address == '\0') { #ifdef IF_LOOKUP struct sockaddr_in sin; int sock; sock = socket(AF_INET, SOCK_STREAM, 0); if(get_if_addr(sock, interface, &sin) != 0) { exit(1); } close(sock); snprintf(ipbuf, sizeof(ipbuf), "%s", inet_ntoa(sin.sin_addr)); #else fprintf(stderr, "interface lookup not enabled at compile time\n"); exit(1); #endif } else { snprintf(ipbuf, sizeof(ipbuf), "%s", address); } // check for a change in the IP if(strcmp(ipstr, ipbuf) == 0) { dprintf((stderr, "cache IP doesn't need updating\n")); need_update = 0; } // check the date if(max_interval > 0) { if(time(NULL) - ipdate > max_interval) { dprintf((stderr, "cache IP is passed max_interval of %d\n", max_interval)); need_update = 1; } } } if(ipstr) { free(ipstr); ipstr = NULL; } } if(need_update) { int res; if(address == NULL && interface != NULL) { struct sockaddr_in sin; int sock; sock = socket(AF_INET, SOCK_STREAM, 0); if(get_if_addr(sock, interface, &sin) == 0) { if(address) { free(address); } address = strdup(inet_ntoa(sin.sin_addr)); } else { show_message("could not resolve ip address for %s.\n", interface); exit(1); } close(sock); } for(i=0; i<ntrys; i++) { if(service->update_entry() == UPDATERES_OK) { retval = 0; break; } if(i+1 != ntrys) { sleep(10 + 10*i); } } if(retval == 0 && post_update_cmd) { if((res=exec_cmd(post_update_cmd)) != 0) { if(!(options & OPT_QUIET)) { if(res == -1) { fprintf(stderr, "error running post update command: %s\n", error_string); } else { fprintf(stderr, "error running post update command, command exit code: %d\n", res); } } } } // write cache file if(retval == 0 && cache_file) { char ipbuf[64]; if(address == NULL || *address == '\0') { #ifdef IF_LOOKUP struct sockaddr_in sin; int sock; sock = socket(AF_INET, SOCK_STREAM, 0); if(get_if_addr(sock, interface, &sin) != 0) { exit(1); } close(sock); snprintf(ipbuf, sizeof(ipbuf), "%s", inet_ntoa(sin.sin_addr)); #else fprintf(stderr, "interface lookup not enabled at compile time\n"); exit(1); #endif } else { snprintf(ipbuf, sizeof(ipbuf), "%s", address); } if(write_cache_file(cache_file, time(NULL), ipbuf) != 0) { fprintf(stderr, "unable to write cache file \"%s\": %s\n", cache_file, error_string); exit(1); } } } else { fprintf(stderr, "no update needed at this time\n"); } } #ifdef IF_LOOKUP if(sock > 0) { close(sock); } #endif if(address) { free(address); } if(cache_file) { free(cache_file); } if(config_file) { free(config_file); } if(host) { free(host); } if(interface) { free(interface); } if(mx) { free(mx); } if(port) { free(port); } if(request) { free(request); } if(request_over_ride) { free(request_over_ride); } if(server) { free(server); } if(url) { free(url); } if(partner) { free(partner); } dprintf((stderr, "done\n")); return(retval); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/conf_file.c�������������������������������������������������������������������� 644 � 764 � 764 � 10742 7647562406 11502� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ============================================================================ * Copyright (C) 1999 Angus Mackay. All rights reserved; * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ============================================================================ */ /* * conf_file.c * * simple config file code * */ #ifdef HAVE_CONFIG_H # include <config.h> #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include <conf_file.h> #if HAVE_ERRNO_H # include <errno.h> #else extern int errno; #endif #if HAVE_STRERROR # define error_string strerror(errno) #elif HAVE_SYS_ERRLIST extern const char *const sys_errlist[]; # define error_string (sys_errlist[errno]) #else # define error_string "error message not found" #endif #ifdef DEBUG #define dprintf(x) if( options & OPT_DEBUG ) \ { \ fprintf(stderr, "%s,%d: ", __FILE__, __LINE__); \ fprintf x; \ } #else # define dprintf(x) #endif #define OPT_DEBUG 0x0001 extern int options; int parse_conf_file(char *fname, struct conf_cmd *commands) { char buf[BUFSIZ+1]; FILE *in; int using_a_file = 1; char *p; char *cmd_start; char *arg; struct conf_cmd *cmd; int lnum = 0; // safety first buf[BUFSIZ] = '\0'; if(strcmp("-", fname) == 0) { in = stdin; using_a_file = 0; } else { if((in=fopen(fname, "r")) == NULL) { fprintf(stderr, "could not open config file \"%s\": %s\n", fname, error_string); return(-1); } } while(lnum++, fgets(buf, BUFSIZ, in) != NULL) { p = buf; /* eat space */ while(*p == ' ' || *p == '\t') { p++; } /* ignore comments and blanks */ if(*p == '#' || *p == '\r' || *p == '\n' || *p == '\0') { continue; } cmd_start = p; /* chomp new line */ while(*p != '\0' && *p != '\r' && *p != '\n') { p++; } *p = '\0'; p = cmd_start; /* find the end of the command */ while(*p != '\0' && *p != '=') { p++; } /* insure that it is terminated and find arg */ if(*p == '\0') { arg = NULL; } else { *p = '\0'; p++; arg = p; } /* look up the command */ cmd = commands; while(cmd->name != NULL) { if(strcmp(cmd->name, cmd_start) == 0) { dprintf((stderr, "using cmd %s\n", cmd->name)); break; } cmd++; } if(cmd->name == NULL) { fprintf(stderr, "%s,%d: unknown command: %s\n", fname, lnum, cmd_start); fprintf(stderr, "commands are:\n"); cmd = commands; while(cmd->name != NULL) { fprintf(stderr, " %-14s usage: ", cmd->name); fprintf(stderr, cmd->help, cmd->name); fprintf(stderr, "\n"); cmd++; } goto ERR; } /* check the arg */ switch(cmd->arg_type) { case CONF_NEED_ARG: if(arg == NULL) { fprintf(stderr, "option \"%s\" requires an argument\n", cmd->name); goto ERR; } break; case CONF_OPT_ARG: if(arg == NULL) { arg = ""; } break; case CONF_NO_ARG: arg = ""; break; default: dprintf((stderr, "case not handled: %d\n", cmd->arg_type)); break; } /* is the command implemented? */ if(!cmd->available) { fprintf(stderr, "the command \"%s\" is not available\n", cmd->name); continue; } /* handle the command */ cmd->proc(cmd, arg); } if(using_a_file) { if(in) { fclose(in); } } return 0; ERR: if(using_a_file) { if(in) { fclose(in); } } return(-1); } ������������������������������ez-ipupdate-3.0.11b8/conf_file.h�������������������������������������������������������������������� 644 � 764 � 764 � 3040 7143731074 11446� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ============================================================================ * Copyright (C) 1999 Angus Mackay. All rights reserved; * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ============================================================================ */ /* * conf_file.h * * simple config file code * */ #ifndef CONF_FILE_H #define CONF_FILE_H #define CONF_NO_ARG 0 #define CONF_NEED_ARG 1 #define CONF_OPT_ARG 2 struct conf_cmd { int id; char *name; int arg_type; int available; int (*proc)(struct conf_cmd *, char *); char *help; }; int parse_conf_file(char *fname, struct conf_cmd *conf_commands); #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/md5.c�������������������������������������������������������������������������� 644 � 764 � 764 � 30442 7143731074 10230� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* md5.c - Functions to compute MD5 message digest of files or memory blocks according to the definition of MD5 in RFC 1321 from April 1992. Copyright (C) 1995, 1996 Free Software Foundation, Inc. This file is part of the GNU C library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. */ #ifdef HAVE_CONFIG_H # include <config.h> #endif #ifdef USE_MD5 #include <stdlib.h> #ifdef HAVE_STRING_H # include <string.h> #else # include <strings.h> #endif #include "md5.h" #ifdef _LIBC # include <endian.h> # if __BYTE_ORDER == __BIG_ENDIAN # define WORDS_BIGENDIAN 1 # endif #endif #if defined(WORDS_BIGENDIAN) || defined(_BIG_ENDIAN) # define SWAP(n) \ (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) #else # define SWAP(n) (n) #endif /* This array contains the bytes used to pad the buffer to the next 64-byte boundary. (RFC 1321, 3.1: Step 1) */ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; /* Initialize structure containing state of computation. (RFC 1321, 3.3: Step 3) */ void md5_init_ctx (struct md5_ctx *ctx) { ctx->A = 0x67452301; ctx->B = 0xefcdab89; ctx->C = 0x98badcfe; ctx->D = 0x10325476; ctx->total[0] = ctx->total[1] = 0; ctx->buflen = 0; } /* Put result from CTX in first 16 bytes following RESBUF. The result must be in little endian byte order. IMPORTANT: On some systems it is required that RESBUF is correctly aligned for a 32 bits value. */ void * md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) { ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A); ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B); ((md5_uint32 *) resbuf)[2] = SWAP (ctx->C); ((md5_uint32 *) resbuf)[3] = SWAP (ctx->D); return resbuf; } /* Process the remaining bytes in the internal buffer and the usual prolog according to the standard and write the result to RESBUF. IMPORTANT: On some systems it is required that RESBUF is correctly aligned for a 32 bits value. */ void * md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) { /* Take yet unprocessed bytes into account. */ md5_uint32 bytes = ctx->buflen; size_t pad; /* Now count remaining bytes. */ ctx->total[0] += bytes; if (ctx->total[0] < bytes) ++ctx->total[1]; pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes; memcpy (&ctx->buffer[bytes], fillbuf, pad); /* Put the 64-bit file length in *bits* at the end of the buffer. */ *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3); *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29)); /* Process last bytes. */ md5_process_block (ctx->buffer, bytes + pad + 8, ctx); return md5_read_ctx (ctx, resbuf); } /* Compute MD5 message digest for bytes read from STREAM. The resulting message digest number will be written into the 16 bytes beginning at RESBLOCK. */ int md5_stream (FILE *stream, void *resblock) { /* Important: BLOCKSIZE must be a multiple of 64. */ #define BLOCKSIZE 4096 struct md5_ctx ctx; char buffer[BLOCKSIZE + 72]; size_t sum; /* Initialize the computation context. */ md5_init_ctx (&ctx); /* Iterate over full file contents. */ while (1) { /* We read the file in blocks of BLOCKSIZE bytes. One call of the computation function processes the whole buffer so that with the next round of the loop another block can be read. */ size_t n; sum = 0; /* Read block. Take care for partial reads. */ do { n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream); sum += n; } while (sum < BLOCKSIZE && n != 0); if (n == 0 && ferror (stream)) return 1; /* If end of file is reached, end the loop. */ if (n == 0) break; /* Process buffer with BLOCKSIZE bytes. Note that BLOCKSIZE % 64 == 0 */ md5_process_block (buffer, BLOCKSIZE, &ctx); } /* Add the last bytes if necessary. */ if (sum > 0) md5_process_bytes (buffer, sum, &ctx); /* Construct result in desired memory. */ md5_finish_ctx (&ctx, resblock); return 0; } /* Compute MD5 message digest for LEN bytes beginning at BUFFER. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ void * md5_buffer (const char *buffer, size_t len, void *resblock) { struct md5_ctx ctx; /* Initialize the computation context. */ md5_init_ctx (&ctx); /* Process whole buffer but last len % 64 bytes. */ md5_process_bytes (buffer, len, &ctx); /* Put result in desired memory area. */ return md5_finish_ctx (&ctx, resblock); } void md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx) { /* When we already have some bits in our internal buffer concatenate both inputs first. */ if (ctx->buflen != 0) { size_t left_over = ctx->buflen; size_t add = 128 - left_over > len ? len : 128 - left_over; memcpy (&ctx->buffer[left_over], buffer, add); ctx->buflen += add; if (left_over + add > 64) { md5_process_block (ctx->buffer, (left_over + add) & ~63, ctx); /* The regions in the following copy operation cannot overlap. */ memcpy (ctx->buffer, &ctx->buffer[(left_over + add) & ~63], (left_over + add) & 63); ctx->buflen = (left_over + add) & 63; } buffer = (const char *) buffer + add; len -= add; } /* Process available complete blocks. */ if (len > 64) { md5_process_block (buffer, len & ~63, ctx); buffer = (const char *) buffer + (len & ~63); len &= 63; } /* Move remaining bytes in internal buffer. */ if (len > 0) { memcpy (ctx->buffer, buffer, len); ctx->buflen = len; } } /* These are the four functions used in the four steps of the MD5 algorithm and defined in the RFC 1321. The first function is a little bit optimized (as found in Colin Plumbs public domain implementation). */ /* #define FF(b, c, d) ((b & c) | (~b & d)) */ #define FF(b, c, d) (d ^ (b & (c ^ d))) #define FG(b, c, d) FF (d, b, c) #define FH(b, c, d) (b ^ c ^ d) #define FI(b, c, d) (c ^ (b | ~d)) /* Process LEN bytes of BUFFER, accumulating context into CTX. It is assumed that LEN % 64 == 0. */ void md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) { md5_uint32 correct_words[16]; const md5_uint32 *words = buffer; size_t nwords = len / sizeof (md5_uint32); const md5_uint32 *endp = words + nwords; md5_uint32 A = ctx->A; md5_uint32 B = ctx->B; md5_uint32 C = ctx->C; md5_uint32 D = ctx->D; /* First increment the byte count. RFC 1321 specifies the possible length of the file up to 2^64 bits. Here we only compute the number of bytes. Do a double word increment. */ ctx->total[0] += len; if (ctx->total[0] < len) ++ctx->total[1]; /* Process all bytes in the buffer with 64 bytes in each round of the loop. */ while (words < endp) { md5_uint32 *cwp = correct_words; md5_uint32 A_save = A; md5_uint32 B_save = B; md5_uint32 C_save = C; md5_uint32 D_save = D; /* First round: using the given function, the context and a constant the next context is computed. Because the algorithms processing unit is a 32-bit word and it is determined to work on words in little endian byte order we perhaps have to change the byte order before the computation. To reduce the work for the next steps we store the swapped words in the array CORRECT_WORDS. */ #define OP(a, b, c, d, s, T) \ do \ { \ a += FF (b, c, d) + (*cwp++ = SWAP (*words)) + T; \ ++words; \ CYCLIC (a, s); \ a += b; \ } \ while (0) /* It is unfortunate that C does not provide an operator for cyclic rotation. Hope the C compiler is smart enough. */ #define CYCLIC(w, s) (w = (w << s) | (w >> (32 - s))) /* Before we start, one word to the strange constants. They are defined in RFC 1321 as T[i] = (int) (4294967296.0 * fabs (sin (i))), i=1..64 */ /* Round 1. */ OP (A, B, C, D, 7, 0xd76aa478); OP (D, A, B, C, 12, 0xe8c7b756); OP (C, D, A, B, 17, 0x242070db); OP (B, C, D, A, 22, 0xc1bdceee); OP (A, B, C, D, 7, 0xf57c0faf); OP (D, A, B, C, 12, 0x4787c62a); OP (C, D, A, B, 17, 0xa8304613); OP (B, C, D, A, 22, 0xfd469501); OP (A, B, C, D, 7, 0x698098d8); OP (D, A, B, C, 12, 0x8b44f7af); OP (C, D, A, B, 17, 0xffff5bb1); OP (B, C, D, A, 22, 0x895cd7be); OP (A, B, C, D, 7, 0x6b901122); OP (D, A, B, C, 12, 0xfd987193); OP (C, D, A, B, 17, 0xa679438e); OP (B, C, D, A, 22, 0x49b40821); /* For the second to fourth round we have the possibly swapped words in CORRECT_WORDS. Redefine the macro to take an additional first argument specifying the function to use. */ #undef OP #define OP(f, a, b, c, d, k, s, T) \ do \ { \ a += f (b, c, d) + correct_words[k] + T; \ CYCLIC (a, s); \ a += b; \ } \ while (0) /* Round 2. */ OP (FG, A, B, C, D, 1, 5, 0xf61e2562); OP (FG, D, A, B, C, 6, 9, 0xc040b340); OP (FG, C, D, A, B, 11, 14, 0x265e5a51); OP (FG, B, C, D, A, 0, 20, 0xe9b6c7aa); OP (FG, A, B, C, D, 5, 5, 0xd62f105d); OP (FG, D, A, B, C, 10, 9, 0x02441453); OP (FG, C, D, A, B, 15, 14, 0xd8a1e681); OP (FG, B, C, D, A, 4, 20, 0xe7d3fbc8); OP (FG, A, B, C, D, 9, 5, 0x21e1cde6); OP (FG, D, A, B, C, 14, 9, 0xc33707d6); OP (FG, C, D, A, B, 3, 14, 0xf4d50d87); OP (FG, B, C, D, A, 8, 20, 0x455a14ed); OP (FG, A, B, C, D, 13, 5, 0xa9e3e905); OP (FG, D, A, B, C, 2, 9, 0xfcefa3f8); OP (FG, C, D, A, B, 7, 14, 0x676f02d9); OP (FG, B, C, D, A, 12, 20, 0x8d2a4c8a); /* Round 3. */ OP (FH, A, B, C, D, 5, 4, 0xfffa3942); OP (FH, D, A, B, C, 8, 11, 0x8771f681); OP (FH, C, D, A, B, 11, 16, 0x6d9d6122); OP (FH, B, C, D, A, 14, 23, 0xfde5380c); OP (FH, A, B, C, D, 1, 4, 0xa4beea44); OP (FH, D, A, B, C, 4, 11, 0x4bdecfa9); OP (FH, C, D, A, B, 7, 16, 0xf6bb4b60); OP (FH, B, C, D, A, 10, 23, 0xbebfbc70); OP (FH, A, B, C, D, 13, 4, 0x289b7ec6); OP (FH, D, A, B, C, 0, 11, 0xeaa127fa); OP (FH, C, D, A, B, 3, 16, 0xd4ef3085); OP (FH, B, C, D, A, 6, 23, 0x04881d05); OP (FH, A, B, C, D, 9, 4, 0xd9d4d039); OP (FH, D, A, B, C, 12, 11, 0xe6db99e5); OP (FH, C, D, A, B, 15, 16, 0x1fa27cf8); OP (FH, B, C, D, A, 2, 23, 0xc4ac5665); /* Round 4. */ OP (FI, A, B, C, D, 0, 6, 0xf4292244); OP (FI, D, A, B, C, 7, 10, 0x432aff97); OP (FI, C, D, A, B, 14, 15, 0xab9423a7); OP (FI, B, C, D, A, 5, 21, 0xfc93a039); OP (FI, A, B, C, D, 12, 6, 0x655b59c3); OP (FI, D, A, B, C, 3, 10, 0x8f0ccc92); OP (FI, C, D, A, B, 10, 15, 0xffeff47d); OP (FI, B, C, D, A, 1, 21, 0x85845dd1); OP (FI, A, B, C, D, 8, 6, 0x6fa87e4f); OP (FI, D, A, B, C, 15, 10, 0xfe2ce6e0); OP (FI, C, D, A, B, 6, 15, 0xa3014314); OP (FI, B, C, D, A, 13, 21, 0x4e0811a1); OP (FI, A, B, C, D, 4, 6, 0xf7537e82); OP (FI, D, A, B, C, 11, 10, 0xbd3af235); OP (FI, C, D, A, B, 2, 15, 0x2ad7d2bb); OP (FI, B, C, D, A, 9, 21, 0xeb86d391); /* Add the starting values of the context. */ A += A_save; B += B_save; C += C_save; D += D_save; } /* Put checksum in context given as argument. */ ctx->A = A; ctx->B = B; ctx->C = C; ctx->D = D; } #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/md5.h�������������������������������������������������������������������������� 644 � 764 � 764 � 11717 7143731074 10241� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* md5.h - Declaration of functions and data types used for MD5 sum computing library functions. Copyright (C) 1995, 1996 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _MD5_H #define _MD5_H 1 #ifdef HAVE_CONFIG_H # include <config.h> #endif #ifdef USE_MD5 #define PARAMS(args) args #include <stdio.h> #if defined HAVE_LIMITS_H || _LIBC # include <limits.h> #endif /* The following contortions are an attempt to use the C preprocessor to determine an unsigned integral type that is 32 bits wide. An alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but doing that would require that the configure script compile and *run* the resulting executable. Locally running cross-compiled executables is usually not possible. */ #ifdef _LIBC # include <sys/types.h> typedef u_int32_t md5_uint32; #else # if defined __STDC__ && __STDC__ # define UINT_MAX_32_BITS 4294967295U # else # define UINT_MAX_32_BITS 0xFFFFFFFF # endif /* If UINT_MAX isn't defined, assume it's a 32-bit type. This should be valid for all systems GNU cares about because that doesn't include 16-bit systems, and only modern systems (that certainly have <limits.h>) have 64+-bit integral types. */ # ifndef UINT_MAX # define UINT_MAX UINT_MAX_32_BITS # endif # if UINT_MAX == UINT_MAX_32_BITS typedef unsigned int md5_uint32; # else # if USHRT_MAX == UINT_MAX_32_BITS typedef unsigned short md5_uint32; # else # if ULONG_MAX == UINT_MAX_32_BITS typedef unsigned long md5_uint32; # else /* The following line is intended to evoke an error. Using #error is not portable enough. */ "Cannot determine unsigned 32-bit data type." # endif # endif # endif #endif /* Structure to save state of computation between the single steps. */ struct md5_ctx { md5_uint32 A; md5_uint32 B; md5_uint32 C; md5_uint32 D; md5_uint32 total[2]; md5_uint32 buflen; char buffer[128]; }; /* * The following three functions are build up the low level used in * the functions `md5_stream' and `md5_buffer'. */ /* Initialize structure containing state of computation. (RFC 1321, 3.3: Step 3) */ extern void md5_init_ctx PARAMS ((struct md5_ctx *ctx)); /* Starting with the result of former calls of this function (or the initialization function update the context for the next LEN bytes starting at BUFFER. It is necessary that LEN is a multiple of 64!!! */ extern void md5_process_block PARAMS ((const void *buffer, size_t len, struct md5_ctx *ctx)); /* Starting with the result of former calls of this function (or the initialization function update the context for the next LEN bytes starting at BUFFER. It is NOT required that LEN is a multiple of 64. */ extern void md5_process_bytes PARAMS ((const void *buffer, size_t len, struct md5_ctx *ctx)); /* Process the remaining bytes in the buffer and put result from CTX in first 16 bytes following RESBUF. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. IMPORTANT: On some systems it is required that RESBUF is correctly aligned for a 32 bits value. */ extern void *md5_finish_ctx PARAMS ((struct md5_ctx *ctx, void *resbuf)); /* Put result from CTX in first 16 bytes following RESBUF. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. IMPORTANT: On some systems it is required that RESBUF is correctly aligned for a 32 bits value. */ extern void *md5_read_ctx PARAMS ((const struct md5_ctx *ctx, void *resbuf)); /* Compute MD5 message digest for bytes read from STREAM. The resulting message digest number will be written into the 16 bytes beginning at RESBLOCK. */ extern int md5_stream PARAMS ((FILE *stream, void *resblock)); /* Compute MD5 message digest for LEN bytes beginning at BUFFER. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ extern void *md5_buffer PARAMS ((const char *buffer, size_t len, void *resblock)); #endif #endif �������������������������������������������������ez-ipupdate-3.0.11b8/cache_file.c������������������������������������������������������������������� 664 � 764 � 764 � 6621 7647562330 11577� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ============================================================================ * Copyright (C) 1999-2000 Angus Mackay. All rights reserved; * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ============================================================================ */ /* * cache_file.c * */ #ifdef HAVE_CONFIG_H # include <config.h> #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #if HAVE_SYS_STAT_H # include <sys/stat.h> #endif #if HAVE_ERRNO_H # include <errno.h> #else extern int errno; #endif #include <cache_file.h> #if HAVE_STRERROR # define error_string strerror(errno) #elif HAVE_SYS_ERRLIST extern const char *const sys_errlist[]; # define error_string (sys_errlist[errno]) #else # define error_string "error message not found" #endif #ifdef DEBUG #define dprintf(x) if( options & OPT_DEBUG ) \ { \ fprintf(stderr, "%s,%d: ", __FILE__, __LINE__); \ fprintf x; \ } #else # define dprintf(x) #endif #if HAVE_STRERROR # define error_string strerror(errno) #elif HAVE_SYS_ERRLIST extern const char *const sys_errlist[]; # define error_string (sys_errlist[errno]) #else # define error_string "error message not found" #endif #define OPT_DEBUG 0x0001 extern int options; int read_cache_file(char *file, time_t *date, char **ipaddr) { FILE *fp = NULL; char buf[BUFSIZ+1]; char *p; char *datestr; char *ipstr; #if HAVE_STAT struct stat st; #endif // safety first buf[BUFSIZ] = '\0'; // indicate failure *date = 0; *ipaddr = NULL; #if HAVE_STAT if(stat(file, &st) != 0) { if(errno == ENOENT) { return(0); } return(-1); } #endif if((fp=fopen(file, "r")) == NULL) { return(-1); } if(fgets(buf, BUFSIZ, fp) != NULL) { /* chomp new line */ p = buf; while(*p != '\0' && *p != '\r' && *p != '\n') { p++; } *p = '\0'; /* find the first comma */ p = buf; while(*p != '\0' && *p != ',') { p++; } if(*p == '\0') { fprintf(stderr, "malformed cache file\n"); goto ERR; } // slap in a null *p++ = '\0'; datestr = buf; ipstr = p; *date = strtoul(datestr, NULL, 10); *ipaddr = strdup(ipstr); } else { *date = 0; *ipaddr = NULL; } fclose(fp); return 0; ERR: if(fp) { fclose(fp); } return(-1); } int write_cache_file(char *file, time_t date, char *ipaddr) { FILE *fp = NULL; if((fp=fopen(file, "w")) == NULL) { return(-1); } fprintf(fp, "%ld,%s\n", date, ipaddr); fclose(fp); return 0; } ���������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/cache_file.h������������������������������������������������������������������� 664 � 764 � 764 � 2667 7211260010 11563� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ============================================================================ * Copyright (C) 1999-2000 Angus Mackay. All rights reserved; * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ============================================================================ */ /* * cache_file.h * */ #ifndef _CACHE_FILE_H #define _CACHE_FILE_H #if HAVE_SYS_TIME_H # include <sys/time.h> #endif extern int read_cache_file(char *file, time_t *date, char **ipaddr); extern int write_cache_file(char *file, time_t date, char *ipaddr); #endif �������������������������������������������������������������������������ez-ipupdate-3.0.11b8/error.h������������������������������������������������������������������������ 664 � 764 � 764 � 461 7207567715 10653� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef _ERROR_H #define _ERROR_H #if HAVE_STRERROR extern int errno; # define error_string strerror(errno) #elif HAVE_SYS_ERRLIST extern const char *const sys_errlist[]; extern int errno; # define error_string (sys_errlist[errno]) #else # define error_string "error message not found" #endif #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/pid_file.c��������������������������������������������������������������������� 664 � 764 � 764 � 4167 7320561505 11302� �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� #ifdef HAVE_CONFIG_H # include <config.h> #endif #include <unistd.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #if HAVE_ERRNO_H # include <errno.h> #endif #if HAVE_SIGNAL_H # include <signal.h> #endif #include <error.h> #include <dprintf.h> int pid_file_create(char *pid_file) { #if HAVE_GETPID char buf[64]; FILE* fp = NULL; pid_t mypid; pid_t otherpid = -1; #if HAVE_SETEUID && HAVE_SETEGID gid_t oldegid = -1; uid_t oldeuid = -1; #endif #if HAVE_SETEUID && HAVE_SETEGID oldegid = getegid(); oldeuid = geteuid(); setegid(getgid()); seteuid(getuid()); #endif // check if the pid file exists if((fp=fopen(pid_file, "r")) != NULL) { // if the pid file exists what does it say? if(fgets(buf, sizeof(buf), fp) == NULL) { fprintf(stderr, "error reading pid file: %s (%s)\n", pid_file, error_string); goto ERR; } fclose(fp); otherpid = atoi(buf); // check to see if the pid is valid if(kill(otherpid, 0) == 0) { // if it is alive then we quit fprintf(stderr, "there is another program already running with pid %d.\n", (int)otherpid); goto ERR; } } // create the pid file if((fp=fopen(pid_file, "w")) == NULL) { fprintf(stderr, "could not create pid file: %s (%s)\n", pid_file, error_string); goto ERR; } mypid = getpid(); fprintf(fp, "%d\n", (int)mypid); fclose(fp); dprintf((stderr, "pid file %s successfully created with value %d.\n", pid_file, (int)mypid)); #if HAVE_SETEUID && HAVE_SETEGID setegid(oldegid); seteuid(oldeuid); #endif return 0; ERR: if(fp) { fclose(fp); fp = NULL; } #if HAVE_SETEUID && HAVE_SETEGID setegid(oldegid); seteuid(oldeuid); #endif return(-1); #else return(-1); #endif } int pid_file_delete(char *pid_file) { int ret; #if HAVE_SETEUID && HAVE_SETEGID gid_t oldegid = -1; uid_t oldeuid = -1; #endif #if HAVE_SETEUID && HAVE_SETEGID oldegid = getegid(); oldeuid = geteuid(); setegid(getgid()); seteuid(getuid()); #endif ret = unlink(pid_file); #if HAVE_SETEUID && HAVE_SETEGID setegid(oldegid); seteuid(oldeuid); #endif return ret; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/pid_file.h��������������������������������������������������������������������� 664 � 764 � 764 � 173 7207566726 11276� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef _PID_FILE_H #define _PID_FILE_H int pid_file_create(char *pid_file); int pid_file_delete(char *pid_file); #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/dprintf.h���������������������������������������������������������������������� 664 � 764 � 764 � 447 7207572463 11170� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef _DPRINTF_H #define _DPRINTF_H extern int options; #ifndef OPT_DEBUG # define OPT_DEBUG 0x0001 #endif #ifdef DEBUG #define dprintf(x) if( options & OPT_DEBUG ) \ { \ fprintf(stderr, "%s,%d: ", __FILE__, __LINE__); \ fprintf x; \ } #else # define dprintf(x) #endif #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/getpass.c���������������������������������������������������������������������� 644 � 764 � 764 � 7715 7143731074 11200� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ============================================================================ * Copyright (C) 1998 Angus Mackay. All rights reserved; * * Redistribution and use are freely permitted provided that: * * 1) This header remain in tact. * 2) The prototype for getpass is not changed from: * char *getpass(const char *prompt) * 3) This source code is not used outside of this(getpass.c) file. * 3) Any changes to this(getpass.c) source code are made publicly available. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ============================================================================ * * $Id: getpass.c,v 1.1.1.1 1999/04/19 00:34:59 amackay Exp $ * * The spirit of this license is to allow use of this source code in any * project be it open or closed but still encourage the use of the open, * library based equivilents. * * Author(s): * Angus Mackay <amackay@gus.ml.org> * * Contributor(s): * Daniel Stenberg <Daniel.Stenberg@sth.frontec.se> */ #ifdef HAVE_CONFIG_H # include <config.h> #endif #ifdef HAVE_TERMIOS_H # if !defined(HAVE_TCGETATTR) && !defined(HAVE_TCSETATTR) # undef HAVE_TERMIOS_H # endif #endif #define INPUT_BUFFER 128 #ifndef RETSIGTYPE # define RETSIGTYPE void #endif #include <unistd.h> #include <stdio.h> #include <signal.h> #ifdef HAVE_TERMIOS_H # include <termios.h> #else # ifdef HAVE_TERMIO_H # include <termio.h> # else # endif #endif /* no perror? make an fprintf! */ #ifndef HAVE_PERROR # define perror(x) fprintf(stderr, "Error in: %s\n", x) #endif char *getpass(const char *prompt) { FILE *infp; FILE *outfp; static char buf[INPUT_BUFFER]; RETSIGTYPE (*sigint)(); RETSIGTYPE (*sigtstp)(); size_t bytes_read; int infd; int outfd; #ifdef HAVE_TERMIOS_H struct termios orig; struct termios noecho; #else # ifdef HAVE_TERMIO_H struct termio orig; struct termio noecho; # else # endif #endif sigint = signal(SIGINT, SIG_IGN); sigtstp = signal(SIGTSTP, SIG_IGN); if( (infp=fopen("/dev/tty", "r")) == NULL ) { infp = stdin; } if( (outfp=fopen("/dev/tty", "w")) == NULL ) { outfp = stderr; } infd = fileno(infp); outfd = fileno(outfp); /* dissable echo */ #ifdef HAVE_TERMIOS_H if(tcgetattr(outfd, &orig) != 0) { perror("tcgetattr"); } noecho = orig; noecho.c_lflag &= ~ECHO; if(tcsetattr(outfd, TCSANOW, &noecho) != 0) { perror("tcgetattr"); } #else # ifdef HAVE_TERMIO_H if(ioctl(outfd, TCGETA, &orig) != 0) { perror("ioctl"); } noecho = orig; noecho.c_lflag &= ~ECHO; if(ioctl(outfd, TCSETA, &noecho) != 0) { perror("ioctl"); } # else # endif #endif fputs(prompt, outfp); fflush(outfp); bytes_read=read(infd, buf, INPUT_BUFFER); buf[bytes_read > 0 ? (bytes_read -1) : 0] = '\0'; /* print a new line if needed */ #ifdef HAVE_TERMIOS_H fputs("\n", outfp); #else # ifdef HAVE_TERMIO_H fputs("\n", outfp); # else # endif #endif /* * reset term charectaristics, use TCSAFLUSH incase the * user types more than INPUT_BUFFER */ #ifdef HAVE_TERMIOS_H if(tcsetattr(outfd, TCSAFLUSH, &orig) != 0) { perror("tcgetattr"); } #else # ifdef HAVE_TERMIO_H if(ioctl(outfd, TCSETA, &orig) != 0) { perror("ioctl"); } # else # endif #endif signal(SIGINT, sigint); signal(SIGTSTP, sigtstp); return(buf); } ���������������������������������������������������ez-ipupdate-3.0.11b8/ez-ipupdate.lsm���������������������������������������������������������������� 644 � 764 � 764 � 1205 7153310005 12302� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Begin Title: ez-ipupdate Version: 2.9.0 Entered-date: Description: A client for automaticly updating your EZ-IP.net, justlinux.com, dhs.org, dyndns.org, ods.org, gnudip.cheapnet.net, tzo.com, easydns.com dynamic hostname parameters. Includes daemon support that only sends updates if your IP address changes. Keywords: EZ-IP, dynamic, hostname, DNS Author: amackay@gusnet.cx (Angus Mackay) Maintained-by: amackay@gusnet.cx (Angus Mackay) Primary-site: http://www.gusnet.cx/proj/ez-ipupdate/ Platforms: Linux, *BSD, Solaris, Unix Copying-policy: GPL End �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/example.conf������������������������������������������������������������������� 755 � 764 � 764 � 1207 7321675771 11672� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/local/bin/ez-ipupdate -c # # example config file for ez-ipupdate # # this file is actually executable! # service-type=<type of service> user=myuserid:mypassword interface=eth1 #host=mydomain.whatever.com # other options: #address=<ip address> #cache-file=/etc/ez-ipupdate.cache.eth1 #daemon #debug #foreground #host=<host> #interface=<interface> #mx=<mail exchanger> #retrys=<number of trys> #run-as-user=<user> #run-as-euser=<user> #server=<server name> #timeout=<sec.millisec> #max-interval=<time in seconds> #notify-email=<email address> #period=<time between update attempts> #url=<url> #user=<user name>[:password] #wildcard #quiet �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/example-pgpow.conf������������������������������������������������������������� 755 � 764 � 764 � 1021 7205605230 12776� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/local/bin/ez-ipupdate -c # # example config file for ez-ipupdate # # this file is actually executable! # service-type=pgpow user=myuserid:mypassword host=mydomain.penguinpowered.com interface=eth1 # if you use run-as ensure the user has permission to write this file cache-file=/tmp/ez-ipupdate.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 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/example-dhs.conf��������������������������������������������������������������� 755 � 764 � 764 � 1011 7205605157 12427� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/local/bin/ez-ipupdate -c # # example config file for ez-ipupdate # # this file is actually executable! # service-type=dhs user=myuserid:mypassword host=mydomain.whatever.com interface=eth1 # if you use run-as ensure the user has permission to write this file cache-file=/tmp/ez-ipupdate.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 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/example-dyndns.conf������������������������������������������������������������ 755 � 764 � 764 � 1623 7205605163 13156� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/local/bin/ez-ipupdate -c # # example config file for ez-ipupdate # # this file is actually executable! # service-type=dyndns #service-type=dyndns-static user=myuserid:mypassword host=mydomain.whatever.com interface=eth1 max-interval=2073600 # please create this file and ensure that the user that ez-ipupdate is running # as has write permissions to it then uncomment this line, if you don't your # dyndns account will probably get banned. if you run ez-ipupdate as root (bad # idea, use "run-as-user") then you can just uncomment this line. #cache-file=/etc/ez-ipupdate.cache.eth1 # for the mean time we'll just use a cache file in the temp directory cache-file=/tmp/ez-ipupdate.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 �������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/example-ods.conf��������������������������������������������������������������� 755 � 764 � 764 � 1004 7205605226 12435� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/local/bin/ez-ipupdate -c # # example config file for ez-ipupdate # # this file is actually executable! # service-type=ods user=myuserid:mypassword host=mydomain.ods.org interface=eth1 # if you use run-as ensure the user has permission to write this file cache-file=/tmp/ez-ipupdate.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 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/example-tzo.conf��������������������������������������������������������������� 775 � 764 � 764 � 1227 7205605232 12472� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/local/bin/ez-ipupdate -c # # example config file for ez-ipupdate # # this file is actually executable! # service-type=tzo user=myuserid:mypassword host=mydomain.whatever.com # set address to 0.0.0.0 to go offline # leave it empty to take the address of the connecting interface #address=0.0.0.0 max-interval=2073600 interface=eth1 # if you use run-as ensure the user has permission to write this file cache-file=/tmp/ez-ipupdate.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 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/example-gnudip.conf������������������������������������������������������������ 775 � 764 � 764 � 1166 7205605214 13146� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/local/bin/ez-ipupdate -c # # example config file for ez-ipupdate # # this file is actually executable! # service-type=gnudip user=myuserid:mypassword host=mydomain.whatever.com interface=eth1 max-interval=2073600 # set address to 0.0.0.0 to go offline # any other value is ignored #address=0.0.0.0 # if you use run-as ensure the user has permission to write this file cache-file=/tmp/ez-ipupdate.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 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/example-easydns.conf����������������������������������������������������������� 755 � 764 � 764 � 1015 7205605066 13322� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/local/bin/ez-ipupdate -c # # example config file for ez-ipupdate # # this file is actually executable! # service-type=easydns user=myuserid:mypassword host=mydomain.whatever.com interface=eth1 # if you use run-as ensure the user has permission to write this file cache-file=/tmp/ez-ipupdate.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 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/example-justlinux.conf��������������������������������������������������������� 755 � 764 � 764 � 1025 7205605224 13716� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/local/bin/ez-ipupdate -c # # example config file for ez-ipupdate # # this file is actually executable! # service-type=justlinux user=myuserid:mypassword host=mydomain.penguinpowered.com interface=eth1 # if you use run-as ensure the user has permission to write this file cache-file=/tmp/ez-ipupdate.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 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/example-dyns.conf�������������������������������������������������������������� 644 � 764 � 764 � 775 7211261130 12605� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/local/bin/ez-ipupdate -c # # example config file for ez-ipupdate # # this file is actually executable! # service-type=dyns user=myuserid:mypassword host=myhost #interface=eth1 # if you use run-as ensure the user has permission to write this file #cache-file=/tmp/ez-ipupdate.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 ���ez-ipupdate-3.0.11b8/CHANGELOG���������������������������������������������������������������������� 644 � 764 � 764 � 22204 7320564150 10602� �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� RCS file: /home/amackay/src/cvsroot/ez-ipupdate/ez-ipupdate.c,v Working file: ez-ipupdate.c head: 1.47 branch: locks: strict access list: symbolic names: release-2_6_0: 1.16 release-2_4_1b: 1.12 v0_9_0: 1.1.1.1 AMACKAY: 1.1.1 keyword substitution: kv total revisions: 48; selected revisions: 48 description: ---------------------------- revision 1.47 date: 2001/07/04 09:56:47; author: amackay; state: Exp; lines: +171 -27 added some new ipv6 tunnel service added run-as-euser fixed hn.org so it works again ---------------------------- revision 1.46 date: 2001/07/04 08:49:26; author: amackay; state: Exp; lines: +421 -239 added easydns partner support re-arranged things to use an array of structs of services ---------------------------- revision 1.45 date: 2001/04/04 17:20:12; author: amackay; state: Exp; lines: +3 -5 bug in the cache file handling that caused a segfault. ---------------------------- revision 1.44 date: 2001/03/31 20:05:51; author: amackay; state: Exp; lines: +11 -4 better handeling of cache file errors. ---------------------------- revision 1.43 date: 2001/03/23 08:46:43; author: amackay; state: Exp; lines: +169 -6 added contributed code for zoneedit service. ---------------------------- revision 1.42 date: 2001/03/23 06:16:06; author: amackay; state: Exp; lines: +129 -26 added init() to services and added get_druation(). ---------------------------- revision 1.41 date: 2001/02/26 06:53:00; author: amackay; state: Exp; lines: +44 -1 added ip address taint checking for dyndns.org ---------------------------- revision 1.40 date: 2000/12/17 22:52:20; author: amackay; state: Exp; lines: +2 -2 version 3.0.4, interface resolving now works for NetBSD too. ---------------------------- revision 1.39 date: 2000/12/17 19:30:06; author: amackay; state: Exp; lines: +4 -4 fix for hn.org that cause the ip address to be ignored. ---------------------------- revision 1.38 date: 2000/11/30 09:35:49; author: amackay; state: Exp; lines: +41 -26 fixed bug in the pidfile code and made IF_LOOKUP work for solaris. ---------------------------- revision 1.37 date: 2000/11/29 20:27:26; author: amackay; state: Exp; lines: +26 -3 fixed some fgets() calls, fixed an include problem with cache_file.h and added example-dyns.conf to the dist. ---------------------------- revision 1.36 date: 2000/11/24 23:14:33; author: amackay; state: Exp; lines: +261 -34 added support for hn.org and the use of a pid file. ---------------------------- revision 1.35 date: 2000/11/18 23:04:21; author: amackay; state: Exp; lines: +11 -10 updated config files ---------------------------- revision 1.34 date: 2000/11/18 22:35:32; author: amackay; state: Exp; lines: +276 -365 switched symantics so that you now must specify either an interface or an address for daemon mode. cleanup all the update functions and the check_info functions. fixed some bugs, fixed a MAJOR bug that I introduced in some time after 2.9.1 that caused daemon mode to not update properly (and get a lot of people banned, oops!). fixed the update code so that it is self throtlling (should have done that from the get go, espesially since adding the not updating properly in daemon mode bug). a major overhaul, thus -> 3.0.0 ---------------------------- revision 1.33 date: 2000/11/18 20:54:12; author: amackay; state: Exp; lines: +21 -25 pre manditory interface ---------------------------- revision 1.32 date: 2000/11/17 11:34:46; author: amackay; state: Exp; lines: +634 -206 added support for dyns and fixed up stuff for dyndns ---------------------------- revision 1.31 date: 2000/10/31 05:51:51; author: amackay; state: Exp; lines: +119 -28 updated to nic v2.0 for dyndns, also fixed some problems with not asking for a host. ---------------------------- revision 1.30 date: 2000/10/23 17:54:17; author: amackay; state: Exp; lines: +4 -7 fixed some minor things in the code and cleaned up the example config files ---------------------------- revision 1.29 date: 2000/10/23 09:52:27; author: amackay; state: Exp; lines: +8 -11 took out some debugging stuff and fixed exit() calls in daemon mode for cache file code. ---------------------------- revision 1.28 date: 2000/10/23 09:48:29; author: amackay; state: Exp; lines: +188 -28 added support for a cache file for use across reboots and such. ---------------------------- revision 1.27 date: 2000/10/16 06:57:12; author: amackay; state: Exp; lines: +4 -2 . ---------------------------- revision 1.26 date: 2000/10/16 06:52:39; author: amackay; state: Exp; lines: +292 -38 added support for justlinux v2.0, now pgpow is justlinux v1.0 and justlinux is justlinux v2.0. ---------------------------- revision 1.25 date: 2000/09/06 01:46:51; author: amackay; state: Exp; lines: +9 -2 added ip address as an arg if in deamon mode and using post update script. ---------------------------- revision 1.24 date: 2000/09/05 03:25:13; author: amackay; state: Exp; lines: +2 -1 bug in configure.in for easydns. ---------------------------- revision 1.23 date: 2000/08/22 17:23:16; author: amackay; state: Exp; lines: +262 -83 added support for easydns ---------------------------- revision 1.22 date: 2000/08/18 16:03:16; author: amackay; state: Exp; lines: +3 -3 forgot to take out the mcheck() ing for non-debug releases. ---------------------------- revision 1.21 date: 2000/08/03 02:22:32; author: amackay; state: Exp; lines: +5 -6 minor bugs, taking off the trailing slash for dyndns. ---------------------------- revision 1.20 date: 2000/08/02 09:45:09; author: amackay; state: Exp; lines: +454 -67 merged in all of Jeremy Bopp's changes. these are a couple of bug fixes and support for tzo and gundip. also changed do_connect so that it closes fd if any errors. ---------------------------- revision 1.19 date: 2000/08/02 09:42:38; author: amackay; state: Exp; lines: +3 -3 fixed un-noticeable bug ---------------------------- revision 1.18 date: 2000/07/27 14:14:17; author: amackay; state: Exp; lines: +30 -20 fixed a big old bug in the max_interval stuff, thanks to Jasper for finding that one. fixed some stuff with running the command. ---------------------------- revision 1.17 date: 2000/07/26 07:41:02; author: amackay; state: Exp; lines: +179 -65 added shell command execution and cleaned up some stuff that needed cleanin' ---------------------------- revision 1.16 date: 2000/07/24 08:05:55; author: amackay; state: Exp; lines: +6 -6 version 2.6.0, this fixes the example file for dyndns to have the max-interval thing in there. also fixes where the sleep goes in dhs updates. ---------------------------- revision 1.15 date: 2000/07/12 07:43:23; author: amackay; state: Exp; lines: +239 -16 added support for ods.org ---------------------------- revision 1.14 date: 2000/07/12 06:27:10; author: amackay; state: Exp; lines: +2 -1 added line to help about the max time between updates for dhs.org users, the option was always there just not listed in the help message. ---------------------------- revision 1.13 date: 2000/04/20 06:59:07; author: amackay; state: Exp; lines: +31 -6 added support for dyndns-static ---------------------------- revision 1.12 date: 2000/04/19 04:26:07; author: amackay; state: Exp; lines: +235 -23 added support for dyndns.org and some cleanups. ---------------------------- revision 1.11 date: 2000/04/01 18:20:13; author: amackay; state: Exp; lines: +149 -5 release 2.2.2, added update of mx record for stupid dhs.org ---------------------------- revision 1.10 date: 2000/03/17 09:15:06; author: amackay; state: Exp; lines: +2 -2 comment change ---------------------------- revision 1.9 date: 2000/03/17 08:45:26; author: amackay; state: Exp; lines: +3 -1 fixed socket leak for dhs and pgpow code. ---------------------------- revision 1.8 date: 2000/02/29 09:39:12; author: amackay; state: Exp; lines: +303 -47 release 2.1.0b, added dhs code. ---------------------------- revision 1.7 date: 2000/02/29 07:17:08; author: amackay; state: Exp; lines: +95 -27 I can't remember, probably the updates for 2.0.0 or 2.0.1 ---------------------------- revision 1.6 date: 1999/07/13 05:44:46; author: amackay; state: Exp; lines: +297 -16 check in, this version has a very strange coreing condition. ---------------------------- revision 1.5 date: 1999/05/11 22:38:01; author: amackay; state: Exp; lines: +14 -3 added BSD daemon support. ---------------------------- revision 1.4 date: 1999/04/21 03:12:26; author: amackay; state: Exp; lines: +25 -9 added some signal stuff. ---------------------------- revision 1.3 date: 1999/04/20 07:59:51; author: amackay; state: Exp; lines: +2 -2 fixed some docs ---------------------------- revision 1.2 date: 1999/04/20 07:55:41; author: amackay; state: Exp; lines: +425 -89 added a bunch o stuff: Version 1.0.1 brings some new features such the useage of config files, timeouts on I/O, set user id and many more. ---------------------------- revision 1.1 date: 1999/04/19 00:34:59; author: amackay; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 1999/04/19 00:34:59; author: amackay; state: Exp; lines: +0 -0 a client for the ez-ip.net dynamic domain service. ============================================================================= ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/mkbinary����������������������������������������������������������������������� 755 � 764 � 764 � 1266 7254745603 11131� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # exes="ez-ipupdate" files="ez-ipupdate.lsm README example*.conf" arch=`uname -m` case $arch in i?86) arch=i386;; sun*) arch=sparc;; ppc) arch=ppc;; *) ;; esac os=`uname -s | tr '[A-Z]' '[a-z]'` make || { echo "error encountered"; exit 1; } version=`./ez-ipupdate -V | awk '{print $3}'` dir=ez-ipupdate-${version}-${os}-${arch} rm -rf $dir mkdir $dir || { echo "error encountered"; exit 1; } for f in $exes; do strip $f; done cp $exes $dir || { echo "error encountered"; exit 1; } cp $files $dir || { echo "error encountered"; exit 1; } GZIP=--best tar chozf $dir.tar.gz $dir || { echo "error encountered"; exit 1; } rm -rf $dir echo "package $dir.tar.gz created" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ez-ipupdate-3.0.11b8/example-heipv6tb.conf���������������������������������������������������������� 644 � 764 � 764 � 1757 7321676310 13414� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/local/bin/ez-ipupdate -c # # example config file for ez-ipupdate # # this file is actually executable! # service-type=heipv6tb #service-type=dyndns-static user=myuserid:mypassword interface=eth1 max-interval=2073600 # please create this file and ensure that the user that ez-ipupdate is running # as has write permissions to it then uncomment this line, if you don't your # dyndns account will probably get banned. if you run ez-ipupdate as root (bad # idea, use "run-as-user") then you can just uncomment this line. #cache-file=/etc/ez-ipupdate.cache.eth1 # for the mean time we'll just use a cache file in the temp directory cache-file=/tmp/ez-ipupdate.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 # for more security use one of the following (run-as-euser is not secure): #run-as-user=nobody #run-as-euser=nobody ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������