# make the Distributed Checksum Clearinghouse prototype home directory files # Copyright (c) 2006 by Rhyolite Software, LLC # # This agreement is not applicable to any entity which sells anti-spam # solutions to others or provides an anti-spam solution as part of a # security solution sold to other entities, or to a private network # which employs the DCC or uses data provided by operation of the DCC # but does not provide corresponding data to other users. # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # Parties not eligible to receive a license under this agreement can # obtain a commercial license to use DCC and permission to use # U.S. Patent 6,330,590 by contacting Commtouch at http://www.commtouch.com/ # or by email to nospam@commtouch.com. # # A commercial license would be for Distributed Checksum and Reputation # Clearinghouse software. That software includes additional features. This # free license for Distributed ChecksumClearinghouse Software does not in any # way grant permision to use Distributed Checksum and Reputation Clearinghouse # software # # THE SOFTWARE IS PROVIDED "AS IS" AND RHYOLITE SOFTWARE, LLC DISCLAIMS ALL # WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL RHYOLITE SOFTWARE, LLC # BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, # ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. # Rhyolite Software DCC 1.3.50-1.45 $Revision$ # @configure_input@ DEPTH =.. @MAKE_PROG@ @MAKE_INC2@ HINST =$(INSTALL) -c $(SET_DCCOWN) DIR =@installroot@$(DCC_HOMEDIR) all: @: # /dev/random is overkill for the security needed here, but people who # understand less than they think they do don't understand that. # /dev/*random is also not always available # But if it makes them happy ... RSTRING=(ps; dd if=/dev/random count=1 2>&1) | cksum | tr ' ' xy install: if test ! -d $(DIR); then\ $(HINST) -m 755 -d $(DIR); fi if test ! -d $(DIR)/log; then\ $(HINST) -m 710 -d $(DIR)/log; fi $(INSTALL) -m 644 dcc_conf $(DIR)/dcc_conf.dist; \ for nm in flod grey_flod whitelist grey_whitelist\ whiteclnt whitecommon; do\ if test ! -f $(DIR)/$$nm; then\ $(INSTALL) -m 644 $$nm $(DIR)/$$nm.dist; fi; done if test ! -f $(DIR)/ids -a ! -f $(DIR)/map -a ! -f $(DIR)/map.txt; then\ umask 077; PASSWD1=`$(RSTRING)`; PASSWD2=`$(RSTRING)`;\ sed -e "s/secret1/$$PASSWD1/" map.txt >$(DIR)/map.txt.dist;\ sed -e "s/secret1/$$PASSWD1/" -e "s/secret2/$$PASSWD2/" ids\ >$(DIR)/ids.dist;\ ${DEPTH}/cdcc/cdcc -qh $(DIR) 'new map; load $(DIR)/map.txt.dist';\ set +e; chown $(DCC_SUID) $(DIR)/map.txt.dist\ $(DIR)/map $(DIR)/ids.dist;\ fi deinstall: for NM in dcc_conf flod grey_flod whiteclnt whitecommon\ whitelist grey_whitelist; do\ if test ! -f $(DIR)/$$NM; then continue; fi;\ if test `diff $$NM $(DIR)/$$NM\ | sed -e '/^---$$/d' -e '/^[^<>]/d'\ -e '/^[<>][ ]*#/d' -e '/^[<>][ ]*$$/d'\ | wc -l` -eq 0; then rm $(DIR)/$$NM; fi; done; -rm -f $(DIR)/dcc_conf-new -if test -d $(DIR); then\ find $(DIR) -name '*.dcc[xw]' | @DCC_XARGS@ rm -f ;\ rmdir $(DIR)/log;\ fi