diff options
-rwxr-xr-x | httpd/autobuild | 537 | ||||
-rw-r--r-- | httpd/src/.cvsignore | 1 | ||||
-rw-r--r-- | httpd/src/Makefile | 218 | ||||
-rw-r--r-- | httpd/src/ntnsapi.c | 164 | ||||
-rw-r--r-- | httpd/src/unixso.exp | 38 | ||||
-rw-r--r-- | include/nt/messages.h | 447 | ||||
-rw-r--r-- | include/nt/nsapi.h | 143 | ||||
-rw-r--r-- | include/nt/ntos.h | 192 | ||||
-rw-r--r-- | include/nt/regparms.h | 620 | ||||
-rw-r--r-- | include/nt/resource.h | 73 | ||||
-rw-r--r-- | lib/libnt/Makefile | 59 | ||||
-rw-r--r-- | lib/libnt/info.c | 118 | ||||
-rw-r--r-- | lib/libnt/path.c | 303 | ||||
-rw-r--r-- | lib/libnt/pmddeml.c | 412 | ||||
-rw-r--r-- | lib/libnt/registry.c | 279 | ||||
-rw-r--r-- | lib/libnt/service.c | 412 | ||||
-rw-r--r-- | lib/libnt/tcpip.c | 182 |
17 files changed, 0 insertions, 4198 deletions
diff --git a/httpd/autobuild b/httpd/autobuild deleted file mode 100755 index 1818f249..00000000 --- a/httpd/autobuild +++ /dev/null @@ -1,537 +0,0 @@ -#!/bin/sh -# -# BEGIN COPYRIGHT BLOCK -# 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; version 2 of the License. -# -# 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. -# -# In addition, as a special exception, Red Hat, Inc. gives You the additional -# right to link the code of this Program with code not covered under the GNU -# General Public License ("Non-GPL Code") and to distribute linked combinations -# including the two, subject to the limitations in this paragraph. Non-GPL Code -# permitted under this exception must only link to the code of this Program -# through those well defined interfaces identified in the file named EXCEPTION -# found in the source code files (the "Approved Interfaces"). The files of -# Non-GPL Code may instantiate templates or use macros or inline functions from -# the Approved Interfaces without causing the resulting work to be covered by -# the GNU General Public License. Only Red Hat, Inc. may make changes or -# additions to the list of Approved Interfaces. You must obey the GNU General -# Public License in all respects for all of the Program code and other code used -# in conjunction with the Program except the Non-GPL Code covered by this -# exception. If you modify this file, you may extend this exception to your -# version of the file, but you are not obligated to do so. If you do not wish to -# provide this exception without modification, you must delete this exception -# statement from your version and license this file solely under the GPL without -# exception. -# -# -# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. -# Copyright (C) 2005 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK -# - -UNAME=`../nsarch` -NSUNAME=`uname -s | sed -e 's%/%_%g'``uname -r` -DATE="`date +%d-%h`" - -# OS tweaks - -if [ "$UNAME" = "SUNOS4" ]; then - PATH=/usr/local/sun4/bin:/usr/bin/X11:$PATH; export PATH - GTAR=/share/builds/f/gtar/bin/sunos-gtar - HTTPDLIB=ns-httpd.so - -elif [ "$UNAME" = "SOLARIS" ]; then - PATH=/usr/ccs/bin:/usr/openwin/bin:$PATH; export PATH - OPENWINHOME=/usr/openwin; export OPENWINHOME - GTAR=/share/builds/f/gtar/bin/solaris-gtar - HTTPDLIB=ns-httpd.so - -elif [ "$UNAME" = "SOLARISx86" ]; then - PATH=/usr/ccs/bin:/usr/openwin/bin:$PATH; export PATH - OPENWINHOME=/usr/openwin; export OPENWINHOME - HTTPDLIB=ns-httpd.so - -elif [ "$UNAME" = "HPUX" ]; then - PATH=/usr/local/hpux/bin:/usr/bin/X11:$PATH; export PATH - GTAR=/share/builds/f/gtar/bin/hpux-gtar - ARCH=`uname -m` - if [ "$ARCH" = "ia64" ]; then - HTTPDLIB=libnshttpd.so - else - HTTPDLIB=libnshttpd.sl - fi - -elif [ "$UNAME" = "BSDI" ]; then - PATH=/usr/local/bin:/usr/X11/bin:$PATH; export PATH - GTAR=/share/builds/f/gtar/bin/bsdi-gtar - -elif [ "$UNAME" = "OSF1" ]; then -# NOJAVA=true - PATH=/usr/local/dec/bin:/usr/bin/X11:$PATH; export PATH - GTAR=/share/builds/f/gtar/bin/osf1-gtar - HTTPDLIB=ns-httpd.so - -elif [ "$UNAME" = "AIX" ]; then - PATH=/usr/local/aix32/bin:/usr/bin/X11:$PATH; export PATH - GTAR=/share/builds/f/gtar/bin/aix-gtar - HTTPDLIB=ns-httpd.a - -elif [ "$UNAME" = "IRIX" ]; then - GTAR=/share/builds/f/gtar/bin/irix-gtar - HTTPDLIB=ns-httpd.so - -elif [ "$UNAME" = "SONY" ]; then - PATH=/usr/bin/X11:$PATH; export PATH - HTTPDLIB=ns-httpd.so - -elif [ "$UNAME" = "NECSVR4" ]; then - PATH=/u/malmer/nec/usr/local/bin:/usr/bin/X11:$PATH; export PATH - HTTPDLIB=ns-httpd.so - -elif [ "$UNAME" = "ReliantUNIX" ]; then - PATH=/usr/local/bin:$PATH; export PATH - GTAR=tar - HTTPDLIB=ns-httpd.so - -elif [ "$UNAME" = "SCO" ]; then - PATH=/usr/local/bin:/usr/bin/X11:$PATH; export PATH - GTAR=/usr/local/bin/gtar - HTTPDLIB=ns-httpd.so - -elif [ "$UNAME" = "UNIXWARE" ]; then - PATH=/usr/local/bin:/usr/bin/X11:$PATH; export PATH - GTAR=/usr/local/bin/gtar - HTTPDLIB=ns-httpd.so - -fi - -set -- `getopt p: $*` || { - echo "### `basename $0`: ERROR: unknown option" 1>&2 - exit 1 -} - -BuildInPhases=0 - -while [ "$1" != "--" ] ; do - case "$1" in - -p) BuildInPhases=1; shift; Phase=$1 - ;; - esac - shift -done -shift - - -buildit() { - -# Initialize some variables - -ADMINDIR=../built/$UNAME-$SECTYPE-admserv -if [ "$PRODUCT" = "personal" ]; then - BINDIR=httpd - TARNAME=nshttpd.tar -elif [ "$PRODUCT" = "catalog" ]; then - BINDIR=catalog - TARNAME=ns-catalog.tar -elif [ "$PRODUCT" = "rds" ]; then - BINDIR=rds - TARNAME=ns-rds.tar -elif [ "$PRODUCT" = "cms" ]; then - BINDIR=https - TARNAME=ns-cms.tar -else - BINDIR=https - TARNAME=nshttps.tar -fi -SOURCEDIR=../built/$UNAME-$SECTYPE-$BINDIR -TARGETDIR=$TYPE/$UNAME-$SECTYPE-$BINDIR -TARGETUNTAR=$TYPE/$UNAME-$SECTYPE-$BINDIR/untarred - -TARGETHTBIN=$TYPE/$UNAME-$SECTYPE-$BINDIR/untarred/bin/$BINDIR -mkdir -p $TARGETUNTAR 2> /dev/null - -if [ $BuildInPhases = 1 ] -then - if [ "$Phase" = "server" ] - then - buildserver - elif [ "$Phase" = "admin" ] - then - buildadmin - elif [ "$Phase" = "batman" ] - then - buildbatman - elif [ "$Phase" = "tar" ] - then - (cd $TARGETUNTAR; tar cvf ../$TARNAME *) - else - echo "`basename $0`: ERROR: unknown build phase" - exit 1 - fi -else - buildserver - buildadmin - buildbatman - (cd $TARGETUNTAR; tar cvf ../$TARNAME *) -fi -} - -buildserver() { - -(cd ..; ./config $BOMB $PRODUCT $SECCONFIG $OPTIMIZE) -gmake - -if [ $? -ne 0 ]; then - exit 2 -fi - -(cd ../mc-icons; gmake) -if [ $? -ne 0 ]; then - exit 2 -fi - -(cd ../include; gmake) -if [ $? -ne 0 ]; then - exit 2 -fi - -(cd nsapi; gmake) -if [ $? -ne 0 ]; then - exit 2 -fi - -(cd extras; gmake) -if [ $? -ne 0 ]; then - exit 2 -fi - -if [ "$NOJAVA" != "true" ]; then - (cd ../lib/sjava; gmake) - if [ $? -ne 0 ]; then - exit 2 - fi -fi - -# generate DBMs in admin/bin directory -(cd $SOURCEDIR/admin/bin; ./mkdbm) - -# Each product has different manuals -if [ "$BINDIR" = "catalog" -o "$BINDIR" = "rds" ]; then - # Batman - ADMINMANUALS="html/manual/ag html/manual/design html/manual/beta2" -else - # Enterprise and FastTrack - ADMINMANUALS="html/manual/ag html/manual/pg html/manual/javascript" -fi -for i in icons html html/info html/manual $ADMINMANUALS bin; do - mkdir -p $TARGETUNTAR/bin/$BINDIR/admin/$i - cp $SOURCEDIR/admin/$i/* $TARGETHTBIN/admin/$i -done - -/bin/rm -f $TARGETHTBIN/admin/bin/*.o -$STRIP $TARGETHTBIN/admin/bin/* - -for i in misc icons html bin; do - mkdir -p $TARGETHTBIN/install/$i - cp $SOURCEDIR/install/$i/* $TARGETHTBIN/install/$i -done -$STRIP $TARGETHTBIN/install/bin/* -mv $TARGETHTBIN/install/bin/ns-setup $TARGETDIR -mv $TARGETHTBIN/install/bin/ns-config $TARGETHTBIN/ns-config - - -mkdir -p $TARGETUNTAR/ns-icons -cp $SOURCEDIR/mc-icons/* $TARGETUNTAR/ns-icons - -if [ -d $SOURCEDIR/nsapi -a "$UNAME" != "BSDI" ]; then - mkdir -p $TARGETUNTAR/nsapi - cp -r $SOURCEDIR/nsapi/* $TARGETUNTAR/nsapi -fi - -mkdir -p $TARGETUNTAR/extras -cp -r $SOURCEDIR/extras/* $TARGETUNTAR/extras -$STRIP $TARGETUNTAR/extras/*/* - -cp $SOURCEDIR/ns-httpd $TARGETHTBIN/ns-httpd -if [ "$HTTPDLIB" != "" ]; then - cp $SOURCEDIR/$HTTPDLIB $TARGETHTBIN/$HTTPDLIB -fi -$STRIP $TARGETHTBIN/ns-httpd -if [ "$UNAME" != "IRIX" -a "$UNAME" != "SUNOS4" ]; then - $STRIP $TARGETHTBIN/$HTTPDLIB -fi - -if [ "$UNAME" = "AIX" ]; then - cp /usr/lib/libsvld.a $TARGETHTBIN/libsvld.a -fi - - -cp README $TARGETDIR -cp newinst/misc/license.txt $TARGETDIR - -mkdir -p $TARGETUNTAR/userdb -mkdir -p $TARGETUNTAR/httpacl -mkdir -p $TARGETUNTAR/authdb -mkdir -p $TARGETUNTAR/authdb/default - -if [ "$PRODUCT" = "enterprise" ]; then -mkdir -p $TARGETUNTAR/plugins/search/admin -mkdir -p $TARGETUNTAR/plugins/search/tmp -chmod a+w $TARGETUNTAR/plugins/search/tmp -mkdir -p $TARGETUNTAR/plugins/search/collections -chmod a+w $TARGETUNTAR/plugins/search/collections -cp -r plugins/search $TARGETUNTAR/plugins -(cd $TARGETUNTAR/plugins/search; rm -r `find . -name CVS -print`) -cp $SOURCEDIR/lib/vsearch $TARGETUNTAR/plugins/search/vsearch -cp $SOURCEDIR/admin/bin/ia* $TARGETUNTAR/plugins/search/vsearch -$STRIP $TARGETUNTAR/plugins/search/vsearch/ia* -cp ../lib/libsearch/searching/query.err $TARGETUNTAR/plugins/search/vsearch -mkdir -p $TARGETUNTAR/plugins/search/ui/icons -mkdir -p $TARGETUNTAR/plugins/search/ui/usa -cp ../lib/libsearch/searching/ui/icons/* $TARGETUNTAR/plugins/search/ui/icons -cp ../lib/libsearch/searching/ui/usa/* $TARGETUNTAR/plugins/search/ui/usa - -mkdir -p $TARGETUNTAR/plugins/snmp -mkdir -p $TARGETUNTAR/plugins/snmp/magt -mkdir -p $TARGETUNTAR/plugins/snmp/sagt -if [ -d $SOURCEDIR/plugin/snmp -a -f $SOURCEDIR/plugin/snmp/httpagt ]; then - cp $SOURCEDIR/plugin/snmp/httpagt $TARGETUNTAR/plugins/snmp/httpagt -fi -cp plugins/snmp/netscape.pub $TARGETUNTAR/plugins/snmp/netscape.mib - -mkdir -p $TARGETUNTAR/plugins/mks/bin - cp $SOURCEDIR/plugins/mks/bin/*.so $TARGETUNTAR/plugins/mks/bin - -if [ "$UNAME" = "SUNOS4" ]; then - cp ../../../peer/sunos/magt/* $TARGETUNTAR/plugins/snmp/magt - cp ../../../peer/sunos/sagt/* $TARGETUNTAR/plugins/snmp/sagt -elif [ "$UNAME" = "SOLARIS" ]; then - cp ../../../peer/solaris/magt/* $TARGETUNTAR/plugins/snmp/magt - cp ../../../peer/solaris/sagt/* $TARGETUNTAR/plugins/snmp/sagt -elif [ "$UNAME" = "HPUX" ]; then - cp ../../../peer/hp/magt/* $TARGETUNTAR/plugins/snmp/magt - cp ../../../peer/hp/sagt/* $TARGETUNTAR/plugins/snmp/sagt -elif [ "$UNAME" = "OSF1" ]; then - cp ../../../peer/osf/magt/* $TARGETUNTAR/plugins/snmp/magt - cp ../../../peer/osf/sagt/* $TARGETUNTAR/plugins/snmp/sagt -elif [ "$UNAME" = "AIX" ]; then - cp ../../../peer/aix/magt/* $TARGETUNTAR/plugins/snmp/magt - cp ../../../peer/aix/sagt/* $TARGETUNTAR/plugins/snmp/sgat -elif [ "$UNAME" = "IRIX" ]; then - cp ../../../peer/irix/magt/* $TARGETUNTAR/plugins/snmp/magt - cp ../../../peer/irix/sagt/* $TARGETUNTAR/plugins/snmp/sagt -fi -fi # PRODUCT = enterprise - - -if [ "$NOJAVA" != "true" ]; then - mkdir -p $TARGETUNTAR/plugins/java/bin - cp $SOURCEDIR/lib/libsjava.so $TARGETUNTAR/plugins/java/bin - - mkdir -p $TARGETUNTAR/plugins/java/classes - cp ../../sun-java/classsrc/serv2_0.zip $TARGETUNTAR/plugins/java/classes - - cp plugins/java/javac $TARGETUNTAR/plugins/java - cp plugins/java/README $TARGETUNTAR/plugins/java - - mkdir -p $TARGETUNTAR/plugins/java/applets - cp plugins/java/applets/* $TARGETUNTAR/plugins/java/applets - -# mkdir -p $TARGETUNTAR/plugins/java/local-classes -# cp plugins/java/local-classes/* $TARGETUNTAR/plugins/java/local-classes - -# XXXrobm these docs assume that we have Sun's HTML and images -# mkdir -p $TARGETUNTAR/plugins/java/docs/images -# cp plugins/java/docs/*.html $TARGETUNTAR/plugins/java/docs -# cp ../../sun-java/javadoc/*.gif $TARGETUNTAR/plugins/java/docs/images -fi - -mkdir $TARGETUNTAR/install -cp ./newinst/src/upgrade $TARGETUNTAR/install -cp ./newinst/src/ObjConf.pm $TARGETUNTAR/install -cp ./newinst/src/Magnus.pm $TARGETUNTAR/install -cp ./newinst/src/start $TARGETUNTAR/install -cp ./newinst/src/stop $TARGETUNTAR/install -cp ./newinst/src/restart $TARGETUNTAR/install -cp ./newinst/src/rotate $TARGETUNTAR/install -cp ./newinst/perl5/$UNAME-perl5/perl $TARGETUNTAR/install -cp ./newinst/perl5/artistic $TARGETUNTAR/install -if [ "$UNAME" = "IRIX" ] || [ "$UNAME" = "SOLARIS" ] || [ "$UNAME" = "OSF1" ] ; then - cp ./newinst/src/kernelThreads.pl $TARGETUNTAR/install/threads.pl -fi -cp $SOURCEDIR/extras/database/mkuser $TARGETUNTAR/install -cp $SOURCEDIR/extras/database/ndbmdump $TARGETUNTAR/install -cp $SOURCEDIR/extras/database/rcert11 $TARGETUNTAR/install -cp $SOURCEDIR/extras/database/rkey11 $TARGETUNTAR/install -$STRIP $TARGETUNTAR/install/* - -if [ "$DO_LIVEWIRE" = "yes" ]; then - if [ "$UNAME" = "IRIX" ] ; then - PLATSFX=sgi - elif [ "$UNAME" = "SOLARIS" ] ; then - PLATSFX=sol - elif [ "$UNAME" = "HPUX" ] ; then - PLATSFX=hpx - fi - LIVEWIRETAR=livewire_$PLATSFX.tar - if [ -d $TARGETUNTAR/LiveWire ]; then - rm -rf $TARGETUNTAR/LiveWire - fi - mkdir $TARGETUNTAR/LiveWire - cp ./newinst/src/$LIVEWIRETAR.gz $TARGETUNTAR/LiveWire - gunzip $TARGETUNTAR/LiveWire/$LIVEWIRETAR - (cd $TARGETUNTAR/LiveWire; tar xf livewire*.tar) - cp $TARGETUNTAR/LiveWire/server/* $TARGETUNTAR/bin/$BINDIR - cp $TARGETUNTAR/LiveWire/bin/* $TARGETUNTAR/bin/$BINDIR - rm -rf $TARGETUNTAR/LiveWire/server $TARGETUNTAR/LiveWire/bin - rm $TARGETUNTAR/LiveWire/livewire*.tar -fi - - -(cd $TARGETUNTAR; find . -name \*.o -print | xargs rm -f) - -} - -buildadmin() { - -# BONEHEAD -(cd ..; ./config $BOMB admin $SECCONFIG $OPTIMIZE) -(cd ../admserv; gmake) -if [ $? -ne 0 ]; then - exit 2 -fi - -mkdir -p $TARGETUNTAR/admserv -cp $ADMINDIR/ns-admin $TARGETUNTAR/admserv -$STRIP $TARGETUNTAR/admserv/ns-admin - -for i in icons html html/info bin cfgstuff; do - mkdir -p $TARGETUNTAR/bin/admserv/$i - cp $ADMINDIR/cgi/$i/* $TARGETUNTAR/bin/admserv/$i -done -$STRIP $TARGETUNTAR/bin/admserv/bin/* - -} - -buildbatman() { - -# For AutoCatalog from Batman -Darren -if [ "$DO_AUTOCATALOG" = "yes" ]; then - # We need to re-run config to get our own library versions, etc. - (cd ..; ./config $BOMB batman $SECCONFIG $OPTIMIZE) - - # This ugly hack is needed because nspr.a must be rebuilt on - # SOLARIS for batman. There are symbols required by the gcc - # generated code that SparcWorks doesn't provide - nothing links. - - if [ "$UNAME" = "SOLARIS" ]; then - NSPRDIR=../../nspr/src/${NSUNAME}_${NSTAG}.OBJ - mv $NSPRDIR/nspr.a $NSPRDIR/GCCnspr.a - if [ -f $NSPRDIR/SPARCWKnspr.a ] ; then - mv $NSPRDIR/SPARCWKnspr.a $NSPRDIR/nspr.a - else - rm -f $NSPRDIR/*.o - fi - fi - (NS_USE_NATIVE=1; export NS_USE_NATIVE; cd ../batman; gmake MINIRDS_INSTALLDIR="../../httpd/$TARGETUNTAR/plugins" NSAPIDIR="$TARGETUNTAR/nsapi" minirds) - if [ $? -ne 0 ]; then - exit 2 - fi - $STRIP $TARGETUNTAR/plugins/autocatalog/bin/* - $STRIP $TARGETUNTAR/plugins/autocatalog/* - if [ "$UNAME" = "SOLARIS" ] ; then - mv $NSPRDIR/nspr.a $NSPRDIR/SPARCWKnspr.a - mv $NSPRDIR/GCCnspr.a $NSPRDIR/nspr.a - fi -fi - -} - -if [ "`echo $* | grep final`" != "" ]; then - TYPE=final - BOMB=nobomb - -elif [ "`echo $* | grep beta`" != "" ]; then - TYPE=beta - BOMB=bomb - -else - echo "You must choose to build either a beta or final version." - exit 2 -fi - - -if [ "$NOJAVA" = "" -a "`echo $* | grep java`" != "" ]; then - NOJAVA=false -else - NOJAVA=true -fi - -if [ "$DO_AUTOCATALOG" = "" -a "`echo $* | grep autocatalog`" != "" ]; then - DO_AUTOCATALOG=yes -else - DO_AUTOCATALOG=no -fi -# need to export DO_AUTOCATALOG so that it's passed down through all gmakes -export DO_AUTOCATALOG - -if [ "$DO_LIVEWIRE" = "" ]; then - if [ "`echo $* | grep livewire`" != "" ]; then - DO_LIVEWIRE=yes - else - DO_LIVEWIRE=no - fi -fi -export DO_LIVEWIRE - -OPTIMIZE=optimize -NSTAG=OPT -STRIP=strip -if [ "`echo $* | grep debug`" != "" ]; then - OPTIMIZE=debug - NSTAG=DBG - STRIP=echo -fi - -NSDISTDIR=../../dist/${NSUNAME}_${NSTAG}.OBJ - -if [ "`echo $* | grep personal`" != "" ]; then - PRODUCT=personal -elif [ "`echo $* | grep ns_catalog`" != "" ]; then - PRODUCT=catalog -elif [ "`echo $* | grep ns_rds`" != "" ]; then - PRODUCT=rds -elif [ "`echo $* | grep cms`" != "" ]; then - PRODUCT=cms -else - PRODUCT=enterprise -fi - - -if [ "`echo $* | grep unsecure`" != "" -o "`echo $* | grep all`" != "" ]; then - SECTYPE=none - SECCONFIG=unsecure - buildit -fi - -if [ "`echo $* | grep export`" != "" -o "`echo $* | grep all`" != "" ]; then - SECTYPE=export - SECCONFIG=export - buildit -fi - -if [ "`echo $* | grep domestic`" != "" -o "`echo $* | grep all`" != "" ]; then - SECTYPE=domestic - SECCONFIG=domestic - buildit -fi diff --git a/httpd/src/.cvsignore b/httpd/src/.cvsignore deleted file mode 100644 index e7b97c5b..00000000 --- a/httpd/src/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -.depends diff --git a/httpd/src/Makefile b/httpd/src/Makefile deleted file mode 100644 index f08ce41b..00000000 --- a/httpd/src/Makefile +++ /dev/null @@ -1,218 +0,0 @@ -# -# BEGIN COPYRIGHT BLOCK -# 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; version 2 of the License. -# -# 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. -# -# In addition, as a special exception, Red Hat, Inc. gives You the additional -# right to link the code of this Program with code not covered under the GNU -# General Public License ("Non-GPL Code") and to distribute linked combinations -# including the two, subject to the limitations in this paragraph. Non-GPL Code -# permitted under this exception must only link to the code of this Program -# through those well defined interfaces identified in the file named EXCEPTION -# found in the source code files (the "Approved Interfaces"). The files of -# Non-GPL Code may instantiate templates or use macros or inline functions from -# the Approved Interfaces without causing the resulting work to be covered by -# the GNU General Public License. Only Red Hat, Inc. may make changes or -# additions to the list of Approved Interfaces. You must obey the GNU General -# Public License in all respects for all of the Program code and other code used -# in conjunction with the Program except the Non-GPL Code covered by this -# exception. If you modify this file, you may extend this exception to your -# version of the file, but you are not obligated to do so. If you do not wish to -# provide this exception without modification, you must delete this exception -# statement from your version and license this file solely under the GPL without -# exception. -# -# -# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. -# Copyright (C) 2005 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK -# -# Makefile.cpp for the Netsite Commerce and Communications servers. - -BUILD_ROOT = ../.. - -MODULE=httpdBinary - -ifneq ($(ARCH), WINNT) -OLD_BUILD_ROOT := $(BUILD_ROOT) -BUILD_ROOT := $(shell cd $(OLD_BUILD_ROOT); pwd) -BUILDSO=admin -endif - -HTTPD_DIR=$(OBJDIR) -OBJDEST=$(HTTPD_DIR)/obj - -include $(BUILD_ROOT)/nsconfig.mk - -ifeq ($(ARCH), WINNT) -DLLS=$(HTTPD_DIR)/$(HTTPDLL_NAME).dll -HTTPD_LIB=$(HTTPD_DIR)/$(HTTPDLL_NAME).lib -EXTRA_LIBS+=$(NSPRLINK) - -ifeq ($(BSCINFO), yes) -BSCS=$(HTTPD_DIR)/httpd.bsc -endif - -else -BINS=$(HTTPD_DIR)/ns-httpd -endif - -ifeq ($(ARCH), SCO) -EXTRA_OPTS := -Wl,-Bexport -endif - -ifeq ($(ARCH), UNIXWARE) -EXTRA_OPTS := -W l,-Bexport -endif - -ifeq ($(ARCH), NCR) -EXTRA_OPTS := -Wl,-Bexport -endif - -ifeq ($(ARCH), SUNOS4) -EXTRA_LIBS=-nostdlib /usr/lib/libc.a -endif - -ifeq ($(ARCH), AIX) -EXTRA_OPTS = -blibpath:../../bin/https:$(DEF_LIBPATH) -endif - -ifeq ($(ARCH), SOLARIS) -EXTRA_LIBS=$(GCCLIBS) -endif - -ifeq ($(ARCH), WINNT) -OS_TARGETS= admin $(DLLS) -endif - -all: $(OBJDEST) $(OS_TARGETS) $(BINS) $(BSCS) - -include unixso.mk - -ifeq ($(ARCH), HPUX) -comma:=, -#EXTRA_LIBS +=/opt/CC/lib/cxxshl.o -EXTRA_LIBS += $(NSCP_DISTDIR)/lib/libprstrms.$(LIB_SUFFIX) -EXTRA_LIBS := $(subst -E,-E$(comma)+s,$(EXTRA_LIBS)) -EXTRA_OPTS := -Wl,+s,-E -#The extra library below is required to debug shared libraries. -ifeq ($(BUILD_DEBUG), full) -EXTRA_LIBS += /opt/langtools/lib/end.o -endif -# THIS IS A TEMPORARY SOLUTION TO THE HPUX COMPILER LIMITATION. WE -# NEED TO INCLUDE ALL OF THE eh/LIBC object files into our main executable -# to avoid having undefined symbols with plugins. -LIBCARCHIVE = /opt/CC/lib/eh/libC.a -endif - -$(OBJDEST): - mkdir -p $(OBJDEST) - -HTTPD_LIBS= - -ifeq ($(ARCH), WINNT) -OSOBJS = ntnsapi.o -FVERSION_FLAGS+=-s$(BUILD_SECURITY) -else -OSOBJS = -endif - -ifneq ($(ARCH), WINNT) -OBJS= -else -OBJS=$(addprefix $(OBJDEST)/, $(OSOBJS) ) -endif - -MODULE_CFLAGS= - -# Unixware linker braindamage. The libnspr.so won't override select -# at link time -ifeq ($(ARCH), UNIXWARE) -OBJS+=$(HTTPD_DIR)/obj/uxwrap.o -endif - -ifeq ($(ARCH), NCR) -#OBJS+=$(HTTPD_DIR)/httpd-lib/nspr20/uxwrap.o -endif - -ifeq ($(ARCH), WINNT) -# Don't define DEPLIBS for NT because standard macros like LINK_EXE -# and LINK_DLL automatically pick up DEPLIBS which we don't always wan't. -# $(LIBDIRMON) (temporily removed) -DEPLIBS = $(addsuffix .$(LIB_SUFFIX), $(addprefix $(OBJDIR)/lib/lib, $(LIBADMIN) $(LIBLDAPU) $(LIBACCESS) $(HTTPD_LIBS))) -DEPLIBS += $(LIBSECURITY) \ - $(LIBNSPR) \ - $(LIBLDAP) - -DEPLINK = /LIBPATH:$(OBJDIR)/lib $(addsuffix .$(LIB_SUFFIX), $(addprefix lib, $(LIBADMIN) $(LIBLDAPU) $(LIBACCESS) $(HTTPD_LIBS))) \ - $(LDAPLINK) $(SECURITYLINK) \ - $(NSPRLINK) -else -# unixso.mk may define DEPLIBS -ifndef DEPLIBS -DEPLIBS = $(addsuffix .$(LIB_SUFFIX), \ - $(addprefix $(OBJDIR)/lib/lib,$(HTTPD_LIBS)) \ - $(OBJDIR)/lib/libaccess \ - $(OBJDIR)/lib/libbase \ - $(OBJDIR)/lib/libsi18n \ - $(LIBSSLIO) -DEPLIBS += $(SECURITY_DEP) \ - $(NSPR_DEP) - -DEPLINK = $(addsuffix .$(LIB_SUFFIX), \ - $(addprefix $(OBJDIR)/lib/lib,$(HTTPD_LIBS)) \ - $(OBJDIR)/lib/libaccess \ - $(OBJDIR)/lib/libbase \ - $(OBJDIR)/lib/libsi18n \ - $(SECURITYLINK) \ - $(NSPRLINK) \ - $(LIBSSLIO) -endif - -endif - -ifndef PRODUCT_IS_DIRECTORY_SERVER -ifeq ($(ARCH), AIX) -ifdef OLD_AIX_LINKING -# why is this redefined here? -CCC = svxlC_r -endif -endif -endif -ifneq ($(ARCH), WINNT) -$(BINS): $(DEPLIBS) $(OBJS) -ifndef PRODUCT_IS_DIRECTORY_SERVER - echo "why are we doing this for directory server?" - cd $(HTTPD_DIR); $(PURIFY) $(CCC) -o ns-httpd $(OBJS) \ - $(EXTRA_OPTS) $(DEPLINK) $(EXTRA_LIBS) -endif # Directory Server -else # WINNT - -$(DLLS): $(OBJS) $(DEPLIBS) - -@echo EXTRA_LIBS = $(EXTRA_LIBS) - $(PURIFY) $(LINK_DLL) $(DEPLINK) $(OBJS) $(EXTRA_LIBS) - cp $(HTTPD_LIB) $(NSCP_DISTDIR)/lib - echo $(DLLS) finished - -$(BINS): $(OBJS) $(EXEOBJS) $(HTTPD_LIB) - rm -f $@ - echo $(BINS) finished - -ifeq ($(BSCINFO), yes) -$(BSCS): $(OBJS) - $(BSCMAKE) $(OBJDEST)/*.sbr -endif -endif - - -include $(INCLUDE_DEPENDS) diff --git a/httpd/src/ntnsapi.c b/httpd/src/ntnsapi.c deleted file mode 100644 index 9124955e..00000000 --- a/httpd/src/ntnsapi.c +++ /dev/null @@ -1,164 +0,0 @@ -/** BEGIN COPYRIGHT BLOCK - * 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; version 2 of the License. - * - * 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. - * - * In addition, as a special exception, Red Hat, Inc. gives You the additional - * right to link the code of this Program with code not covered under the GNU - * General Public License ("Non-GPL Code") and to distribute linked combinations - * including the two, subject to the limitations in this paragraph. Non-GPL Code - * permitted under this exception must only link to the code of this Program - * through those well defined interfaces identified in the file named EXCEPTION - * found in the source code files (the "Approved Interfaces"). The files of - * Non-GPL Code may instantiate templates or use macros or inline functions from - * the Approved Interfaces without causing the resulting work to be covered by - * the GNU General Public License. Only Red Hat, Inc. may make changes or - * additions to the list of Approved Interfaces. You must obey the GNU General - * Public License in all respects for all of the Program code and other code used - * in conjunction with the Program except the Non-GPL Code covered by this - * exception. If you modify this file, you may extend this exception to your - * version of the file, but you are not obligated to do so. If you do not wish to - * provide this exception without modification, you must delete this exception - * statement from your version and license this file solely under the GPL without - * exception. - * - * - * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. - * Copyright (C) 2005 Red Hat, Inc. - * All rights reserved. - * END COPYRIGHT BLOCK **/ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -/* - * Aruna Victor - * NT NSAPI works differently from UNIX. The DLL doesn't know the addresses - * of the functions in the server process and needs to be told them. - */ - -#include <nt/nsapi.h> - -#ifdef BUILD_DLL - -#include <libadmin/libadmin.h> -#include <libaccess/aclproto.h> -#include <base/fsmutex.h> -#include <i18n.h> -#include <base/ereport.h> - -VOID NsapiDummy() -{ - int i = 0; - SafTable = (SafFunction **)MALLOC(400 * sizeof(VOID*)); - - /* Force references to libadmin */ - SafTable[i++] = (SafFunction *)get_userdb_dir; - /* Functions from libadmin:error.c */ - SafTable[i++] = (SafFunction *)report_error; - /* Functions from libadmin:template.c */ - SafTable[i++] = (SafFunction *)helpJavaScriptForTopic; - - /* Force references to base */ - SafTable[i++] = (SafFunction *)fsmutex_init; - -} -#endif /* BUILD_DLL */ - -VOID InitializeSafFunctions() -{ - - SafTable = (SafFunction **)MALLOC(400 * sizeof(VOID *)); - -/* Functions from file.h */ - SafTable[SYSTEM_STAT] = (SafFunction *)system_stat; - SafTable[SYSTEM_FOPENRO] = (SafFunction *)system_fopenRO; - SafTable[SYSTEM_FOPENWA] = (SafFunction *)system_fopenWA; - SafTable[SYSTEM_FOPENRW] = (SafFunction *)system_fopenRW; - SafTable[SYSTEM_NOCOREDUMPS] = (SafFunction *)system_nocoredumps; - SafTable[SYSTEM_FWRITE] = (SafFunction *)system_fwrite; - SafTable[SYSTEM_FWRITE_ATOMIC] = (SafFunction *)system_fwrite_atomic; - SafTable[SYSTEM_WINERR] = (SafFunction *)system_winerr; - SafTable[SYSTEM_WINSOCKERR] = (SafFunction *)system_winsockerr; - - SafTable[FILE_NOTFOUND] = (SafFunction *)file_notfound; - SafTable[FILE_UNIX2LOCAL] = (SafFunction *)file_unix2local; - SafTable[DIR_OPEN] = (SafFunction *)dir_open; - SafTable[DIR_READ] = (SafFunction *)dir_read; - SafTable[DIR_CLOSE] = (SafFunction *)dir_close; - -/* Functions from ereport.h */ - SafTable[EREPORT] = (SafFunction *)ereport ; - -/* Functions from minissl.h */ - SafTable[SSL_CLOSE] = (SafFunction *)PR_Close; - SafTable[SSL_SOCKET] = (SafFunction *)PR_NewTCPSocket; - SafTable[SSL_GET_SOCKOPT] = (SafFunction *)PR_GetSocketOption; - SafTable[SSL_SET_SOCKOPT] = (SafFunction *)PR_SetSocketOption; - SafTable[SSL_BIND] = (SafFunction *)PR_Bind; - SafTable[SSL_LISTEN] = (SafFunction *)PR_Listen; - SafTable[SSL_ACCEPT] = (SafFunction *)PR_Accept; - SafTable[SSL_READ] = (SafFunction *)PR_Read; - SafTable[SSL_WRITE] = (SafFunction *)PR_Write; - SafTable[SSL_GETPEERNAME] = (SafFunction *)PR_GetPeerName; - - -/* Functions from shexp.h */ - SafTable[SHEXP_VALID] = (SafFunction *)shexp_valid; - SafTable[SHEXP_MATCH] = (SafFunction *)shexp_match; - SafTable[SHEXP_CMP] = (SafFunction *)shexp_cmp; - SafTable[SHEXP_CASECMP] = (SafFunction *)shexp_casecmp; - -/* Functions from systhr.h */ - SafTable[SYSTHREAD_START] = (SafFunction *)systhread_start; - SafTable[SYSTHREAD_ATTACH] = (SafFunction *)systhread_attach; - SafTable[SYSTHREAD_TERMINATE] = (SafFunction *)systhread_terminate; - SafTable[SYSTHREAD_SLEEP] = (SafFunction *)systhread_sleep; - SafTable[SYSTHREAD_INIT] = (SafFunction *)systhread_init; - SafTable[SYSTHREAD_NEWKEY] = (SafFunction *)systhread_newkey; - SafTable[SYSTHREAD_GETDATA] = (SafFunction *)systhread_getdata; - SafTable[SYSTHREAD_SETDATA] = (SafFunction *)systhread_setdata; - -/* Functions from systems.h */ - SafTable[UTIL_STRCASECMP] = (SafFunction *)util_strcasecmp; - SafTable[UTIL_STRNCASECMP] = (SafFunction *)util_strncasecmp; - -/* Functions from util.h */ - SafTable[UTIL_HOSTNAME] = (SafFunction *)util_hostname; - SafTable[UTIL_ITOA] = (SafFunction *)util_itoa; - SafTable[UTIL_VSPRINTF] = (SafFunction *)util_vsprintf; - SafTable[UTIL_SPRINTF] = (SafFunction *)util_sprintf; - SafTable[UTIL_VSNPRINTF] = (SafFunction *)util_vsnprintf; - SafTable[UTIL_SNPRINTF] = (SafFunction *)util_snprintf; - - SafTable[LOG_ERROR_EVENT] = (SafFunction *)LogErrorEvent; - -/* Functions from aclproto.h */ - SafTable[ACL_LISTCONCAT] = (SafFunction *)ACL_ListConcat; - -/* Functions from i18n.h */ - SafTable[GETCLIENTLANG] = (SafFunction *)GetClientLanguage; - -/* Functions from file.h */ - SafTable[SYSTEM_FOPENWT] = (SafFunction *)system_fopenWT; - SafTable[SYSTEM_MALLOC] = (SafFunction *)system_malloc; - SafTable[SYSTEM_FREE] = (SafFunction *)system_free; - SafTable[SYSTEM_REALLOC] = (SafFunction *)system_realloc; - SafTable[SYSTEM_STRDUP] = (SafFunction *)system_strdup; - -/* Functions from crit.h */ - SafTable[CRIT_INIT] = (SafFunction *)crit_init; - SafTable[CRIT_ENTER] = (SafFunction *)crit_enter; - SafTable[CRIT_EXIT] = (SafFunction *)crit_exit; - SafTable[CRIT_TERMINATE] = (SafFunction *)crit_terminate; - SafTable[SYSTHREAD_CURRENT] = (SafFunction *)systhread_current; -} diff --git a/httpd/src/unixso.exp b/httpd/src/unixso.exp deleted file mode 100644 index 55aae332..00000000 --- a/httpd/src/unixso.exp +++ /dev/null @@ -1,38 +0,0 @@ -acl_write_rights -acl_read_rights -SEC_ERROR_INVALID_AVA -SEC_ERROR_INPUT_LEN -SEC_ERROR_BAD_KEY -SEC_ERROR_EXPIRED_CERTIFICATE -SSL_ERROR_BAD_CERT_DOMAIN -SEC_ERROR_UNTRUSTED_CERT -SEC_ERROR_UNKNOWN_ISSUER -SEC_ERROR_BAD_SIGNATURE -SEC_ERROR_IO -SEC_ERROR_INVALID_TIME -XP_ERRNO_EWOULDBLOCK -XP_ERRNO_EAGAIN -pr_fdTable -XP_ERRNO_EIO -XP_ERRNO_EISCONN -XP_ERRNO_EINVAL -XP_ERRNO_EBADF -XP_ERRNO_ECONNREFUSED -SSL_ERROR_US_ONLY_SERVER -SSL_ERROR_EXPORT_ONLY_SERVER -SSL_ERROR_BAD_CERTIFICATE -SSL_ERROR_UNSUPPORTED_CERTIFICATE_TYPE -SSL_ERROR_NO_CERTIFICATE -SSL_ERROR_UNSUPPORTED_VERSION -SSL_ERROR_NO_CYPHER_OVERLAP -SSL_ERROR_BAD_SERVER -SSL_ERROR_BAD_CLIENT -SEC_ERROR_OUTPUT_LEN -SEC_ERROR_INVALID_ARGS -SEC_ERROR_BAD_DATA -SEC_ERROR_NO_MEMORY -SEC_ERROR_BAD_DATABASE -SEC_ERROR_BAD_DER -SEC_ERROR_INVALID_ALGORITHM -SEC_ERROR_LIBRARY_FAILURE -SEC_ERROR_BAD_PASSWORD diff --git a/include/nt/messages.h b/include/nt/messages.h deleted file mode 100644 index 35fda4d3..00000000 --- a/include/nt/messages.h +++ /dev/null @@ -1,447 +0,0 @@ -/** BEGIN COPYRIGHT BLOCK - * 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; version 2 of the License. - * - * 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. - * - * In addition, as a special exception, Red Hat, Inc. gives You the additional - * right to link the code of this Program with code not covered under the GNU - * General Public License ("Non-GPL Code") and to distribute linked combinations - * including the two, subject to the limitations in this paragraph. Non-GPL Code - * permitted under this exception must only link to the code of this Program - * through those well defined interfaces identified in the file named EXCEPTION - * found in the source code files (the "Approved Interfaces"). The files of - * Non-GPL Code may instantiate templates or use macros or inline functions from - * the Approved Interfaces without causing the resulting work to be covered by - * the GNU General Public License. Only Red Hat, Inc. may make changes or - * additions to the list of Approved Interfaces. You must obey the GNU General - * Public License in all respects for all of the Program code and other code used - * in conjunction with the Program except the Non-GPL Code covered by this - * exception. If you modify this file, you may extend this exception to your - * version of the file, but you are not obligated to do so. If you do not wish to - * provide this exception without modification, you must delete this exception - * statement from your version and license this file solely under the GPL without - * exception. - * - * - * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. - * Copyright (C) 2005 Red Hat, Inc. - * All rights reserved. - * END COPYRIGHT BLOCK **/ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - - /* - Microsoft Developer Support - Copyright (c) 1992 Microsoft Corporation - - This file contains the message definitions for the Win32 - messages.exe sample program. -------------------------------------------------------------------------- - HEADER SECTION - - The header section defines names and language identifiers for use - by the message definitions later in this file. The MessageIdTypedef, - SeverityNames, FacilityNames, and LanguageNames keywords are - optional and not required. - - - - The MessageIdTypedef keyword gives a typedef name that is used in a - type cast for each message code in the generated include file. Each - message code appears in the include file with the format: #define - name ((type) 0xnnnnnnnn) The default value for type is empty, and no - type cast is generated. It is the programmer's responsibility to - specify a typedef statement in the application source code to define - the type. The type used in the typedef must be large enough to - accomodate the entire 32-bit message code. - - - - The SeverityNames keyword defines the set of names that are allowed - as the value of the Severity keyword in the message definition. The - set is delimited by left and right parentheses. Associated with each - severity name is a number that, when shifted left by 30, gives the - bit pattern to logical-OR with the Facility value and MessageId - value to form the full 32-bit message code. The default value of - this keyword is: - - SeverityNames=( - Success=0x0 - Informational=0x1 - Warning=0x2 - Error=0x3 - ) - - Severity values occupy the high two bits of a 32-bit message code. - Any severity value that does not fit in two bits is an error. The - severity codes can be given symbolic names by following each value - with :name - - - - The FacilityNames keyword defines the set of names that are allowed - as the value of the Facility keyword in the message definition. The - set is delimited by left and right parentheses. Associated with each - facility name is a number that, when shift it left by 16 bits, gives - the bit pattern to logical-OR with the Severity value and MessageId - value to form the full 32-bit message code. The default value of - this keyword is: - - FacilityNames=( - System=0x0FF - Application=0xFFF - ) - - Facility codes occupy the low order 12 bits of the high order - 16-bits of a 32-bit message code. Any facility code that does not - fit in 12 bits is an error. This allows for 4,096 facility codes. - The first 256 codes are reserved for use by the system software. The - facility codes can be given symbolic names by following each value - with :name - - - The LanguageNames keyword defines the set of names that are allowed - as the value of the Language keyword in the message definition. The - set is delimited by left and right parentheses. Associated with each - language name is a number and a file name that are used to name the - generated resource file that contains the messages for that - language. The number corresponds to the language identifier to use - in the resource table. The number is separated from the file name - with a colon. The initial value of LanguageNames is: - - LanguageNames=(English=1:MSG00001) - - Any new names in the source file which don't override the built-in - names are added to the list of valid languages. This allows an - application to support private languages with descriptive names. - - -------------------------------------------------------------------------- - MESSAGE DEFINITION SECTION - - Following the header section is the body of the Message Compiler - source file. The body consists of zero or more message definitions. - Each message definition begins with one or more of the following - statements: - - MessageId = [number|+number] - Severity = severity_name - Facility = facility_name - SymbolicName = name - - The MessageId statement marks the beginning of the message - definition. A MessageID statement is required for each message, - although the value is optional. If no value is specified, the value - used is the previous value for the facility plus one. If the value - is specified as +number then the value used is the previous value - for the facility, plus the number after the plus sign. Otherwise, if - a numeric value is given, that value is used. Any MessageId value - that does not fit in 16 bits is an error. - - The Severity and Facility statements are optional. These statements - specify additional bits to OR into the final 32-bit message code. If - not specified they default to the value last specified for a message - definition. The initial values prior to processing the first message - definition are: - - Severity=Success - Facility=Application - - The value associated with Severity and Facility must match one of - the names given in the FacilityNames and SeverityNames statements in - the header section. The SymbolicName statement allows you to - associate a C/C++ symbolic constant with the final 32-bit message - code. - */ -// -// Values are 32 bit values layed out as follows: -// -// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 -// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 -// +---+-+-+-----------------------+-------------------------------+ -// |Sev|C|R| Facility | Code | -// +---+-+-+-----------------------+-------------------------------+ -// -// where -// -// Sev - is the severity code -// -// 00 - Success -// 01 - Informational -// 10 - Warning -// 11 - Error -// -// C - is the Customer code flag -// -// R - is a reserved bit -// -// Facility - is the facility code -// -// Code - is the facility's status code -// -// -// Define the facility codes -// -#define FACILITY_SYSTEM 0x0 -#define FACILITY_STARTUP 0x5 -#define FACILITY_RUNTIME 0x1 -#define FACILITY_REGISTRY 0x7 -#define FACILITY_NETWORK 0x4 -#define FACILITY_SERVICE 0x3 -#define FACILITY_FILESYSTEM 0x6 -#define FACILITY_CGI 0x2 - - -// -// Define the severity codes -// -#define STATUS_SEVERITY_WARNING 0x2 -#define STATUS_SEVERITY_SUCCESS 0x0 -#define STATUS_SEVERITY_INFORMATIONAL 0x1 -#define STATUS_SEVERITY_ERROR 0x3 - - -// -// MessageId: MSG_BAD_CONF_INIT -// -// MessageText: -// -// Netsite:%1 %2 -// -#define MSG_BAD_CONF_INIT ((DWORD)0xC0050001L) - -// -// MessageId: MSG_BAD_EREPORT_INIT -// -// MessageText: -// -// Netsite:%1 %2 -// -#define MSG_BAD_EREPORT_INIT ((DWORD)0xC0050002L) - -// -// MessageId: MSG_BAD_STARTUP -// -// MessageText: -// -// Netsite:%1 %2 -// -#define MSG_BAD_STARTUP ((DWORD)0xC0050003L) - -// -// MessageId: MSG_BAD_WINSOCK_INIT -// -// MessageText: -// -// Netsite Initialization:%1 %2 -// -#define MSG_BAD_WINSOCK_INIT ((DWORD)0xC0050004L) - -// -// MessageId: MSG_BAD_CGISEM_CREATE -// -// MessageText: -// -// Netsite Initialization:%1 %2 -// -#define MSG_BAD_CGISEM_CREATE ((DWORD)0xC0050005L) - -// -// MessageId: MSG_BAD_PROCESSSEM_CREATE -// -// MessageText: -// -// Netsite:Initialization:%1 %2 -// -#define MSG_BAD_PROCESSSEM_CREATE ((DWORD)0xC0050006L) - -// -// MessageId: MSG_STARTUP_SUCCESSFUL -// -// MessageText: -// -// Netsite:%1 %2 -// -#define MSG_STARTUP_SUCCESSFUL ((DWORD)0x00050007L) - -// -// MessageId: MSG_BAD_REGISTRY_PARAMETER -// -// MessageText: -// -// Netsite:%1 %2 -// -#define MSG_BAD_REGISTRY_PARAMETER ((DWORD)0x80050008L) - -// -// MessageId: MSG_BAD_GENERAL_FUNCTION -// -// MessageText: -// -// Netsite:Execution of Initialization Function failed %1 %2 -// -#define MSG_BAD_GENERAL_FUNCTION ((DWORD)0xC0050009L) - -// -// MessageId: MSG_BAD_SETCIPHERS -// -// MessageText: -// -// Netsite: %1 %2 -// -#define MSG_BAD_SETCIPHERS ((DWORD)0xC0050010L) - -// -// MessageId: MSG_BAD_REGISTRY_KEY_OPEN -// -// MessageText: -// -// Netsite Initialization:Open of %1 %2 -// -#define MSG_BAD_REGISTRY_KEY_OPEN ((DWORD)0xC0050011L) - -// -// MessageId: MSG_BAD_REGISTRY_KEY_ENUM -// -// MessageText: -// -// Netsite Initialization:Enumeration of %1 %2 -// -#define MSG_BAD_REGISTRY_KEY_ENUM ((DWORD)0xC0050012L) - -// -// MessageId: MSG_BAD_REGISTRY_VALUE_ENUM -// -// MessageText: -// -// Netsite Initialization:Enumeration of Values of %1 %2 -// -#define MSG_BAD_REGISTRY_VALUE_ENUM ((DWORD)0xC0050013L) - -// -// MessageId: MSG_BAD_OBJECT_VALUE -// -// MessageText: -// -// Netsite startup:Use Values "name" or "ppath" for object key.Incorrect Parameter %1 %2 -// -#define MSG_BAD_OBJECT_VALUE ((DWORD)0xC0050014L) - -// -// MessageId: MSG_BAD_PBLOCK -// -// MessageText: -// -// Netsite startup:Could not enter Parameter %1 %2 -// -#define MSG_BAD_PBLOCK ((DWORD)0xC0050015L) - -// -// MessageId: MSG_BAD_CLIENT_VALUE -// -// MessageText: -// -// Netsite startup:Use Values "dns" or "ip" for client key.Incorrect Parameter %1 %2 -// -#define MSG_BAD_CLIENT_VALUE ((DWORD)0xC0050016L) - -// -// MessageId: MSG_BAD_DIRECTIVE -// -// MessageText: -// -// Netsite startup:Incorrect Directive Value %1 %2 -// -#define MSG_BAD_DIRECTIVE ((DWORD)0xC0050017L) - -// -// MessageId: MSG_BAD_PARAMETER -// -// MessageText: -// -// Netsite startup:Incorrect Parameter %1 %2 -// -#define MSG_BAD_PARAMETER ((DWORD)0xC0050018L) - -// -// MessageId: MSG_WD_RESTART -// -// MessageText: -// -// Web Server: %1 -// The server terminated abnormally with error code %2. -// An attempt will be made to restart it. -// -#define MSG_WD_RESTART ((DWORD)0xC0050019L) - -// -// MessageId: MSG_WD_STARTFAILED -// -// MessageText: -// -// Web Server: %1 -// The server could not be started. -// Command line used: %2 -// -#define MSG_WD_STARTFAILED ((DWORD)0xC005001AL) - -// -// MessageId: MSG_WD_BADPASSWORD -// -// MessageText: -// -// Web Server: %1 -// Incorrect SSL password entered. -// -#define MSG_WD_BADPASSWORD ((DWORD)0xC005001BL) - -// -// MessageId: MSG_WD_BADCMDLINE -// -// MessageText: -// -// Web Server: %1 -// Invalid command line specified: %2 -// -#define MSG_WD_BADCMDLINE ((DWORD)0xC005001CL) - -// -// MessageId: MSG_WD_STRING -// -// MessageText: -// -// Web Server: %1 -// %2 -// -#define MSG_WD_STRING ((DWORD)0xC005001DL) - -// -// MessageId: MSG_WD_REGISTRY -// -// MessageText: -// -// Web Server: %1 -// Could not open registry key: %2 -// -#define MSG_WD_REGISTRY ((DWORD)0xC005001EL) - -// -// MessageId: MSG_CRON_STARTFAILED -// -// MessageText: -// -// Web Server: %1 -// The scheduled job (%2) could not be started. -// -#define MSG_CRON_STARTFAILED ((DWORD)0xC005001FL) - diff --git a/include/nt/nsapi.h b/include/nt/nsapi.h deleted file mode 100644 index 460293ef..00000000 --- a/include/nt/nsapi.h +++ /dev/null @@ -1,143 +0,0 @@ -/** BEGIN COPYRIGHT BLOCK - * 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; version 2 of the License. - * - * 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. - * - * In addition, as a special exception, Red Hat, Inc. gives You the additional - * right to link the code of this Program with code not covered under the GNU - * General Public License ("Non-GPL Code") and to distribute linked combinations - * including the two, subject to the limitations in this paragraph. Non-GPL Code - * permitted under this exception must only link to the code of this Program - * through those well defined interfaces identified in the file named EXCEPTION - * found in the source code files (the "Approved Interfaces"). The files of - * Non-GPL Code may instantiate templates or use macros or inline functions from - * the Approved Interfaces without causing the resulting work to be covered by - * the GNU General Public License. Only Red Hat, Inc. may make changes or - * additions to the list of Approved Interfaces. You must obey the GNU General - * Public License in all respects for all of the Program code and other code used - * in conjunction with the Program except the Non-GPL Code covered by this - * exception. If you modify this file, you may extend this exception to your - * version of the file, but you are not obligated to do so. If you do not wish to - * provide this exception without modification, you must delete this exception - * statement from your version and license this file solely under the GPL without - * exception. - * - * - * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. - * Copyright (C) 2005 Red Hat, Inc. - * All rights reserved. - * END COPYRIGHT BLOCK **/ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -/* - * Aruna Victor - */ - -#include <windows.h> -#include <stdio.h> - -#include <base/file.h> -#include <base/eventlog.h> -#include <base/util.h> -#include <base/shexp.h> -#include <base/systhr.h> -#include <base/crit.h> -#include <base/systhr.h> - -#include <ssl.h> -typedef void * (SafFunction)(); -SafFunction **SafTable; -__declspec(dllexport) int InitSafTable(SafFunction *Table); - -/* Functions from file.h */ -#define SYSTEM_FOPENRO 22 -#define SYSTEM_FOPENWA 23 -#define SYSTEM_FOPENRW 24 -#define SYSTEM_FCLOSE 25 -#define SYSTEM_NOCOREDUMPS 26 -#define SYSTEM_FWRITE 27 -#define SYSTEM_FWRITE_ATOMIC 28 -#define SYSTEM_WINERR 29 -#define SYSTEM_WINSOCKERR 30 -#define FILE_NOTFOUND 31 -#define SYSTEM_STAT 32 - -#define FILE_UNIX2LOCAL 34 -#define DIR_OPEN 35 -#define DIR_READ 36 -#define DIR_CLOSE 37 - -/* Functions from ereport.h */ -#define EREPORT 80 - -/* Functions from minissl.h */ -#define SSL_CLOSE 90 -#define SSL_SOCKET 91 -#define SSL_GET_SOCKOPT 92 -#define SSL_SET_SOCKOPT 93 -#define SSL_BIND 94 -#define SSL_LISTEN 95 -#define SSL_ACCEPT 96 -#define SSL_READ 97 -#define SSL_WRITE 98 -#define SSL_GETPEERNAME 99 - -/* Functions from systhr.h */ -#define SYSTHREAD_START 133 -#define SYSTHREAD_ATTACH 134 -#define SYSTHREAD_TERMINATE 135 -#define SYSTHREAD_SLEEP 136 -#define SYSTHREAD_INIT 137 -#define SYSTHREAD_NEWKEY 138 -#define SYSTHREAD_GETDATA 139 -#define SYSTHREAD_SETDATA 140 - -#define LOG_ERROR_EVENT 149 - -/* Functions from shexp.h */ -#define SHEXP_VALID 160 -#define SHEXP_MATCH 161 -#define SHEXP_CMP 162 -#define SHEXP_CASECMP 163 - -/* Functions from systems.h */ -#define UTIL_STRCASECMP 170 -#define UTIL_STRNCASECMP 171 - -/* Functions from util.h */ -#define UTIL_HOSTNAME 187 -#define UTIL_ITOA 198 -#define UTIL_VSPRINTF 199 -#define UTIL_SPRINTF 200 -#define UTIL_VSNPRINTF 201 -#define UTIL_SNPRINTF 202 - -/* Functions from conf.h */ -#define CONF_INIT 207 - -/* robm Functions added in 2.0 */ -#define SYSTEM_FOPENWT 261 -#define SYSTEM_MALLOC 262 -#define SYSTEM_FREE 263 -#define SYSTEM_REALLOC 264 -#define SYSTEM_STRDUP 265 - -#define CRIT_INIT 267 -#define CRIT_ENTER 268 -#define CRIT_EXIT 269 -#define CRIT_TERMINATE 270 -#define SYSTHREAD_CURRENT 271 - -#define ACL_LISTCONCAT 312 -#define GETCLIENTLANG 313 diff --git a/include/nt/ntos.h b/include/nt/ntos.h deleted file mode 100644 index 7d971b7e..00000000 --- a/include/nt/ntos.h +++ /dev/null @@ -1,192 +0,0 @@ -/** BEGIN COPYRIGHT BLOCK - * 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; version 2 of the License. - * - * 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. - * - * In addition, as a special exception, Red Hat, Inc. gives You the additional - * right to link the code of this Program with code not covered under the GNU - * General Public License ("Non-GPL Code") and to distribute linked combinations - * including the two, subject to the limitations in this paragraph. Non-GPL Code - * permitted under this exception must only link to the code of this Program - * through those well defined interfaces identified in the file named EXCEPTION - * found in the source code files (the "Approved Interfaces"). The files of - * Non-GPL Code may instantiate templates or use macros or inline functions from - * the Approved Interfaces without causing the resulting work to be covered by - * the GNU General Public License. Only Red Hat, Inc. may make changes or - * additions to the list of Approved Interfaces. You must obey the GNU General - * Public License in all respects for all of the Program code and other code used - * in conjunction with the Program except the Non-GPL Code covered by this - * exception. If you modify this file, you may extend this exception to your - * version of the file, but you are not obligated to do so. If you do not wish to - * provide this exception without modification, you must delete this exception - * statement from your version and license this file solely under the GPL without - * exception. - * - * - * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. - * Copyright (C) 2005 Red Hat, Inc. - * All rights reserved. - * END COPYRIGHT BLOCK **/ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -/********************************************************************** - * ntOS.h - functionality used bt NT Operating System - * - **********************************************************************/ - -#ifndef _ntos_h -#define _ntos_h - - -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ - -#ifdef ISHIELD_DLL -#define NS_WINAPI WINAPI -#else -#define NS_WINAPI -#endif - -/* prototypes for info.c */ -typedef enum { - OS_WIN95, - OS_WINNT, - OS_WIN32S, - OS_UNKNOWN -} OS_TYPE; - -typedef enum { - PROCESSOR_I386, - PROCESSOR_ALPHA, - PROCESSOR_MIPS, - PROCESSOR_PPC, - PROCESSOR_UNKNOWN -} PROCESSOR_TYPE; - -OS_TYPE NS_WINAPI INFO_GetOperatingSystem (); -DWORD NS_WINAPI INFO_GetOSMajorVersion (); -DWORD NS_WINAPI INFO_GetOSMinorVersion (); -void NS_WINAPI OS_GetComputerName (LPTSTR computerName, int nComputerNameLength ); -PROCESSOR_TYPE NS_WINAPI OS_GetProcessor (); -DWORD NS_WINAPI INFO_GetOSServicePack (); - - -/* prototypes for path.c */ -DWORD NS_WINAPI PATH_RemoveRelative ( char * path ); -DWORD NS_WINAPI PATH_ConvertNtSlashesToUnix( LPCTSTR lpszNtPath, LPSTR lpszUnixPath ); -DWORD NS_WINAPI PATH_GetNextFileInDirectory ( long hFile, char * path, char * lpFileName ); -DWORD NS_WINAPI PATH_GetNextSubDirectory( long hFile, char * path, char * lpSubDirectoryName, char * lpSubDirectoryPrefix ); -DWORD NS_WINAPI PATH_DeleteRecursively ( char * path ); - - -/* prototypes for registry.c */ -BOOL NS_WINAPI REG_CheckIfKeyExists( HKEY hKey, LPCTSTR registryKey ); -BOOL NS_WINAPI REG_CreateKey( HKEY hKey, LPCTSTR registryKey ); -BOOL NS_WINAPI REG_DeleteKey( HKEY hKey, LPCTSTR registryKey ); -BOOL NS_WINAPI REG_DeleteValue( HKEY hKey, LPCTSTR registryKey, LPCSTR valueName ); - -BOOL NS_WINAPI -REG_GetRegistryParameter( - HKEY hKey, - LPCTSTR registryKey, - LPTSTR QueryValueName, - LPDWORD ValueType, - LPBYTE ValueBuffer, - LPDWORD ValueBufferSize - ); - -BOOL NS_WINAPI -REG_SetRegistryParameter( - HKEY hKey, - LPCTSTR registryKey, - LPTSTR valueName, - DWORD valueType, - LPCTSTR ValueString, - DWORD valueStringLength - ); - -BOOL NS_WINAPI -REG_GetSubKeysInfo( - HKEY hKey, - LPCTSTR registryKey, - LPDWORD lpdwNumberOfSubKeys, - LPDWORD lpdwMaxSubKeyLength - ); - -BOOL NS_WINAPI -REG_GetSubKey( HKEY hKey, - LPCTSTR registryKey, - DWORD nSubKeyIndex, - LPTSTR registrySubKeyBuffer, - DWORD subKeyBufferSize - ); - -/* prototypes for service.c */ -#define SERVRET_ERROR 0 -#define SERVRET_INSTALLED 1 -#define SERVRET_STARTING 2 -#define SERVRET_STARTED 3 -#define SERVRET_STOPPING 4 -#define SERVRET_REMOVED 5 - -DWORD NS_WINAPI SERVICE_GetNTServiceStatus(LPCTSTR szServiceName, LPDWORD lpLastError ); -DWORD NS_WINAPI SERVICE_InstallNTService(LPCTSTR szServiceName, LPCTSTR szServiceDisplayName, LPCTSTR szServiceExe ); -DWORD NS_WINAPI SERVICE_ReinstallNTService(LPCTSTR szServiceName, LPCTSTR szServiceDisplayName, LPCTSTR szServiceExe ); -DWORD NS_WINAPI SERVICE_RemoveNTService(LPCTSTR szServiceName); -DWORD NS_WINAPI SERVICE_StartNTService(LPCTSTR szServiceName); -DWORD NS_WINAPI SERVICE_StartNTServiceAndWait(LPCTSTR szServiceName, LPDWORD lpdwLastError); -DWORD NS_WINAPI SERVICE_StopNTService(LPCTSTR szServiceName); -DWORD NS_WINAPI SERVICE_StopNTServiceAndWait(LPCTSTR szServiceName, LPDWORD lpdwLastError); - - -/* prototypes for pmddeml.c */ -DWORD PMDDEML_Open ( void ); -BOOL PMDDEML_Close ( DWORD idInst ); -BOOL PMDDEML_CreateProgramManagerGroup ( DWORD idInst, LPCTSTR lpszGroupName ); -BOOL PMDDEML_DeleteProgramManagerGroup ( DWORD idInst, LPCTSTR lpszGroupName ); -BOOL PMDDEML_ShowProgramManagerGroup ( DWORD idInst, LPCTSTR lpszGroupName ); -BOOL PMDDEML_AddIconToProgramManagerGroup ( DWORD idInst, LPCTSTR lpszCmdLine, - LPCTSTR lpszTitle, LPCTSTR lpszIconPath, LPCTSTR lpszWorkingDir, - BOOL bReplace ); -BOOL PMDDEML_CreateProgramManagerCommonGroup ( DWORD idInst, - LPCTSTR lpszGroupName ); -BOOL PMDDEML_DeleteProgramManagerCommonGroup ( DWORD idInst, - LPCTSTR lpszGroupName ); -BOOL PMDDEML_ShowProgramManagerCommonGroup ( DWORD idInst, - LPCTSTR lpszGroupName ); -BOOL PMDDEML_DeleteIconInProgramManagerGroup ( DWORD idInst, LPCTSTR lpszTitle ); -BOOL PMDDEML_GetProgramGroupInfo(DWORD idInst, LPSTR lpProgramGroup, char *szBuffer, DWORD cbBuffer); - -/* prototypes for tcpip.c */ -#define TCPIP_NO_ERROR 0 -#define TCPIP_UNSUPPORTED_OS 1 -#define TCPIP_NO_WINSOCK_DLL 2 -#define TCPIP_NO_TCPIP 3 -#define TCPIP_NETWORK_DOWN 4 /* The Windows Sockets implementation has detected that the network subsystem has failed. */ -#define TCPIP_NETWORK_ERROR 5 -#define TCPIP_HOST_NOT_FOUND 6 /* Authoritative Answer Host not found. */ -#define TCPIP_HOST_SERVER_DOWN 7 /* Non-Authoritative Host not found, or SERVERFAIL */ -#define TCPIP_HOST_VALID_NAME 8 /* Valid name, no data record of requested type. */ - -DWORD NS_WINAPI -TCPIP_GetDefaultHostName( LPTSTR lpszFullHostName, LPTSTR lpszHostName, LPTSTR lpszDomainName ); -DWORD NS_WINAPI TCPIP_VerifyHostName( LPCTSTR lpszHostName ); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/include/nt/regparms.h b/include/nt/regparms.h deleted file mode 100644 index ccee49a8..00000000 --- a/include/nt/regparms.h +++ /dev/null @@ -1,620 +0,0 @@ -/** BEGIN COPYRIGHT BLOCK - * 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; version 2 of the License. - * - * 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. - * - * In addition, as a special exception, Red Hat, Inc. gives You the additional - * right to link the code of this Program with code not covered under the GNU - * General Public License ("Non-GPL Code") and to distribute linked combinations - * including the two, subject to the limitations in this paragraph. Non-GPL Code - * permitted under this exception must only link to the code of this Program - * through those well defined interfaces identified in the file named EXCEPTION - * found in the source code files (the "Approved Interfaces"). The files of - * Non-GPL Code may instantiate templates or use macros or inline functions from - * the Approved Interfaces without causing the resulting work to be covered by - * the GNU General Public License. Only Red Hat, Inc. may make changes or - * additions to the list of Approved Interfaces. You must obey the GNU General - * Public License in all respects for all of the Program code and other code used - * in conjunction with the Program except the Non-GPL Code covered by this - * exception. If you modify this file, you may extend this exception to your - * version of the file, but you are not obligated to do so. If you do not wish to - * provide this exception without modification, you must delete this exception - * statement from your version and license this file solely under the GPL without - * exception. - * - * - * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. - * Copyright (C) 2005 Red Hat, Inc. - * All rights reserved. - * END COPYRIGHT BLOCK **/ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -// // -// Name: regparms.h // -// Platforms: WIN32 // -// ...................................................................... // -// This module contains registry key definations used throughout the // -// server. // -// ...................................................................... // -// Revision History: // -// 01-12-95 Initial Version, Aruna Victor (aruna@netscape.com) // -// 12-19-96 3.0 registry changes, Andy Hakim (ahakim@netscape.com) // -// 07-24-97 3.5 registry changes, Ted Byrd (tbyrd@netscape.com) // -// 09-28-97 4.0 registry changes, Glen Beasley (gbeasley@netscape.com) // -//--------------------------------------------------------------------------// -#define KEY_COMPANY "Fedora" -#define KEY_APP_PATH "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths" -#define KEY_RUN_ONCE "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce" -#define KEY_SERVICES "SYSTEM\\CurrentControlSet\\Services" -#define KEY_SNMP_SERVICE "SNMP\\Parameters\\ExtensionAgents" -#define KEY_SNMP_CURRENTVERSION "SNMP\\CurrentVersion" -#define KEY_EVENTLOG_MESSAGES "EventLogMessages" -#define KEY_EVENTLOG_APP "EventLog\\Application" -#define KEY_SOFTWARE_NETSCAPE "SOFTWARE\\Fedora" -#define VALUE_IMAGE_PATH "ImagePath" -#define VALUE_CONFIG_PATH "ConfigurationPath" -#define VALUE_ROOT_PATH "RootPath" -#define VALUE_APP_PATH "Pathname" -#define PROGRAM_GROUP_NAME "Fedora SuiteSpot" -#define STR_PRODUCT_TYPE "Server" -#define STR_EXE ".exe" -#define STR_COMPANY_PREFIX "ns-" - -/* SuiteSpot IDs */ -#define NSS_NAME_SHORT "SuiteSpot" -#define NSS_VERSION "6.0" -#define NSS_NAME_VERSION "SuiteSpot 6.0" -#define NSS_NAME_FULL "Fedora SuiteSpot" -#define NSS_NAME_FULL_VERSION "Fedora SuiteSpot 6.0" -#define NSS_NAME_UNINSTALL "Uninstall SuiteSpot 6.0" - -/* Admin IDs */ -#define ADM_ID_PRODUCT "admin" -#define ADM_NAME_SHORT "Administration" -#define ADM_VERSION "1.0" -#define ADM_NAME_VERSION "Administration 1.0" -#define ADM_NAME_SERVER "Administration Server" -#define ADM_NAME_FULL "Fedora Administration Server" -#define ADM_NAME_FULL_VERSION "Fedora Administration Server 1.0" -#define ADM_NAME_SERVICE "Fedora Administration 1.0" -#define ADM_EXE "ns-admin.exe" -#define ADM_EXE_START "admin.exe" -#define ADM_ID_SERVICE "admin10" -#define ADM_KEY_ROOT "Administration\\1.0" -#define ADM_SERVER_LST_NAME "adm:Netscape Enterprise Server" -#define ADM_DIR_ROOT "admin" -#define ADM_NAME_UNINSTALL "Uninstall Administration Server 1.0" - -#define ADMIN_SERVICE_NAME "Admin Server" -#define ADMIN_ICON_NAME "Administer Netscape Servers" - -/* Enterprise IDs */ -#define ENT_ID_PRODUCT "https" -#define ENT_NAME_SHORT "Enterprise" -#define ENT_VERSION "6.2" -#define ENT_NAME_VERSION "Enterprise 6.2" -#define ENT_NAME_SERVER "Enterprise Server" -#define ENT_NAME_FULL "Fedora Enterprise Server" -#define ENT_NAME_FULL_VERSION "Fedora Enterprise Server 6.2" -#define ENT_NAME_SERVICE "Fedora Enterprise 6.2" -#define ENT_EXE "ns-httpd.exe" -#define ENT_EXE_START "httpd.exe" -#define ENT_ID_SERVICE "https" -#define ENT_KEY_ROOT "Enterprise\\6.2" -#define ENT_SERVER_LST_NAME "https:Fedora Enterprise Server" -#define ENT_DIR_ROOT "https" -#define ENT_NAME_UNINSTALL "Uninstall Enterprise Server 3.01" - -#if 0 -/* Personal IDs */ -#define PERSONAL_APP_PATH_KEY "ns-httpd.exe" -#define PERSONAL_README_ICON_NAME "FastTrack README" -#define PERSONAL_REGISTRY_ROOT_KEY "Httpd Server" -#define PERSONAL_SERVER_LST_NAME "httpd:Netscape FastTrack Server" -#define PERSONAL_UNINSTALL_ICON_NAME "Uninstall FastTrack" -#define PERSONAL_UNINSTALL_KEY "FastTrackV2.0" -#define PERSONAL_SERVER_NAME "Netscape FastTrack Server" - -#define PER_ID_PRODUCT "httpd" -#define PER_NAME_SHORT "FastTrack" -#define PER_VERSION "3.01" -#define PER_NAME_VERSION "FastTrack 3.01" -#define PER_NAME_SERVER "FastTrack Server" -#define PER_NAME_FULL "Netscape FastTrack Server" -#define PER_NAME_FULL_VERSION "Netscape FastTrack Server 3.01" -#define PER_NAME_SERVICE "Netscape FastTrack 3.01" -#define PER_EXE "ns-httpd.exe" -#define PER_EXE_START "httpd.exe" -#define PER_ID_SERVICE "httpd" -#define PER_KEY_ROOT "FastTrack\\3.01" -#define PER_SERVER_LST_NAME "httpd:Netscape FastTrack Server" -#define PER_DIR_ROOT "httpd" -#define PER_NAME_UNINSTALL "Uninstall FastTrack Server 3.01" - -/* Proxy IDs */ -#define PRX_ID_PRODUCT "proxy" -#define PRX_NAME_SHORT "Proxy" -#define PRX_VERSION "3.0" -#define PRX_NAME_VERSION "Proxy 3.0" -#define PRX_NAME_SERVER "Proxy Server" -#define PRX_NAME_FULL "Netscape Proxy Server" -#define PRX_NAME_FULL_VERSION "Netscape Proxy Server 3.0" -#define PRX_NAME_SERVICE "Netscape Proxy 3.0" -#define PRX_EXE "ns-proxy.exe" -#define PRX_EXE_START "proxy.exe" -#define PRX_ID_SERVICE "proxy30" -#define PRX_KEY_ROOT "Proxy\\3.0" -#define PRX_SERVER_LST_NAME "proxy:Netscape Proxy Server" -#define PRX_DIR_ROOT "proxy" -#define PRX_NAME_UNINSTALL "Uninstall Proxy Server 3.0" - -/* Catalog IDs */ -#define CATALOG_SHORT_NAME "Catalog" -#define CATALOG_SERVER_NAME "Netscape Catalog Server" -#define CATALOG_SERVER_VERSION "1.0" -#define CATALOG_SETUP_SHORT_NAME "Catalog Server" -#define CATALOG_SETUP_NAME "Netscape Catalog Server 1.0" -#define CATALOG_REGISTRY_ROOT_KEY "Catalog Server" -#define CATALOG_EXE "ns-httpd.exe" -#define CATALOG_DIR_ROOT "catalog" -#define CATALOG_APP_PATH_KEY "ns-catalog" -#define CATALOG_UNINSTALL_KEY "CatalogV1.0" -#define CATALOG_SERVER_LST_NAME "catalog:Netscape Catalog Server" -#define CATALOG_SERVICE_PREFIX "Netscape Catalog Server " -#define CATALOG_README_ICON_NAME "Catalog README" -#define CATALOG_UNINSTALL_ICON_NAME "Uninstall Catalog" -#define CATALOG_PRODUCT_NAME "catalog" - -/* RDS IDs */ -#define RDS_SHORT_NAME "RDS" -#define RDS_SERVER_NAME "Netscape RDS Server" -#define RDS_SERVER_VERSION "1.0" -#define RDS_SETUP_SHORT_NAME "RDS Server" -#define RDS_SETUP_NAME "Netscape RDS Server 1.0" -#define RDS_REGISTRY_ROOT_KEY "RDS Server" -#define RDS_EXE "ns-httpd.exe" -#define RDS_DIR_ROOT "rds" -#define RDS_APP_PATH_KEY "ns-rds" -#define RDS_UNINSTALL_KEY "RdsV1.0" -#define RDS_SERVER_LST_NAME "rds:Netscape RDS Server" -#define RDS_SERVICE_PREFIX "Netscape RDS Server " -#define RDS_README_ICON_NAME "Rds README" -#define RDS_UNINSTALL_ICON_NAME "Uninstall RDS" -#define RDS_PRODUCT_NAME "rds" - -/* News IDs */ -#define NEWS_SHORT_NAME "News" -/* Alpha #define NEWS_SERVER_NAME "Netscape News Server (tm) " */ -/* Alpha #define NEWS_SETUP_NAME "Netscape News Server (tm) " */ -/* Alpha #define NEWS_UNINSTALL_KEY "NewsV1.2" */ -#define NEWS_SERVER_NAME "Netscape News Server" -#define NEWS_SERVER_VERSION "2.0" -#define NEWS_UNINSTALL_KEY "NetscapeNewsV2.0" -#define NEWS_SETUP_SHORT_NAME "News Server" -#define NEWS_SETUP_NAME "Netscape News Server" -#define NEWS_REGISTRY_ROOT_KEY "News Server" // key under SW/Netscape -#define NEWS_EXE "nnrpd.exe" // value for <No name> -#define NEWS_DIR_ROOT "news" // mess.dll in Reg, and in .lst -#define NEWS_APP_PATH_KEY "innd.exe" // key under app paths -#define NEWS_SERVER_LST_NAME "news:Netscape News Server" -#define NEWS_SERVICE_PREFIX "Netscape News Server " -#define NEWS_README_ICON_NAME "News Readme" -#define NEWS_UNINSTALL_ICON_NAME "Uninstall News" - -/* Mail IDs */ -/* When we integrate the core & admin servers installation processes */ -/* we will use the code below instead of the section following it. */ - -/* -#define MAIL_SHORT_NAME "Mail" -#define MAIL_SERVER_NAME "Netscape Mail Server (tm)" -#define MAIL_SERVER_VERSION "2.0" -#define MAIL_SETUP_SHORT_NAME "Mail Server" -#define MAIL_SETUP_NAME "Netscape Mail Server (tm)" -#define MAIL_REGISTRY_ROOT_KEY "Mail Server" // key under SW/Netscape -#define MAIL_EXE "NetscapeMTA.exe" // value for <No name> -#define MAIL_DIR_ROOT "mail" // mess.dll in Reg, and in .lst -#define MAIL_APP_PATH_KEY "NetscapeMTA.exe" // key under app paths -#define MAIL_UNINSTALL_KEY "MailV2.0" -#define MAIL_SERVER_LST_NAME "mail:Netscape Mail Server" -#define MAIL_SERVICE_PREFIX "Netscape Mail Server " -#define MAIL_README_ICON_NAME "Mail Readme" -#define MAIL_UNINSTALL_ICON_NAME "Uninstall Mail" -*/ - -#define MAIL_SHORT_NAME "Admin" -#define MAIL_SERVER_NAME "Netscape Administration Server (tm)" -#define MAIL_SERVER_VERSION "2.0" -#define MAIL_SETUP_SHORT_NAME "Admin Server" -#define MAIL_SETUP_NAME "Netscape Administration Server (tm)" -#define MAIL_REGISTRY_ROOT_KEY "Mail Server" // key under SW/Netscape -#define MAIL_EXE "NetscapeMTA.exe" // value for <No name> -#define MAIL_DIR_ROOT "mail" // mess.dll in Reg, and in .lst -#define MAIL_APP_PATH_KEY "NetscapeMTA.exe" // key under app paths -#define MAIL_UNINSTALL_KEY "MailV2.0" -#define MAIL_SERVER_LST_NAME "mail:Netscape Mail Server" -#define MAIL_SERVICE_PREFIX "Netscape Admin Server " -#define MAIL_README_ICON_NAME "Mail Readme" -#define MAIL_UNINSTALL_ICON_NAME "Uninstall Mail" -#endif - -/* Synchronization Service IDs */ -#define DSS_SHORT_NAME "Directory Synchronization Service" -#define DSS_SERVER_NAME "Fedora Directory Synchronization Service" -#define DSS_SERVER_VERSION "1" -#define DSS_SETUP_SHORT_NAME "Fedora Synchronization Service" -#define DSS_SETUP_NAME "Fedora Directory Synchronization Service 1" -#define DSS_REGISTRY_ROOT_KEY "Directory Synchronization Service" -#define DSS_EXE "dssynch.exe" -#define DSS_DIR_ROOT "dssynch" -#define DSS_APP_PATH_KEY "dssynch.exe" -#define DSS_CONFIG_TOOL "synchcfg.exe" -#define DSS_UNINSTALL_KEY "SynchronizationV1" -#define DSS_SERVER_LST_NAME "dssynch:Netscape Directory Synchronization Service" -#define DSS_SERVICE_PREFIX "Fedora Directory Synchronization Service " -#define DSS_README_ICON_NAME "Directory Synchronization Service README" -#define DSS_CONFIG_ICON_NAME "Directory Synchronization Service Config" -#define DSS_UNINSTALL_ICON_NAME "Uninstall Directory Synch Service" -#define DSS_PRODUCT_NAME "dssynch" -#define DSS_ID_PRODUCT DSS_PRODUCT_NAME -#define DS_COMPONENT 1 - -/* IDs needed for Directory 102/30 synchservice */ -#define ADMIN_APP_PATH_KEY "ns-admin.exe" -#define ADMIN_EXE "ns-admin.exe" -#define ADMIN_REGISTRY_ROOT_KEY "admin.exe" -#define ADMSERV_COMPRESSED_FILE "admserv.z" -#define APPBASE_DIR95 "Program Files" -#define APPBASE_PATH "Netscape" -#define APP_PATH_KEY "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths" -#define BASE_REGISTRY95 "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\" -#define BASE_REGISTRYNT "Software\\Microsoft\\Windows NT\\CurrentVersion\\App Paths\\" -#define CMS_COMPRESSED_FILE "certsvr.z" -#define CMS_DIR_ROOT "cms" -#define CMS_SHORT_NAME "Certificate Server" -#define CMS_APP_PATH_KEY "libcms.dll" -#define CMS_UNINSTALL_KEY "CertificateV1.0" -#define CMS_UNINSTALL_ICON_NAME "Uninstall CertServer" -#define UPGRADE_VER_1_ICON_NAME "Upgrade 1.1x Servers" -#define CMS_README_ICON_NAME "CertServer README" -#define CMS_REGISTRY_ROOT_KEY "Certificate Server" -#define CMS_SERVER_NAME "Netscape Certificate Server" -#define CMS_SERVER_LST_NAME "cms:Netscape Certificate Server" -#define COMPANY_NAME "Netscape" -#define DIR_HTTPD_SERVER DSS_DIR_ROOT -#define DSS_COMPRESSED_FILE "dssynch.z" -#define DSS_COMPRESSED_HELP_FILE "hdssynch.z" -#define DS_COMPRESSED_FILE "slapd.z" -#define ENTERPRISE_APP_PATH_KEY "ns-https.exe" -#define ENTERPRISE_README_ICON_NAME "Enterprise README" -#define ENTERPRISE_REGISTRY_ROOT_KEY "Https Server" -#define ENTERPRISE_SERVER_LST_NAME "https:Netscape Enterprise Server" -#define ENTERPRISE_SERVER_NAME "Netscape Enterprise Server" -#define ENTERPRISE_UNINSTALL_KEY "EnterpriseV2.0" -#define ENTERPRISE_UNINSTALL_ICON_NAME "Uninstall Enterprise" -#define ENTERPRISE_DIR_ROOT "https" -#define ENTERPRISE_SHORT_NAME "Enterprise" -#define EXTRAS_COMPRESSED_FILE "extras.z" -#define HTTP_SERVER_NAME DSS_DIR_ROOT -#define INSTALL_COMPRESSED_FILE "install.z" -#define LIVEWIRE_COMPRESSED_FILE "wire.z" -#define NSAPI_COMPRESSED_FILE "nsapi.z" -#define PERSONAL_DIR_ROOT "httpd" -#define PERSONAL_SHORT_NAME "FastTrack" -#define PLUGINS_COMPRESSED_FILE "plugins.z" -#define REGISTRY_ROOT_PATH_KEY "Path" -#define SERVDLLS_COMPRESSED_FILE "servdlls.z" -#define SERVER_APP_PATH_KEY DSS_APP_PATH_KEY -#define SERVER_COMPRESSED_FILE "server.z" -#define SERVER_EXE DSS_EXE -#define SERVER_LIST_NAME DSS_SERVER_LST_NAME -#define SERVER_PRODUCT_NAME DSS_REGISTRY_ROOT_KEY -#define SERVER_PRODUCT_VERSION DSS_VERSION_DEF -#define SERVER_README_ICON_NAME DSS_README_ICON_NAME -#define SERVER_UNINSTALL_ICON_NAME DSS_UNINSTALL_ICON_NAME -#define SETUP_NAME DSS_SETUP_NAME -#define SETUP_SHORT_NAME DSS_SHORT_NAME -#define SETUP_TITLE_WIN95_BMP "titleNTb.bmp" -#define SETUP_TITLE_WINNT_BMP "titledss.bmp" -#define SOFTWARE_NETSCAPE_KEY "SOFTWARE\\Netscape" -#define NETSCAPE_WEB_KEY "Netscape Web Servers" -#define NETSCAPE_SERVICE_KEY "SYSTEM\\CurrentControlSet\\Services" - -#define SYSDLLS_COMPRESSED_FILE "ssdlls.z" -#define UNINSTALL_KEY DSS_UNINSTALL_KEY -#define UNINSTALL_REGISTRY95 "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" -// NT SNMP Extension Agent registry entries -#define SNMP_SERVICE_KEY "SYSTEM\\CurrentControlSet\\Services\\SNMP\\Parameters\\ExtensionAgents\\" -#define SNMP_AGENT_KEY "HTTP SNMP Agent" -#define SNMP_CURRENT_VERSION "CurrentVersion" -#define SNMP_PATHNAME "Pathname" -#define SNMP_DLL_PATH "bin\\https\\httpsnmp.dll" -#define SNMP_SERVICE_NAME "SNMP" -// end synch service - -#define LICENSE_TXT "license.txt" - -#define UNINST_EXE "unslapd.exe" -#define DSS_UNINST_EXE "unsynch.exe" - -#define DIR_ADMSERV_SERVER "admserv" - -#define COPY_READMEFILES "Copying readme files..." -#define COPY_SYSDLLFILES "Copying Shared System files..." -#define COPY_SERVDLLFILES "Copying Shared Server files..." -#define COPY_SERVERFILES "Copying web server files..." -#define COPY_ADMINFILES "Copying administration server files..." -#define COPY_EXTRASFILES "Copying CGI Example and Log Analyzer Files..." -#define COPY_INSTALLFILES "Copying Version 1.1x upgrade files..." -#define COPY_NSAPIFILES "Copying NSAPI Library and Examples Files..." -#define COPY_PLUGINSFILES "Copying Plug-in Files..." -#define COPY_LIVEWIREFILES "Copying LiveWire Files..." -#define INSTALL_LIVEWIREFILES "Installing LiveWire Server Extension files..." -#define INSTALL_CMSFILES "Installing Certificate Server files..." -#define INSTALL_DSFILES "Installing Directory Server files..." -#define INSTALL_DSSFILES "Installing Directory Synchronization Service files..." -#define INSTALL_DSSHELPFILES "Installing Directory Synchronization Service Help files..." - -#define STR_DEFTAB " " -/* end temp ds102 IDs */ - - -/* Directory IDs */ -/* NOTES: - dboreham: I have no idea what is going on below: - we seem to be using two completely different sets of defines. - This needs sorted out - ryamaura: The first group is there only to ensure that - nothing breaks. The second group conforms to the rest of - the SuiteSpot servers and should be the final form. -*/ -#define DS_SHORT_NAME "Directory Server" -#define DS_SERVER_NAME "Fedora Directory Server" -#define DS_SERVER_VERSION "1" -#define DS_SETUP_SHORT_NAME "Directory Server" -#define DS_SETUP_NAME "Fedora Directory Server 1" -#define DS_REGISTRY_ROOT_KEY "Directory Server" -#define DS_APP_PATH_KEY "ns-slapd.exe" -#define DS_UNINSTALL_KEY "DirectoryV1" -#define DS_SERVICE_PREFIX "Fedora Directory Server " -#define DS_README_ICON_NAME "Directory Server 1 README" -#define DS_UNINSTALL_ICON_NAME "Uninstall Directory Server 1" -#define DS_PRODUCT_NAME "slapd" - -#define DS_ID_PRODUCT "slapd" -#define DS_NAME_SHORT "Directory" -#define DS_VERSION_OLD "3.0" -#undef DS_VERSION -#define DS_VERSION "1" -#define DS_NAME_VERSION "Directory 1" -#define DS_NAME_SERVER "Directory Server" -#define DS_NAME_FULL "Fedora Directory Server" -#define DS_NAME_FULL_VERSION "Fedora Directory Server 1" -#define DS_NAME_SERVICE "Fedora Directory 1" -#define DS_EXE "ns-slapd.exe" -#define DS_EXE_START "slapd.exe" -#define DS_ID_SERVICE "slapd" -#define DS_KEY_ROOT "Directory\\1" -#define DS_KEY_ROOT_OLD "Directory\\3.0" -#define DS_SERVER_LST_NAME "slapd:Fedora Directory Server" -#define DS_DIR_ROOT "slapd" -#define DS_NAME_UNINSTALL "Uninstall Directory Server 1" -#define DS_SNMP_PATH "bin\\slapd\\server\\ns-ldapagt.dll" -#define DS_OPTIONS "Select the installation option from below" -#define DS_OPTIONS_TITLE "Directory Server Installions Options" -#define DS_GENERAL_OPTIONS DS_NAME_SERVER - - -#ifndef DS_COMPONENT -#define DS_COMPONENT 1 -#endif - -/* original definitions */ -// Upper-level registry parameters -/* Note: the followin MCC_ are not defined when this file is included - for the NT setup.rul file. Beware of using the following definitions in NT - - nirmal -*/ -#if defined(MCC_ADMSERV) - -#define SERVICE_NAME ADM_ID_SERVICE -#define EVENTLOG_APPNAME ADM_NAME_VERSION -#define SERVICE_EXE ADM_EXE -#define SERVICE_PREFIX ADM_NAME_VERSION -#define SVR_ID_PRODUCT ADM_ID_PRODUCT -#define SVR_NAME_SHORT ADM_NAME_SHORT -#define SVR_VERSION ADM_VERSION -#define SVR_NAME_VERSION ADM_NAME_VERSION -#define SVR_NAME_SERVER ADM_NAME_SERVER -#define SVR_NAME_FULL ADM_NAME_FULL -#define SVR_NAME_FULL_VERSION ADM_NAME_FULL_VERSION -#define SVR_NAME_SERVICE ADM_NAME_SERVICE -#define SVR_EXE ADM_EXE -#define SVR_EXE_START ADM_EXE_START -#define SVR_ID_SERVICE ADM_ID_SERVICE -#define SVR_KEY_ROOT ADM_KEY_ROOT -#define SVR_SERVER_LST_NAME ADM_SERVER_LST_NAME -#define SVR_DIR_ROOT ADM_DIR_ROOT -#define SVR_NAME_UNINSTALL ADM_NAME_UNINSTALL - -#elif defined(NS_ENTERPRISE) - -#define PRODUCT_KEY ENT_KEY_ROOT -#define PRODUCT_NAME ENT_ID_PRODUCT -#define EVENTLOG_APPNAME ENT_NAME_VERSION -#define SERVICE_PREFIX ENT_NAME_VERSION -#define SVR_ID_PRODUCT ENT_ID_PRODUCT -#define SVR_NAME_SHORT ENT_NAME_SHORT -#define SVR_VERSION ENT_VERSION -#define SVR_NAME_VERSION ENT_NAME_VERSION -#define SVR_NAME_SERVER ENT_NAME_SERVER -#define SVR_NAME_FULL ENT_NAME_FULL -#define SVR_NAME_FULL_VERSION ENT_NAME_FULL_VERSION -#define SVR_NAME_SERVICE ENT_NAME_SERVICE -#define SVR_EXE ENT_EXE -#define SVR_EXE_START ENT_EXE_START -#define SVR_ID_SERVICE ENT_ID_SERVICE -#define SVR_KEY_ROOT ENT_KEY_ROOT -#define SVR_SERVER_LST_NAME ENT_SERVER_LST_NAME -#define SVR_DIR_ROOT ENT_DIR_ROOT -#define SVR_NAME_UNINSTALL ENT_NAME_UNINSTALL - -#elif defined(NS_PROXY) - -#define PRODUCT_KEY PRX_KEY_ROOT -#define PRODUCT_NAME PRX_ID_PRODUCT -#define EVENTLOG_APPNAME PRX_NAME_VERSION -#define SERVICE_PREFIX PRX_NAME_VERSION -#define SVR_ID_PRODUCT PRX_ID_PRODUCT -#define SVR_NAME_SHORT PRX_NAME_SHORT -#define SVR_VERSION PRX_VERSION -#define SVR_NAME_VERSION PRX_NAME_VERSION -#define SVR_NAME_SERVER PRX_NAME_SERVER -#define SVR_NAME_FULL PRX_NAME_FULL -#define SVR_NAME_FULL_VERSION PRX_NAME_FULL_VERSION -#define SVR_NAME_SERVICE PRX_NAME_SERVICE -#define SVR_EXE PRX_EXE -#define SVR_EXE_START PRX_EXE_START -#define SVR_ID_SERVICE PRX_ID_SERVICE -#define SVR_KEY_ROOT PRX_KEY_ROOT -#define SVR_SERVER_LST_NAME PRX_SERVER_LST_NAME -#define SVR_DIR_ROOT PRX_DIR_ROOT -#define SVR_NAME_UNINSTALL PRX_NAME_UNINSTALL - -#elif defined(NS_CATALOG) - -#define PRODUCT_KEY CATALOG_REGISTRY_ROOT_KEY // CKA (should use key above) -#define PRODUCT_NAME "catalog" -#define EVENTLOG_APPNAME "NetscapeCatalog" -#define SERVICE_PREFIX CATALOG_SERVICE_PREFIX - -#elif defined(NS_RDS) - -#define PRODUCT_KEY RDS_REGISTRY_ROOT_KEY // CKA (should use key above) -#define PRODUCT_NAME "rds" -#define EVENTLOG_APPNAME "NetscapeRds" -#define SERVICE_PREFIX RDS_SERVICE_PREFIX - -#elif defined(NS_PERSONAL) - -#define PRODUCT_KEY PER_KEY_ROOT -#define PRODUCT_NAME PER_ID_PRODUCT -#define EVENTLOG_APPNAME PER_NAME_VERSION -#define SERVICE_PREFIX PER_NAME_VERSION -#define SVR_ID_PRODUCT PER_ID_PRODUCT -#define SVR_NAME_SHORT PER_NAME_SHORT -#define SVR_VERSION PER_VERSION -#define SVR_NAME_VERSION PER_NAME_VERSION -#define SVR_NAME_SERVER PER_NAME_SERVER -#define SVR_NAME_FULL PER_NAME_FULL -#define SVR_NAME_FULL_VERSION PER_NAME_FULL_VERSION -#define SVR_NAME_SERVICE PER_NAME_SERVICE -#define SVR_EXE PER_EXE -#define SVR_EXE_START PER_EXE_START -#define SVR_ID_SERVICE PER_ID_SERVICE -#define SVR_KEY_ROOT PER_KEY_ROOT -#define SVR_SERVER_LST_NAME PER_SERVER_LST_NAME -#define SVR_DIR_ROOT PER_DIR_ROOT -#define SVR_NAME_UNINSTALL PER_NAME_UNINSTALL - -#elif defined(NS_DSS) - -#define PRODUCT_KEY DSS_REGISTRY_ROOT_KEY // CKA (should use key above) -#define PRODUCT_NAME "dssynch" -#define EVENTLOG_APPNAME "NetscapeDirSynchService" -#define SERVICE_PREFIX DSS_SERVICE_PREFIX - -#elif defined(NS_DS) - -#define PRODUCT_BIN "ns-slapd" -#define SLAPD_EXE "slapd.exe" -#define SERVICE_EXE SLAPD_EXE -#define SLAPD_CONF "slapd.conf" -#define SLAPD_DONGLE_FILE "password.dng" -#define DONGLE_FILE_NAME SLAPD_DONGLE_FILE - -#define PRODUCT_KEY DS_REGISTRY_ROOT_KEY -#define PRODUCT_NAME DS_ID_PRODUCT -#define EVENTLOG_APPNAME DS_NAME_VERSION -#define SERVICE_PREFIX DS_NAME_VERSION -#define SVR_ID_PRODUCT DS_ID_PRODUCT -#define SVR_NAME_SHORT DS_NAME_SHORT -#define SVR_VERSION DS_VERSION -#define SVR_VERSION_OLD DS_VERSION_OLD -#define SVR_NAME_VERSION DS_NAME_VERSION -#define SVR_NAME_SERVER DS_NAME_SERVER -#define SVR_NAME_FULL DS_NAME_FULL -#define SVR_NAME_FULL_VERSION DS_NAME_FULL_VERSION -#define SVR_NAME_SERVICE DS_NAME_SERVICE -#define SVR_EXE DS_EXE -#define SVR_EXE_START DS_EXE_START -#define SVR_ID_SERVICE DS_ID_SERVICE -#define SVR_KEY_ROOT DS_KEY_ROOT -#define SVR_SERVER_LST_NAME DS_SERVER_LST_NAME -#define SVR_DIR_ROOT DS_DIR_ROOT -#define SVR_NAME_UNINSTALL DS_NAME_UNINSTALL -#define SNMP_PATH DS_SNMP_PATH - -#elif defined(NS_SETUP) -#else - -#error SERVER TYPE NOT DEFINED - -#endif /* MCC_ADMSERV */ - -// Do not move this section. This has to come immediately after the -// ifdef section above - Nirmal -// -#if defined(MCC_NEWS) // Nirmal : added for news 2/21/95. -#define PRODUCT_BIN "innd" // Redefine the generic ns-httpd.exe -#define PRODUCT_KEY NEWS_REGISTRY_ROOT_KEY // CKA (should use key above) -#define PRODUCT_NAME "news" -#define EVENTLOG_APPNAME "NetscapeNews" -#define SERVICE_PREFIX NEWS_SERVICE_PREFIX - -#endif - - -#define VERSION_KEY "CurrentVersion" - -// Configuration Parameters - -#define SOFTWARE_KEY "Software" - -// NT Perfmon DLL entries -#define KEY_PERFORMANCE "Performance" -#define PERF_MICROSOFT_KEY "SOFTWARE\\Microsoft\\Windows NT\\Perflib\\009" -#define PERF_COUNTER_KEY "Counter" -#define PERF_HELP_KEY "Help" -#define PERF_OPEN_FUNCTION "OpenNSPerformanceData" -#define PERF_COLLECT_FUNCTION "CollectNSPerformanceData" -#define PERF_CLOSE_FUNCTION "CloseNSPerformanceData" -#define PERF_CTR_INI "nsctrs.ini" - -// this section used to be in confhttp.h. TODO: convert to SVR_ format -ahakim -#if defined(NS_CATALOG) -#define SERVER_REGISTRY_ROOT_KEY CATALOG_REGISTRY_ROOT_KEY -#define SERVER_APP_PATH_KEY CATALOG_APP_PATH_KEY -#define SERVER_DIR_ROOT CATALOG_DIR_ROOT -#define SERVER_SETUP_NAME CATALOG_SETUP_NAME -#define SERVER_SHORT_NAME CATALOG_SHORT_NAME - -#elif defined(NS_RDS) -#define SERVER_REGISTRY_ROOT_KEY RDS_REGISTRY_ROOT_KEY -#define SERVER_APP_PATH_KEY RDS_APP_PATH_KEY -#define SERVER_DIR_ROOT RDS_DIR_ROOT -#define SERVER_SETUP_NAME RDS_SETUP_NAME -#define SERVER_SHORT_NAME RDS_SHORT_NAME - -#endif diff --git a/include/nt/resource.h b/include/nt/resource.h deleted file mode 100644 index ce706980..00000000 --- a/include/nt/resource.h +++ /dev/null @@ -1,73 +0,0 @@ -/** BEGIN COPYRIGHT BLOCK - * 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; version 2 of the License. - * - * 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. - * - * In addition, as a special exception, Red Hat, Inc. gives You the additional - * right to link the code of this Program with code not covered under the GNU - * General Public License ("Non-GPL Code") and to distribute linked combinations - * including the two, subject to the limitations in this paragraph. Non-GPL Code - * permitted under this exception must only link to the code of this Program - * through those well defined interfaces identified in the file named EXCEPTION - * found in the source code files (the "Approved Interfaces"). The files of - * Non-GPL Code may instantiate templates or use macros or inline functions from - * the Approved Interfaces without causing the resulting work to be covered by - * the GNU General Public License. Only Red Hat, Inc. may make changes or - * additions to the list of Approved Interfaces. You must obey the GNU General - * Public License in all respects for all of the Program code and other code used - * in conjunction with the Program except the Non-GPL Code covered by this - * exception. If you modify this file, you may extend this exception to your - * version of the file, but you are not obligated to do so. If you do not wish to - * provide this exception without modification, you must delete this exception - * statement from your version and license this file solely under the GPL without - * exception. - * - * - * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. - * Copyright (C) 2005 Red Hat, Inc. - * All rights reserved. - * END COPYRIGHT BLOCK **/ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by netsite.rc -// -#define IDB_BITMAP1 101 -#define DLG_STARTUP_ERROR 101 -#define IDI_NETSITE 102 -#define IDI_ICON1 104 -#define DLG_GETPASSWORD 106 -#define IDI_ICON2 107 -#define IDD_PASSWORD 108 -#define IDI_KEY 109 -#define IDD_PIN 110 -#define IDEDIT 1000 -#define IDC_ERRORLOG 1001 -#define ID_EXIT 1001 -#define IDC_ERRORMSG 1002 -#define IDC_STARTUP_ERROR 1003 -#define IDC_STATIC -1 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 110 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1002 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif - diff --git a/lib/libnt/Makefile b/lib/libnt/Makefile deleted file mode 100644 index b43797be..00000000 --- a/lib/libnt/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -# -# BEGIN COPYRIGHT BLOCK -# 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; version 2 of the License. -# -# 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. -# -# In addition, as a special exception, Red Hat, Inc. gives You the additional -# right to link the code of this Program with code not covered under the GNU -# General Public License ("Non-GPL Code") and to distribute linked combinations -# including the two, subject to the limitations in this paragraph. Non-GPL Code -# permitted under this exception must only link to the code of this Program -# through those well defined interfaces identified in the file named EXCEPTION -# found in the source code files (the "Approved Interfaces"). The files of -# Non-GPL Code may instantiate templates or use macros or inline functions from -# the Approved Interfaces without causing the resulting work to be covered by -# the GNU General Public License. Only Red Hat, Inc. may make changes or -# additions to the list of Approved Interfaces. You must obey the GNU General -# Public License in all respects for all of the Program code and other code used -# in conjunction with the Program except the Non-GPL Code covered by this -# exception. If you modify this file, you may extend this exception to your -# version of the file, but you are not obligated to do so. If you do not wish to -# provide this exception without modification, you must delete this exception -# statement from your version and license this file solely under the GPL without -# exception. -# -# -# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. -# Copyright (C) 2005 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK -# -#! gmake - -DEPTH = ../.. - -CSRCS = info.c \ - path.c \ - pmddeml.c \ - registry.c \ - service.c \ - tcpip.c \ - $(NULL) - -OBJS = $(CSRCS:.c=.o) - -LIBRARY = libnt.$(LIB_SUFFIX) - -include $(DEPTH)/config/rules.mk - -export:: $(TARGETS) - $(INSTALL) -m 444 $(LIBRARY) $(DIST)/lib diff --git a/lib/libnt/info.c b/lib/libnt/info.c deleted file mode 100644 index f0b333e1..00000000 --- a/lib/libnt/info.c +++ /dev/null @@ -1,118 +0,0 @@ -/** BEGIN COPYRIGHT BLOCK - * 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; version 2 of the License. - * - * 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. - * - * In addition, as a special exception, Red Hat, Inc. gives You the additional - * right to link the code of this Program with code not covered under the GNU - * General Public License ("Non-GPL Code") and to distribute linked combinations - * including the two, subject to the limitations in this paragraph. Non-GPL Code - * permitted under this exception must only link to the code of this Program - * through those well defined interfaces identified in the file named EXCEPTION - * found in the source code files (the "Approved Interfaces"). The files of - * Non-GPL Code may instantiate templates or use macros or inline functions from - * the Approved Interfaces without causing the resulting work to be covered by - * the GNU General Public License. Only Red Hat, Inc. may make changes or - * additions to the list of Approved Interfaces. You must obey the GNU General - * Public License in all respects for all of the Program code and other code used - * in conjunction with the Program except the Non-GPL Code covered by this - * exception. If you modify this file, you may extend this exception to your - * version of the file, but you are not obligated to do so. If you do not wish to - * provide this exception without modification, you must delete this exception - * statement from your version and license this file solely under the GPL without - * exception. - * - * - * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. - * Copyright (C) 2005 Red Hat, Inc. - * All rights reserved. - * END COPYRIGHT BLOCK **/ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <windows.h> -#include "nt/ntos.h" - -OS_TYPE NS_WINAPI INFO_GetOperatingSystem () -{ - OSVERSIONINFO versionInfo; - versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx( &versionInfo ); - - switch ( versionInfo.dwPlatformId ) { - case VER_PLATFORM_WIN32s: - return OS_WIN32S; - case VER_PLATFORM_WIN32_WINDOWS: - return OS_WIN95; - case VER_PLATFORM_WIN32_NT: - return OS_WINNT; - default: - break; - } - return OS_UNKNOWN; -} -DWORD NS_WINAPI INFO_GetOSMajorVersion () -{ - OSVERSIONINFO versionInfo; - versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx( &versionInfo ); - - return versionInfo.dwMajorVersion; -} -DWORD NS_WINAPI INFO_GetOSMinorVersion () -{ - OSVERSIONINFO versionInfo; - versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx( &versionInfo ); - - return versionInfo.dwMinorVersion; -} -DWORD NS_WINAPI INFO_GetOSServicePack () -{ - OSVERSIONINFO versionInfo; - char * servicePackString = "Service Pack "; - int servicePackStringLng = strlen(servicePackString); - int servicePackNumber = 0; - - versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx( &versionInfo ); - if ( strncmp ( versionInfo.szCSDVersion, servicePackString, servicePackStringLng ) == 0 ) - servicePackNumber = atoi ( &versionInfo.szCSDVersion[servicePackStringLng] ); - - return servicePackNumber; -} -void NS_WINAPI OS_GetComputerName (LPTSTR computerName, int nComputerNameLength ) -{ - DWORD computerNameLength = nComputerNameLength; - GetComputerName( computerName, &computerNameLength ); -} - -PROCESSOR_TYPE NS_WINAPI OS_GetProcessor () -{ - SYSTEM_INFO systemInfo; - GetSystemInfo( &systemInfo); - - switch ( systemInfo.wProcessorArchitecture ) { - case PROCESSOR_ARCHITECTURE_INTEL: - return PROCESSOR_I386; - case PROCESSOR_ARCHITECTURE_MIPS: - return PROCESSOR_MIPS; - case PROCESSOR_ARCHITECTURE_ALPHA: - return PROCESSOR_ALPHA; - case PROCESSOR_ARCHITECTURE_PPC: - return PROCESSOR_PPC; - default: - break; - } - return PROCESSOR_UNKNOWN; -} diff --git a/lib/libnt/path.c b/lib/libnt/path.c deleted file mode 100644 index e623de9e..00000000 --- a/lib/libnt/path.c +++ /dev/null @@ -1,303 +0,0 @@ -/** BEGIN COPYRIGHT BLOCK - * 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; version 2 of the License. - * - * 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. - * - * In addition, as a special exception, Red Hat, Inc. gives You the additional - * right to link the code of this Program with code not covered under the GNU - * General Public License ("Non-GPL Code") and to distribute linked combinations - * including the two, subject to the limitations in this paragraph. Non-GPL Code - * permitted under this exception must only link to the code of this Program - * through those well defined interfaces identified in the file named EXCEPTION - * found in the source code files (the "Approved Interfaces"). The files of - * Non-GPL Code may instantiate templates or use macros or inline functions from - * the Approved Interfaces without causing the resulting work to be covered by - * the GNU General Public License. Only Red Hat, Inc. may make changes or - * additions to the list of Approved Interfaces. You must obey the GNU General - * Public License in all respects for all of the Program code and other code used - * in conjunction with the Program except the Non-GPL Code covered by this - * exception. If you modify this file, you may extend this exception to your - * version of the file, but you are not obligated to do so. If you do not wish to - * provide this exception without modification, you must delete this exception - * statement from your version and license this file solely under the GPL without - * exception. - * - * - * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. - * Copyright (C) 2005 Red Hat, Inc. - * All rights reserved. - * END COPYRIGHT BLOCK **/ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -/*********************************************************** - * Path functions - removing ../ from path - **********************************************************/ -#include <windows.h> -#include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <io.h> /* For _findfirst */ -#include <direct.h> /* For _rmdir */ -#include <errno.h> -#include "nt/ntos.h" - -DWORD NS_WINAPI -PATH_RemoveRelative ( char * path ) -{ - char * src; - char * dst; - - src = path; - dst = path; - while ( *src ) { - if ( *src == '.' ) { - if ( *(src+1) == '.' ) { - /* strip off the "../" */ - src += 2; - - /* back off least significant directory */ - dst--; - if ( ( *dst == '\\' ) || ( *dst == '/' ) ) - *dst--; - while ( dst > path ) { - if ( ( *dst == '\\' ) || ( *dst == '/' ) ) - break; - dst--; - } - } else { - // remove single "." - } - - } else - *dst++ = *src++; - } - *dst = '\0'; - - return TRUE; -} -DWORD NS_WINAPI -PATH_ConvertNtSlashesToUnix( LPCTSTR lpszNtPath, LPSTR lpszUnixPath ) -{ - if ( lpszNtPath == NULL ) - return 0; - - /* create reverse slashes and escape them */ - while ( *lpszNtPath ) { - if ( *lpszNtPath == '\\' ) - *lpszUnixPath = '/'; - else - *lpszUnixPath = *lpszNtPath; - lpszNtPath++; - lpszUnixPath++; - } - *lpszUnixPath = '\0'; - return 0; -} - -static DWORD -PATH_DeleteRecursivelyFoundFile ( char * fullFileName, char * path, char * fileName ) -{ - if ( strcmp ( fileName, "." ) == 0) - return TRUE; - - if ( strcmp ( fileName, ".." ) == 0) - return TRUE; - - strcpy ( fullFileName, path ); - strcat ( fullFileName, "\\" ); - strcat ( fullFileName, fileName ); - return PATH_DeleteRecursively ( fullFileName ); -} - -/* if the path specified is a file name, the file is deleted - * If the path specifies a directory, the directory is deleted - */ -DWORD NS_WINAPI -PATH_DeleteRecursively ( char * path ) -{ - int result; - unsigned short fileStatus; - struct _stat buf; - struct _finddata_t fileFound; - long hFile; - DWORD retStatus = TRUE; - char fullFileName[_MAX_PATH]; - int error; - - /* Check if statistics are valid: */ - result = _stat( path, &buf ); - if( result != 0 ) - return TRUE; // file or directory does not exist - - fileStatus = buf.st_mode & _S_IFMT; - - /* check if regular file */ - if ( fileStatus & _S_IFREG ) { - if ( remove ( path ) == -1 ) { - error = errno; - switch ( error ) { - case ENOENT: - break; - - case EACCES: - break; - - default: - break; - } - - return FALSE; - } - return TRUE; - } - if ( (fileStatus & _S_IFDIR) == 0 ) - return FALSE; - - - /* path contains a directory, delete all files recursively */ - /* Find first .c file in current directory */ - strcpy ( fullFileName, path ); - strcat ( fullFileName, "\\*.*"); - if( (hFile = _findfirst( fullFileName, &fileFound )) != -1L ) { /* directory contain files? */ - if ( !PATH_DeleteRecursivelyFoundFile ( fullFileName, path, fileFound.name ) ) - retStatus = FALSE; - - /* Find the rest of the .c files */ - while( _findnext( hFile, &fileFound ) == 0 ) { - if ( !PATH_DeleteRecursivelyFoundFile ( fullFileName, path, fileFound.name ) ) - retStatus = FALSE; - } - _findclose( hFile ); - } - - /* remove the directory, now that it is empty */ - if ( _rmdir( path ) == -1 ) - retStatus = FALSE; - return retStatus; -} -/* GetNextFileInDirectory - gets next file in the directory - * Set hFile to zero, when you call it. The routine returns the - * next value for hFile. When the routine returns NULL, there is - * no more files - * - */ -DWORD NS_WINAPI -PATH_GetNextFileInDirectory ( long hFile, char * path, char * lpFileName ) -{ - int result; - unsigned short fileStatus; - struct _stat buf; - struct _finddata_t fileFound; - DWORD retStatus = TRUE; - char fullFileName[_MAX_PATH]; - - if ( hFile == 0 ) { - /* Check if statistics are valid: */ - result = _stat( path, &buf ); - if( result != 0 ) - return 0; // file or directory does not exist - - fileStatus = buf.st_mode & _S_IFMT; - if ( (fileStatus & _S_IFDIR) == 0 ) - return 0; - - - /* path contains a directory, delete all files recursively */ - /* Find first .c file in current directory */ - strcpy ( fullFileName, path ); - strcat ( fullFileName, "\\*.*"); - if( (hFile = _findfirst( fullFileName, &fileFound )) == -1L ) - return 0; - if ( ( strcmp ( fileFound.name , "." ) != 0) - && ( strcmp ( fileFound.name , ".." ) != 0) ) { - strcpy ( lpFileName, fileFound.name ); - return hFile; - } - } - - /* Find the rest of the .c files */ - while( _findnext( hFile, &fileFound ) == 0 ) { - if ( ( strcmp ( fileFound.name , "." ) != 0) - && ( strcmp ( fileFound.name , ".." ) != 0) ) { - strcpy ( lpFileName, fileFound.name ); - return hFile; - } - } - - _findclose( hFile ); - return 0; -} -/*---------------------------------------------------------------------------*\ - * - * Function: PATH_GetNextSubDirectory - * - * Purpose: Gets next sub directory in the path - * - * Input: - * hFile: set to zero first time called; use return value for subsequent calls - * path: directory containing sub directories - * lpSubDirectoryName: buffer to store sub directorie name - * lpSubDirectoryPrefix: chars to exactly match begining of directory name - * - * Returns: - * hFile to be used on subsequent call (0, if no more directories) - * - * Comments: -\*---------------------------------------------------------------------------*/ -DWORD NS_WINAPI -PATH_GetNextSubDirectory( long hFile, char * path, char * lpSubDirectoryName, char * lpSubDirectoryPrefix ) -{ - int result; - unsigned short fileStatus; - struct _stat buf; - char * subDirectoryPrefix; - char * p; - char fullFileName[_MAX_PATH]; - BOOL bSubDirectoryFound; - - do { - hFile = PATH_GetNextFileInDirectory ( hFile, path, lpSubDirectoryName ); - if ( hFile == 0 ) - return 0; - - /* Check if file is a directory */ - strcpy ( fullFileName, path ); - strcat ( fullFileName, "\\" ); - strcat ( fullFileName, lpSubDirectoryName ); - result = _stat( fullFileName, &buf ); - if( result == 0 ) { - fileStatus = buf.st_mode & _S_IFMT; - if ( (fileStatus & _S_IFDIR) == _S_IFDIR ) { - - /* check if sub directory matches prefix */ - bSubDirectoryFound = TRUE; - if ( lpSubDirectoryPrefix ) { - p = lpSubDirectoryName; - subDirectoryPrefix = lpSubDirectoryPrefix; - while ( *subDirectoryPrefix ) { - if ( *subDirectoryPrefix++ != *p++ ) { - bSubDirectoryFound = FALSE; - break; - } - } - } - if ( bSubDirectoryFound ) - return hFile; - } - } - } while ( hFile ); - - return 0; // no more sub directories -} - diff --git a/lib/libnt/pmddeml.c b/lib/libnt/pmddeml.c deleted file mode 100644 index 3a9ed1ba..00000000 --- a/lib/libnt/pmddeml.c +++ /dev/null @@ -1,412 +0,0 @@ -/** BEGIN COPYRIGHT BLOCK - * 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; version 2 of the License. - * - * 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. - * - * In addition, as a special exception, Red Hat, Inc. gives You the additional - * right to link the code of this Program with code not covered under the GNU - * General Public License ("Non-GPL Code") and to distribute linked combinations - * including the two, subject to the limitations in this paragraph. Non-GPL Code - * permitted under this exception must only link to the code of this Program - * through those well defined interfaces identified in the file named EXCEPTION - * found in the source code files (the "Approved Interfaces"). The files of - * Non-GPL Code may instantiate templates or use macros or inline functions from - * the Approved Interfaces without causing the resulting work to be covered by - * the GNU General Public License. Only Red Hat, Inc. may make changes or - * additions to the list of Approved Interfaces. You must obey the GNU General - * Public License in all respects for all of the Program code and other code used - * in conjunction with the Program except the Non-GPL Code covered by this - * exception. If you modify this file, you may extend this exception to your - * version of the file, but you are not obligated to do so. If you do not wish to - * provide this exception without modification, you must delete this exception - * statement from your version and license this file solely under the GPL without - * exception. - * - * - * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. - * Copyright (C) 2005 Red Hat, Inc. - * All rights reserved. - * END COPYRIGHT BLOCK **/ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -/**************************************************************************** - PROGRAM: pmddeml.c - - PURPOSE: DDEML interface with ProgMan - -****************************************************************************/ - -#include <windows.h> // required for all Windows applications -#include <ddeml.h> // required for DDEML -#include <stdio.h> // required for strcpy and strlen -#include "nt/ntos.h" // specific to this program - -BOOL PMDDEML_SendShellCommand (DWORD idInst, LPSTR lpCommand); - -HDDEDATA CALLBACK PMDDEML_DdeCallback( UINT uType, // transaction type - UINT uFmt, // clipboard data format - HCONV hconv, // handle of the conversation - HSZ hsz1, // handle of a string - HSZ hsz2, // handle of a string - HDDEDATA hdata,// handle of a global memory object - DWORD dwData1, // transaction-specific data - DWORD dwData2 // transaction-specific data - ); -/**************************************************************************** - FUNCTION: PMDDEML_Open() - - PURPOSE: Open PMDDEML interface - - PARAMETERS: - - RETURNS: - DWORD handle used in subsequent calls -****************************************************************************/ - -DWORD PMDDEML_Open ( void ) -{ - DWORD idInst = 0L; // instance identifier - - // register this app with the DDEML - if (DdeInitialize(&idInst, // receives instance ID - (PFNCALLBACK)PMDDEML_DdeCallback, // address of callback function - APPCMD_CLIENTONLY, // this is a client app - 0L)) // reserved - return 0; - return idInst; -} -/**************************************************************************** - FUNCTION: PMDDEML_Close() - - PURPOSE: Closes PMDDEML interface - - PARAMETERS: - DWORD idInst handle returned by PMDDEML_Open - - RETURNS: - TRUE, if successful -****************************************************************************/ - -BOOL PMDDEML_Close ( DWORD idInst ) -{ - // free all DDEML resources associated with this app - return DdeUninitialize ( idInst ); -} -/**************************************************************************** - FUNCTION: PMDDEML_CreateProgramManagerGroup() - - PURPOSE: Creates a program group - - PARAMETERS: - DWORD idInst handle returned by PMDDEML_Open - LPCTSTR lpszGroupNamee name of group - - RETURNS: - TRUE, if successful -****************************************************************************/ - -BOOL PMDDEML_CreateProgramManagerGroup ( DWORD idInst, LPCTSTR lpszGroupName ) -{ - char szDDEMsg[256]; // instance identifier - - if ( lpszGroupName == NULL ) - return FALSE; - - sprintf ( szDDEMsg, "[CreateGroup(%s)]", lpszGroupName ); - - if ( !PMDDEML_SendShellCommand(idInst, (LPSTR)szDDEMsg ) ) - return FALSE; - return TRUE; -} -/**************************************************************************** - FUNCTION: PMDDEML_DeleteProgramManagerGroup() - - PURPOSE: Deletes a program group - - PARAMETERS: - DWORD idInst handle returned by PMDDEML_Open - LPCTSTR lpszGroupNamee name of group - - RETURNS: - TRUE, if successful -****************************************************************************/ - -BOOL PMDDEML_DeleteProgramManagerGroup ( DWORD idInst, LPCTSTR lpszGroupName ) -{ - char szDDEMsg[256]; // instance identifier - - if ( lpszGroupName == NULL ) - return FALSE; - - sprintf ( szDDEMsg, "[DeleteGroup(%s)]", lpszGroupName ); - - if ( !PMDDEML_SendShellCommand(idInst, (LPSTR)szDDEMsg ) ) - return FALSE; - return TRUE; -} - -BOOL PMDDEML_DeleteProgramCommonManagerGroup ( DWORD idInst, - LPCTSTR lpszGroupName ) -{ - char szDDEMsg[256]; // instance identifier - - if ( lpszGroupName == NULL ) - return FALSE; - - sprintf ( szDDEMsg, "[DeleteGroup(%s,1)]", lpszGroupName ); - - if ( !PMDDEML_SendShellCommand(idInst, (LPSTR)szDDEMsg ) ) - return FALSE; - return TRUE; -} - -/**************************************************************************** - FUNCTION: PMDDEML_ShowProgramManagerGroup() - - PURPOSE: Deletes a program group - - PARAMETERS: - DWORD idInst handle returned by PMDDEML_Open - LPCTSTR lpszGroupNamee name of group - - RETURNS: - TRUE, if successful -****************************************************************************/ - -BOOL PMDDEML_ShowProgramManagerGroup ( DWORD idInst, LPCTSTR lpszGroupName ) -{ - char szDDEMsg[256]; // instance identifier - - if ( lpszGroupName == NULL ) - return FALSE; - - sprintf ( szDDEMsg, "[ShowGroup(%s,1)]", lpszGroupName ); - - if ( !PMDDEML_SendShellCommand(idInst, (LPSTR)szDDEMsg ) ) - return FALSE; - return TRUE; -} - -BOOL PMDDEML_ShowProgramManagerCommonGroup ( DWORD idInst, - LPCTSTR lpszGroupName ) -{ - char szDDEMsg[256]; // instance identifier - - if ( lpszGroupName == NULL ) - return FALSE; - - sprintf ( szDDEMsg, "[ShowGroup(%s,1,1)]", lpszGroupName ); - - if ( !PMDDEML_SendShellCommand(idInst, (LPSTR)szDDEMsg ) ) - return FALSE; - return TRUE; -} - -/**************************************************************************** - FUNCTION: PMDDEML_AddIconToProgramManagerGroup() - - PURPOSE: Deletes icon a program group - - PARAMETERS: - DWORD idInst handle returned by PMDDEML_Open - LPCTSTR lpszCmdLine title of icon in group - LPCTSTR lpszTitle title of icon in group - LPCTSTR lpszWorkingDir title of icon in group - BOOL bReplace True, if icon should be replaced - - RETURNS: - TRUE, if successful -****************************************************************************/ - -BOOL PMDDEML_AddIconToProgramManagerGroup ( DWORD idInst, LPCTSTR lpszCmdLine, - LPCTSTR lpszTitle, LPCTSTR lpszIconPath, LPCTSTR lpszWorkingDir, BOOL bReplace ) -{ - char szDDEMsg[256]; // instance identifier - - if ( ( lpszCmdLine == NULL ) || ( lpszTitle == NULL ) || ( lpszWorkingDir == NULL ) ) - return FALSE; - - if ( bReplace ) { - sprintf ( szDDEMsg, "[ReplaceItem(%s)]", lpszTitle ); - PMDDEML_SendShellCommand(idInst, (LPSTR)szDDEMsg ); - } - - sprintf ( szDDEMsg, "[AddItem(%s,%s,%s,,,,%s)]", lpszCmdLine, lpszTitle, - lpszIconPath, lpszWorkingDir ); - - if ( !PMDDEML_SendShellCommand(idInst, (LPSTR)szDDEMsg ) ) - return FALSE; - return TRUE; -} - -/**************************************************************************** - FUNCTION: PMDDEML_DeleteIconInProgramManagerGroup() - - PURPOSE: Deletes icon a program group - - PARAMETERS: - DWORD idInst handle returned by PMDDEML_Open - LPCTSTR lpszTitle title of icon in group - - RETURNS: - TRUE, if successful -****************************************************************************/ - -BOOL PMDDEML_DeleteIconInProgramManagerGroup ( DWORD idInst, LPCTSTR lpszTitle ) -{ - char szDDEMsg[256]; // instance identifier - - if ( lpszTitle == NULL ) - return FALSE; - - sprintf ( szDDEMsg, "[DeleteItem(%s)]", lpszTitle ); - - if ( !PMDDEML_SendShellCommand(idInst, (LPSTR)szDDEMsg ) ) - return FALSE; - return TRUE; -} - -/**************************************************************************** - FUNCTION: PMDDEML_DdeCallback() - - PURPOSE: Processes messages for DDEML conversation - - PARAMETERS: - UINT uType, // transaction type - UINT uFmt, // clipboard data format - HCONV hconv, // handle of the conversation - HSZ hsz1, // handle of a string - HSZ hsz2, // handle of a string - HDDEDATA hdata,// handle of a global memory object - DWORD dwData1, // transaction-specific data - DWORD dwData2 // transaction-specific data - - RETURNS: - HDDEDATA -****************************************************************************/ - -HDDEDATA CALLBACK PMDDEML_DdeCallback( UINT uType, // transaction type - UINT uFmt, // clipboard data format - HCONV hconv, // handle of the conversation - HSZ hsz1, // handle of a string - HSZ hsz2, // handle of a string - HDDEDATA hdata,// handle of a global memory object - DWORD dwData1, // transaction-specific data - DWORD dwData2 // transaction-specific data - ) -{ - // Nothing need be done here... - return (HDDEDATA)NULL; -} - - -/**************************************************************************** - FUNCTION: PMDDEML_SendShellCommand() - - PURPOSE: Sends the given command string to Program Manager - - PARAMETERS: - LPSTR - pointer to command string - - RETURNS: - BOOL - TRUE if this function succeeds, FALSE otherwise -****************************************************************************/ - -BOOL PMDDEML_SendShellCommand (DWORD idInst, // instance identifier - LPSTR lpCommand) // command string to execute -{ - HSZ hszServTop; // Service and Topic name are "PROGMAN" - HCONV hconv; // handle of conversation - int nLen; // length of command string - HDDEDATA hData; // return value of DdeClientTransaction - DWORD dwResult; // result of transaction - BOOL bResult=FALSE; // TRUE if this function is successful - - // create string handle to service/topic - hszServTop = DdeCreateStringHandle(idInst, "PROGMAN", CP_WINANSI); - - // attempt to start conversation with server app - if ((hconv = DdeConnect(idInst, hszServTop, hszServTop, NULL))!= NULL) - { - // get length of the command string - nLen = lstrlen((LPSTR)lpCommand); - - // send command to server app - hData = DdeClientTransaction((LPBYTE)lpCommand, // data to pass - nLen + 1, // length of data - hconv, // handle of conversation - NULL, // handle of name-string - CF_TEXT, // clipboard format - XTYP_EXECUTE, // transaction type - 1000, // timeout duration - &dwResult); // points to transaction result - - if (hData) - bResult = TRUE; - - // end conversation - DdeDisconnect(hconv); - } - - // free service/topic string handle - DdeFreeStringHandle(idInst, hszServTop); - - return bResult; -} - - -/**************************************************************************** - FUNCTION: PMDDEML_GetProgramGroupInfo() - - PURPOSE: Gets group info from progman - - PARAMETERS: - LPSTR - pointer to command string - - RETURNS: - BOOL - TRUE if this function succeeds, FALSE otherwise -****************************************************************************/ -BOOL PMDDEML_GetProgramGroupInfo(DWORD idInst, LPSTR lpProgramGroup, char *szBuffer, DWORD cbBuffer) -{ - HSZ hszServTop; // Service and Topic name are "PROGMAN" - HSZ hszTopic; // Topic name is the lpRequest - HCONV hconv; // handle of conversation - HDDEDATA hData = 0; // return value of DdeClientTransaction - DWORD dwResult; // result of transaction - BOOL bResult=FALSE; // TRUE if this function is successful - - hszServTop = DdeCreateStringHandle(idInst, "PROGMAN", CP_WINANSI); - hszTopic = DdeCreateStringHandle(idInst, lpProgramGroup, CP_WINANSI); - - if((hconv = DdeConnect(idInst, hszServTop, hszServTop, NULL)) != NULL) - { - hData = DdeClientTransaction((LPBYTE)NULL, // data to pass - 0L, // length of data - hconv, // handle of conversation - hszTopic, // handle of name-string - CF_TEXT, // clipboard format - XTYP_REQUEST, // transaction type - 5000, // timeout duration - &dwResult); // points to transaction result - - bResult = (BOOL)DdeGetData(hData, (void FAR*)szBuffer, cbBuffer, 0); - DdeDisconnect(hconv); - } - - // free service/topic string handle - DdeFreeStringHandle(idInst, hszServTop); - DdeFreeStringHandle(idInst, hszTopic); - - return bResult; -} diff --git a/lib/libnt/registry.c b/lib/libnt/registry.c deleted file mode 100644 index e3eddd0b..00000000 --- a/lib/libnt/registry.c +++ /dev/null @@ -1,279 +0,0 @@ -/** BEGIN COPYRIGHT BLOCK - * 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; version 2 of the License. - * - * 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. - * - * In addition, as a special exception, Red Hat, Inc. gives You the additional - * right to link the code of this Program with code not covered under the GNU - * General Public License ("Non-GPL Code") and to distribute linked combinations - * including the two, subject to the limitations in this paragraph. Non-GPL Code - * permitted under this exception must only link to the code of this Program - * through those well defined interfaces identified in the file named EXCEPTION - * found in the source code files (the "Approved Interfaces"). The files of - * Non-GPL Code may instantiate templates or use macros or inline functions from - * the Approved Interfaces without causing the resulting work to be covered by - * the GNU General Public License. Only Red Hat, Inc. may make changes or - * additions to the list of Approved Interfaces. You must obey the GNU General - * Public License in all respects for all of the Program code and other code used - * in conjunction with the Program except the Non-GPL Code covered by this - * exception. If you modify this file, you may extend this exception to your - * version of the file, but you are not obligated to do so. If you do not wish to - * provide this exception without modification, you must delete this exception - * statement from your version and license this file solely under the GPL without - * exception. - * - * - * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. - * Copyright (C) 2005 Red Hat, Inc. - * All rights reserved. - * END COPYRIGHT BLOCK **/ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -// ERROR.C -// -// This file contains the functions needed to install the httpd server. -// They are as follows. -// -// getreg.c -// -// This file has the function needed to get a particular value of a key from the registry... -// 1/16/95 aruna -// - -#include <windows.h> -#include "nt/ntos.h" - -BOOL NS_WINAPI -REG_CheckIfKeyExists( HKEY hKey, LPCTSTR key ) -{ - HKEY hQueryKey; - - if (RegOpenKeyEx(hKey, key, 0, KEY_ALL_ACCESS, - &hQueryKey) != ERROR_SUCCESS) { - return FALSE; - } - - RegCloseKey(hQueryKey); - return TRUE; -} - -BOOL NS_WINAPI -REG_GetRegistryParameter( - HKEY hKey, - LPCTSTR registryKey, - LPTSTR QueryValueName, - LPDWORD ValueType, - LPBYTE ValueBuffer, - LPDWORD ValueBufferSize - ) -{ - HKEY hQueryKey; - - if (RegOpenKeyEx(hKey, registryKey, 0, KEY_ALL_ACCESS, - &hQueryKey) != ERROR_SUCCESS) { - - return FALSE; - } - - if (RegQueryValueEx(hQueryKey, QueryValueName, 0, - ValueType, ValueBuffer, ValueBufferSize) != ERROR_SUCCESS) { - RegCloseKey(hQueryKey); - return FALSE; - } - - RegCloseKey(hQueryKey); - return TRUE; -} - -BOOL NS_WINAPI -REG_CreateKey( HKEY hKey, LPCTSTR registryKey ) -{ - HKEY hNewKey; - - if ( RegCreateKey (hKey, registryKey, &hNewKey) != ERROR_SUCCESS) { - return FALSE; - } - - RegCloseKey(hNewKey); - return TRUE; -} - -BOOL NS_WINAPI -REG_DeleteKey( HKEY hKey, LPCTSTR registryKey ) -{ - HKEY hQueryKey; - DWORD dwNumberOfSubKeys; - char registrySubKey[256]; - DWORD i; - - /* if key does not exist, then consider it deleted */ - if ( !REG_CheckIfKeyExists( hKey, registryKey ) ) - return TRUE; - - if ( !REG_GetSubKeysInfo( hKey, registryKey, &dwNumberOfSubKeys, NULL ) ) - return FALSE; - - if ( dwNumberOfSubKeys ) { - if (RegOpenKeyEx(hKey, registryKey, 0, KEY_ALL_ACCESS, - &hQueryKey) != ERROR_SUCCESS) { - return FALSE; - } - - // loop through all sub keys and delete the subkeys (recursion) - for ( i=0; i<dwNumberOfSubKeys; i++ ) { - if ( RegEnumKey( hQueryKey, 0, registrySubKey, sizeof(registrySubKey) ) != ERROR_SUCCESS) { - RegCloseKey(hQueryKey); - return FALSE; - } - if ( !REG_DeleteKey( hQueryKey, registrySubKey ) ) { - RegCloseKey(hQueryKey); - return FALSE; - } - } - RegCloseKey(hQueryKey); - } - - if ( RegDeleteKey (hKey, registryKey) != ERROR_SUCCESS) { - return FALSE; - } - - return TRUE; -} - -BOOL NS_WINAPI -REG_GetSubKey( HKEY hKey, LPCTSTR registryKey, DWORD nSubKeyIndex, LPTSTR registrySubKeyBuffer, DWORD subKeyBufferSize ) -{ - HKEY hQueryKey; - - if (RegOpenKeyEx(hKey, registryKey, 0, KEY_ALL_ACCESS, - &hQueryKey) != ERROR_SUCCESS) { - return FALSE; - } - - if ( RegEnumKey( hQueryKey, nSubKeyIndex, registrySubKeyBuffer, subKeyBufferSize ) != ERROR_SUCCESS) { - RegCloseKey(hQueryKey); - return FALSE; - } - - RegCloseKey(hQueryKey); - return TRUE; -} - -BOOL NS_WINAPI -REG_GetSubKeysInfo( HKEY hKey, LPCTSTR registryKey, LPDWORD lpdwNumberOfSubKeys, LPDWORD lpdwMaxSubKeyLength ) -{ - HKEY hQueryKey; - char szClass[256]; // address of buffer for class string - DWORD cchClass; // address of size of class string buffer - DWORD cSubKeys; // address of buffer for number of subkeys - DWORD cchMaxSubkey; // address of buffer for longest subkey name length - DWORD cchMaxClass; // address of buffer for longest class string length - DWORD cValues; // address of buffer for number of value entries - DWORD cchMaxValueName; // address of buffer for longest value name length - DWORD cbMaxValueData; // address of buffer for longest value data length - DWORD cbSecurityDescriptor; // address of buffer for security descriptor length - FILETIME ftLastWriteTime; // address of buffer for last write time - - - if (RegOpenKeyEx(hKey, registryKey, 0, KEY_ALL_ACCESS, - &hQueryKey) != ERROR_SUCCESS) { - return FALSE; - } - - if ( RegQueryInfoKey( hQueryKey, // handle of key to query - (char*)&szClass, // address of buffer for class string - &cchClass, // address of size of class string buffer - NULL, // reserved - &cSubKeys, // address of buffer for number of subkeys - &cchMaxSubkey, // address of buffer for longest subkey name length - &cchMaxClass, // address of buffer for longest class string length - &cValues, // address of buffer for number of value entries - &cchMaxValueName, // address of buffer for longest value name length - &cbMaxValueData, // address of buffer for longest value data length - &cbSecurityDescriptor, // address of buffer for security descriptor length - &ftLastWriteTime // address of buffer for last write time - ) != ERROR_SUCCESS) { - RegCloseKey(hQueryKey); - return FALSE; - } - - // return desired information - if ( lpdwNumberOfSubKeys ) - *lpdwNumberOfSubKeys = cSubKeys; - if ( lpdwMaxSubKeyLength ) - *lpdwMaxSubKeyLength = cchMaxSubkey; - - RegCloseKey(hQueryKey); - return TRUE; -} - -BOOL NS_WINAPI -REG_SetRegistryParameter( - HKEY hKey, - LPCTSTR registryKey, - LPTSTR valueName, - DWORD valueType, - LPCTSTR ValueString, - DWORD valueStringLength - ) -{ - HKEY hQueryKey; - - if (RegOpenKeyEx(hKey, registryKey, 0, KEY_ALL_ACCESS, - &hQueryKey) != ERROR_SUCCESS) { - return FALSE; - } - - if ( RegSetValueEx( hQueryKey, valueName, 0, valueType, (CONST BYTE *)ValueString, - valueStringLength ) != ERROR_SUCCESS) { - RegCloseKey(hQueryKey); - return FALSE; - } - - RegCloseKey(hQueryKey); - return TRUE; -} - - - - -BOOL NS_WINAPI -REG_DeleteValue( HKEY hKey, LPCTSTR registryKey, LPCSTR valueName ) -{ - HKEY hQueryKey; - DWORD ValueBufferSize = 256; - char ValueBuffer[256]; - DWORD i, ValueType; - - /* if key does not exist, then consider it deleted */ - if (RegOpenKeyEx(hKey, registryKey, 0, KEY_ALL_ACCESS, - &hQueryKey) != ERROR_SUCCESS) { - return FALSE; - } - - /* if valuename does not exist, then consider it deleted */ - if (RegQueryValueEx(hQueryKey, valueName, 0, - &ValueType, ValueBuffer, &ValueBufferSize) != ERROR_SUCCESS) { - RegCloseKey(hQueryKey); - return TRUE; - } - - if (RegDeleteValue(hQueryKey, valueName) != ERROR_SUCCESS) { - RegCloseKey(hQueryKey); - return FALSE; - } - - RegCloseKey(hQueryKey); - return TRUE; -} diff --git a/lib/libnt/service.c b/lib/libnt/service.c deleted file mode 100644 index c4a20f4c..00000000 --- a/lib/libnt/service.c +++ /dev/null @@ -1,412 +0,0 @@ -/** BEGIN COPYRIGHT BLOCK - * 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; version 2 of the License. - * - * 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. - * - * In addition, as a special exception, Red Hat, Inc. gives You the additional - * right to link the code of this Program with code not covered under the GNU - * General Public License ("Non-GPL Code") and to distribute linked combinations - * including the two, subject to the limitations in this paragraph. Non-GPL Code - * permitted under this exception must only link to the code of this Program - * through those well defined interfaces identified in the file named EXCEPTION - * found in the source code files (the "Approved Interfaces"). The files of - * Non-GPL Code may instantiate templates or use macros or inline functions from - * the Approved Interfaces without causing the resulting work to be covered by - * the GNU General Public License. Only Red Hat, Inc. may make changes or - * additions to the list of Approved Interfaces. You must obey the GNU General - * Public License in all respects for all of the Program code and other code used - * in conjunction with the Program except the Non-GPL Code covered by this - * exception. If you modify this file, you may extend this exception to your - * version of the file, but you are not obligated to do so. If you do not wish to - * provide this exception without modification, you must delete this exception - * statement from your version and license this file solely under the GPL without - * exception. - * - * - * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. - * Copyright (C) 2005 Red Hat, Inc. - * All rights reserved. - * END COPYRIGHT BLOCK **/ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <windows.h> -#include "nt/ntos.h" - -#define SERVRET_ERROR 0 -#define SERVRET_INSTALLED 1 -#define SERVRET_STARTING 2 -#define SERVRET_STARTED 3 -#define SERVRET_STOPPING 4 -#define SERVRET_REMOVED 5 - - -DWORD NS_WINAPI -SERVICE_GetNTServiceStatus(LPCTSTR szServiceName, LPDWORD lpLastError ) -{ - SERVICE_STATUS ServiceStatus; - SC_HANDLE schService = NULL; - SC_HANDLE schSCManager = NULL; - DWORD lastError = 0; - int ret = 0; - - //ereport(LOG_INFORM, "open SC Manager"); - if ((schSCManager = OpenSCManager( - NULL, // machine (NULL == local) - NULL, // database (NULL == default) - SC_MANAGER_ALL_ACCESS // access required - )) == NULL ) { - lastError = GetLastError(); - ret = SERVRET_ERROR; - goto finish; - } - - schService = OpenService(schSCManager, szServiceName, SERVICE_ALL_ACCESS); - - if (schService == NULL ) { - lastError = GetLastError(); - if (lastError == ERROR_SERVICE_DOES_NOT_EXIST) { - lastError = 0; - ret = SERVRET_REMOVED; - } else - ret = SERVRET_ERROR; - goto finish; - } - - ret = ControlService(schService, SERVICE_CONTROL_INTERROGATE, &ServiceStatus); - - if ( !ret ) { - lastError = GetLastError(); - if ( lastError == ERROR_SERVICE_NOT_ACTIVE ) { - lastError = 0; - ret = SERVRET_INSTALLED; - } else - ret = SERVRET_ERROR; - goto finish; - } - - switch ( ServiceStatus.dwCurrentState ) { - case SERVICE_STOPPED: ret = SERVRET_INSTALLED; break; - case SERVICE_START_PENDING: ret = SERVRET_STARTING; break; - case SERVICE_STOP_PENDING: ret = SERVRET_STOPPING; break; - case SERVICE_RUNNING: ret = SERVRET_STARTED; break; - case SERVICE_CONTINUE_PENDING: ret = SERVRET_STARTED; break; - case SERVICE_PAUSE_PENDING: ret = SERVRET_STARTED; break; - case SERVICE_PAUSED: ret = SERVRET_STARTED; break; - default: ret = SERVRET_ERROR; break; - } - -finish: - if ( schService) - CloseServiceHandle(schService); - if ( schSCManager) - CloseServiceHandle(schSCManager); - if ( lpLastError ) - *lpLastError = lastError; - return ret; -} - -DWORD NS_WINAPI -SERVICE_InstallNTService(LPCTSTR szServiceName, LPCTSTR szServiceDisplayName, LPCTSTR szServiceExe ) -{ - LPCTSTR lpszBinaryPathName = szServiceExe; - SC_HANDLE schService = NULL; - SC_HANDLE schSCManager = NULL; - int lastError = 0; - int ret = 0; - - - //ereport(LOG_INFORM, "open SC Manager"); - if ((schSCManager = OpenSCManager( - NULL, // machine (NULL == local) - NULL, // database (NULL == default) - SC_MANAGER_ALL_ACCESS // access required - )) == NULL ) { - lastError = GetLastError(); - goto finish; - } - - /* check if service already exists */ - schService = OpenService( schSCManager, - szServiceName, - SERVICE_ALL_ACCESS - ); - if (schService) { - lastError = ERROR_SERVICE_EXISTS; - goto finish; - } - - schService = CreateService( - schSCManager, // SCManager database - szServiceName, // name of service - szServiceDisplayName, // name to display - SERVICE_ALL_ACCESS, // desired access - SERVICE_WIN32_OWN_PROCESS | - SERVICE_INTERACTIVE_PROCESS, // service type - SERVICE_AUTO_START, //SERVICE_DEMAND_START, // start type - SERVICE_ERROR_NORMAL, // error control type - lpszBinaryPathName, // service's binary - NULL, // no load ordering group - NULL, // no tag identifier - NULL, // no dependencies - NULL, // LocalSystem account - NULL); // no password - - if (schService == NULL) { - lastError = GetLastError(); - } - - // successfully installed service - -finish: - if ( schService) - CloseServiceHandle(schService); - if ( schSCManager) - CloseServiceHandle(schSCManager); - return lastError; -} - - -DWORD NS_WINAPI -SERVICE_RemoveNTService(LPCTSTR szServiceName) -{ - SC_HANDLE schService = NULL; - SC_HANDLE schSCManager = NULL; - int lastError = 0; - int ret = 0; - - //ereport(LOG_INFORM, "open SC Manager"); - if ((schSCManager = OpenSCManager( - NULL, // machine (NULL == local) - NULL, // database (NULL == default) - SC_MANAGER_ALL_ACCESS // access required - )) == NULL ) { - lastError = GetLastError(); - goto finish; - } - - schService = OpenService(schSCManager, szServiceName, SERVICE_ALL_ACCESS); - - if (schService == NULL ) { - lastError = GetLastError(); - goto finish; - } - - ret = DeleteService(schService); - - if ( !ret) { - lastError = GetLastError(); - goto finish; - } - - // successfully removed service - -finish: - if ( schService) - CloseServiceHandle(schService); - if ( schSCManager) - CloseServiceHandle(schSCManager); - return lastError; -} - -DWORD NS_WINAPI -SERVICE_StartNTService(LPCTSTR szServiceName) -{ - SC_HANDLE schService = NULL; - SC_HANDLE schSCManager = NULL; - int lastError = 0; - int ret = 0; - - //ereport(LOG_INFORM, "open SC Manager"); - if ((schSCManager = OpenSCManager( - NULL, // machine (NULL == local) - NULL, // database (NULL == default) - SC_MANAGER_ALL_ACCESS // access required - )) == NULL ) { - lastError = GetLastError(); - goto finish; - } - - schService = OpenService(schSCManager, szServiceName, SERVICE_ALL_ACCESS); - - if (schService == NULL ) { - lastError = GetLastError(); - goto finish; - } - - ret = StartService(schService, 0, NULL); - - if ( !ret ) { - lastError = GetLastError(); - goto finish; - } - - // successfully started service - - -finish: - if ( schService) - CloseServiceHandle(schService); - if ( schSCManager) - CloseServiceHandle(schSCManager); - return lastError; -} - -DWORD NS_WINAPI -SERVICE_StartNTServiceAndWait(LPCTSTR szServiceName, LPDWORD lpdwLastError) -{ - DWORD dwLastError; - DWORD dwStatus; - int i; - - /* check if service is running */ - dwStatus = SERVICE_GetNTServiceStatus( szServiceName, &dwLastError ); - if ( dwStatus == SERVRET_STARTED ) - return TRUE; - - dwLastError = SERVICE_StartNTService( szServiceName ); - if ( dwLastError != 0 ) { - goto errorExit; - } - - for ( i=0; i<5; i++ ) { - // make sure the service got installed - dwStatus = SERVICE_GetNTServiceStatus( szServiceName, &dwLastError ); - if ( dwStatus == SERVRET_ERROR) { - if ( dwLastError != ERROR_SERVICE_CANNOT_ACCEPT_CTRL ) - goto errorExit; - } else if ( dwStatus == SERVRET_STARTED ) - return TRUE; - - Sleep ( 1000 ); - } - - dwLastError = 0; - -errorExit: - if ( lpdwLastError ) - *lpdwLastError = dwLastError; - return FALSE; -} - -DWORD NS_WINAPI -SERVICE_StopNTService(LPCTSTR szServiceName) -{ - SC_HANDLE schService = NULL; - SC_HANDLE schSCManager = NULL; - int lastError = 0; - int ret = 0; - SERVICE_STATUS ServiceStatus; - - //ereport(LOG_INFORM, "open SC Manager"); - if ((schSCManager = OpenSCManager( - NULL, // machine (NULL == local) - NULL, // database (NULL == default) - SC_MANAGER_ALL_ACCESS // access required - )) == NULL ) { - lastError = GetLastError(); - goto finish; - } - - schService = OpenService(schSCManager, szServiceName, SERVICE_ALL_ACCESS); - - if (schService == NULL ) { - lastError = GetLastError(); - goto finish; - } - - ret = ControlService(schService, SERVICE_CONTROL_STOP, &ServiceStatus); - - if ( !ret ) { - lastError = GetLastError(); - goto finish; - } - - // server is stopping - -finish: - if ( schService) - CloseServiceHandle(schService); - if ( schSCManager) - CloseServiceHandle(schSCManager); - return lastError; -} - -DWORD NS_WINAPI -SERVICE_StopNTServiceAndWait(LPCTSTR szServiceName, LPDWORD lpdwLastError) -{ - DWORD dwLastError; - DWORD dwStatus; - int i; - - /* check if service is running */ - dwStatus = SERVICE_GetNTServiceStatus( szServiceName, &dwLastError ); - if ( dwStatus != SERVRET_STARTED ) - return TRUE; - - for ( i=0; i<30; i++ ) { - dwLastError = SERVICE_StopNTService( szServiceName ); - Sleep ( 1000 ); - - // make sure the service is stoppped and just installed - dwStatus = SERVICE_GetNTServiceStatus( szServiceName, &dwLastError ); - Sleep ( 1000 ); - if ( dwStatus == SERVRET_INSTALLED ) { - Sleep ( 1000 ); - return TRUE; - } - } - - if ( lpdwLastError ) - *lpdwLastError = dwLastError; - return FALSE; -} - -DWORD NS_WINAPI -SERVICE_ReinstallNTService(LPCTSTR szServiceName, LPCTSTR szServiceDisplayName, LPCTSTR szServiceExe ) -{ - DWORD dwLastError; - DWORD dwStatus; - int i; - - for ( i=0; i< 5; i++ ) { - - /* if service is running, stop it */ - dwStatus = SERVICE_GetNTServiceStatus( szServiceName, &dwLastError ); - if ( dwStatus == SERVRET_STARTED ) - SERVICE_StopNTServiceAndWait( szServiceName, &dwLastError ); - - /* if service is installed, remove it */ - dwStatus = SERVICE_GetNTServiceStatus( szServiceName, &dwLastError ); - if ( dwStatus == SERVRET_INSTALLED ) - SERVICE_RemoveNTService( szServiceName ); - - /* try and install the service again */ - dwStatus = SERVICE_GetNTServiceStatus( szServiceName, &dwLastError ); - if ( dwStatus == SERVRET_REMOVED ) - SERVICE_InstallNTService( szServiceName, szServiceDisplayName, szServiceExe ); - - /* try and start the service again */ - dwStatus = SERVICE_GetNTServiceStatus( szServiceName, &dwLastError ); - if ( dwStatus == SERVRET_INSTALLED ) { - return NO_ERROR; - } - } - - /* if no error reported, force an error */ - if ( dwLastError == NO_ERROR ) - dwLastError = (DWORD)-1; - - return dwLastError; -} - diff --git a/lib/libnt/tcpip.c b/lib/libnt/tcpip.c deleted file mode 100644 index c54e86c3..00000000 --- a/lib/libnt/tcpip.c +++ /dev/null @@ -1,182 +0,0 @@ -/** BEGIN COPYRIGHT BLOCK - * 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; version 2 of the License. - * - * 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. - * - * In addition, as a special exception, Red Hat, Inc. gives You the additional - * right to link the code of this Program with code not covered under the GNU - * General Public License ("Non-GPL Code") and to distribute linked combinations - * including the two, subject to the limitations in this paragraph. Non-GPL Code - * permitted under this exception must only link to the code of this Program - * through those well defined interfaces identified in the file named EXCEPTION - * found in the source code files (the "Approved Interfaces"). The files of - * Non-GPL Code may instantiate templates or use macros or inline functions from - * the Approved Interfaces without causing the resulting work to be covered by - * the GNU General Public License. Only Red Hat, Inc. may make changes or - * additions to the list of Approved Interfaces. You must obey the GNU General - * Public License in all respects for all of the Program code and other code used - * in conjunction with the Program except the Non-GPL Code covered by this - * exception. If you modify this file, you may extend this exception to your - * version of the file, but you are not obligated to do so. If you do not wish to - * provide this exception without modification, you must delete this exception - * statement from your version and license this file solely under the GPL without - * exception. - * - * - * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. - * Copyright (C) 2005 Red Hat, Inc. - * All rights reserved. - * END COPYRIGHT BLOCK **/ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <windows.h> -#include "nt/ntos.h" - -/*---------------------------------------------------------------------------*\ - * - * Function: GetServerDefaultHostName - * - * Purpose: This function gets the default host name - * - * Input: - * - * Returns: - * - * Comments: -\*---------------------------------------------------------------------------*/ -DWORD NS_WINAPI -TCPIP_GetDefaultHostName( LPTSTR lpszFullHostName, LPTSTR lpszHostName, LPTSTR lpszDomainName ) -{ - char * szKey; - char * szName; - DWORD dwValueType; - DWORD dwIpHostSize = 256; - char szIpHost[256]; - DWORD dwIpDomainSize = 256; - char szIpDomain[256]; - BOOL bWinNT; - - /* get operating system */ - switch ( INFO_GetOperatingSystem() ) { - case OS_WIN95: bWinNT = FALSE; break; - case OS_WINNT: bWinNT = TRUE; break; - default: return TCPIP_UNSUPPORTED_OS; - } - - -#if 0 - int lastError; - WSADATA WSAData; - if ( WSAStartup( 0x0101, &WSAData ) != 0 ) { - lastError = WSAGetLastError(); - m_pMainWnd->MessageBox ( "TCP/IP must be installed.\nUse the Network Icon in Control Panel" ); - return FALSE; - } - lastError = gethostname ( szIpHost, sizeof(szIpHost) ); -#endif - - /* get list of all keys under Netscape */ - if ( bWinNT ) - szKey = "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters"; - else - szKey = "SYSTEM\\CurrentControlSet\\Services\\Vxd\\MSTCP"; - - if( !REG_CheckIfKeyExists( HKEY_LOCAL_MACHINE, szKey ) ) { - return TCPIP_NO_TCPIP; - } - - /* get host name for computer. May have to get DHCP host name if empty */ - szName = "Hostname"; - if( !REG_GetRegistryParameter( HKEY_LOCAL_MACHINE, szKey, szName, &dwValueType, (LPBYTE)szIpHost, &dwIpHostSize ) ) { - szIpHost[0] = '\0'; - } - - /* get domain name for computer. May have to get DHCP host name if empty */ - szName = "Domain"; - if( !REG_GetRegistryParameter( HKEY_LOCAL_MACHINE, szKey, szName, &dwValueType, (LPBYTE)szIpDomain, &dwIpDomainSize ) ) { - dwIpDomainSize = 0; - } - if ( dwIpDomainSize == 0 ) { - szName = "DhcpDomain"; - if( !REG_GetRegistryParameter( HKEY_LOCAL_MACHINE, szKey, szName, &dwValueType, (LPBYTE)szIpDomain, &dwIpDomainSize ) ) { - dwIpDomainSize = 0; - } - } - - if ( lpszHostName ) - strcpy ( lpszHostName, szIpHost ); - - strcpy ( lpszFullHostName, szIpHost ); - if ( lpszDomainName ) { - if ( dwIpDomainSize == 0 ) - *lpszDomainName = '\0'; - else { - strcpy ( lpszDomainName, szIpDomain ); - strcat ( lpszFullHostName, "." ); - strcat ( lpszFullHostName, lpszDomainName ); - } - } - - return TCPIP_NO_ERROR; -} -/*---------------------------------------------------------------------------*\ - * - * Function: TCPIP_VerifyHostName - * - * Purpose: This function validates the host name - * - * Input: - * - * Returns: - * - * Comments: -\*---------------------------------------------------------------------------*/ -DWORD NS_WINAPI -TCPIP_VerifyHostName( LPCTSTR lpszHostName ) -{ - struct hostent *ent; - WSADATA wsd; - int lastError; - - if(WSAStartup(MAKEWORD(1, 1), &wsd) != 0) - return TCPIP_NO_WINSOCK_DLL; - - ent = gethostbyname ( lpszHostName ); - lastError = WSAGetLastError(); - WSACleanup(); - - if ( ent == NULL ) { - switch ( lastError ) { - case WSANOTINITIALISED: // A successful WSAStartup must occur before using this function. - break; - case WSAENETDOWN: // The Windows Sockets implementation has detected that the network subsystem has failed. - return TCPIP_NETWORK_DOWN; - case WSAHOST_NOT_FOUND: // Authoritative Answer Host not found. - return TCPIP_HOST_NOT_FOUND; - case WSATRY_AGAIN: // Non-Authoritative Host not found, or SERVERFAIL. - return TCPIP_HOST_SERVER_DOWN; - case WSANO_RECOVERY: // Nonrecoverable errors: FORMERR, REFUSED, NOTIMP. - return TCPIP_NETWORK_ERROR; - case WSANO_DATA: // Valid name, no data record of requested type. - return TCPIP_HOST_VALID_NAME; - case WSAEINPROGRESS: // A blocking Windows Sockets operation is in progress. - return TCPIP_NETWORK_ERROR; - case WSAEINTR: // The (blocking) call was canceled using - return TCPIP_NETWORK_ERROR; - default: - return TCPIP_NETWORK_ERROR; - } - } - return TCPIP_NO_ERROR; -} |