diff -ru Lanman_orig\addloader.cpp Lanman\addloader.cpp --- Lanman_orig\addloader.cpp Mon Aug 26 16:18:38 2002 +++ Lanman\addloader.cpp Tue Dec 01 20:51:51 2009 @@ -11,6 +11,7 @@ #include "addloader.h" +#include "domain.h" #include "wstring.h" #include "strhlp.h" #include "misc.h" @@ -46,6 +47,10 @@ NetDfsRemoveStdRootCall = NULL; \ NetDfsSetClientInfoCall = NULL; \ NetDfsGetDcAddressCall = NULL; \ + NetDfsRenameCall = NULL; \ + NetDfsMoveCall = NULL; \ + NetEnumerateTrustedDomainsCall = NULL; \ + I_NetGetDCListCall = NULL; \ } // stores a function pointer @@ -101,6 +106,10 @@ NetDfsRemoveStdRootFunc NetDfsRemoveStdRootCall = NULL; NetDfsSetClientInfoFunc NetDfsSetClientInfoCall = NULL; NetDfsGetDcAddressFunc NetDfsGetDcAddressCall = NULL; +NetDfsRenameFunc NetDfsRenameCall = NULL; +NetDfsMoveFunc NetDfsMoveCall = NULL; +NetEnumerateTrustedDomainsFunc NetEnumerateTrustedDomainsCall = NULL; +I_NetGetDCListFunc I_NetGetDCListCall = NULL; // function pointers exported by advapi32.dll ChangeServiceConfig2Func ChangeServiceConfig2Call = NULL; @@ -189,6 +198,20 @@ if(!LOAD_NETAPI32_FUNC(NetDfsGetDcAddress)) RaiseFalse(); + + if(!LOAD_NETAPI32_FUNC(NetDfsRename)) + RaiseFalse(); + + if(!LOAD_NETAPI32_FUNC(NetDfsMove)) + RaiseFalse(); + + if(!LOAD_NETAPI32_FUNC(NetEnumerateTrustedDomains)) + RaiseFalse(); + + if(!LOAD_NETAPI32_FUNC(I_NetGetDCList)) + RaiseFalse(); + + #pragma warning(default : 4003) } diff -ru Lanman_orig\addloader.h Lanman\addloader.h --- Lanman_orig\addloader.h Mon Aug 26 16:18:38 2002 +++ Lanman\addloader.h Wed Dec 02 16:01:10 2009 @@ -4,6 +4,7 @@ #include #include +#include "domain.h" /////////////////////////////////////////////////////////////////////////////// @@ -86,6 +87,19 @@ typedef NET_API_STATUS (NET_API_FUNCTION *NetDfsGetDcAddressFunc)(PWSTR server, PWSTR *dcIpAddr, BOOLEAN *isRoot, ULONG *timeout); + +typedef NET_API_STATUS + (NET_API_FUNCTION *NetDfsRenameFunc)(LPWSTR, LPWSTR); + +typedef NET_API_STATUS + (NET_API_FUNCTION *NetDfsMoveFunc)(LPWSTR, LPWSTR); + +typedef NET_API_STATUS + (NET_API_FUNCTION *NetEnumerateTrustedDomainsFunc) (LPWSTR ServerName, LPWSTR *DomainNames); + +typedef NET_API_STATUS + (NET_API_FUNCTION *I_NetGetDCListFunc)(LPWSTR, LPWSTR, PDWORD, PNETGETDC_INFO *); + // additional function prototypes exported by netapi32.dll typedef WINADVAPI BOOL @@ -139,6 +153,10 @@ extern NetDfsRemoveStdRootFunc NetDfsRemoveStdRootCall; extern NetDfsSetClientInfoFunc NetDfsSetClientInfoCall; extern NetDfsGetDcAddressFunc NetDfsGetDcAddressCall; +extern NetDfsRenameFunc NetDfsRenameCall; +extern NetDfsMoveFunc NetDfsMoveCall; +extern NetEnumerateTrustedDomainsFunc NetEnumerateTrustedDomainsCall; +extern I_NetGetDCListFunc I_NetGetDCListCall; // function pointers exported by advapi32.dll extern ChangeServiceConfig2Func ChangeServiceConfig2Call; diff -ru Lanman_orig\dfs.cpp Lanman\dfs.cpp --- Lanman_orig\dfs.cpp Mon Aug 26 16:18:38 2002 +++ Lanman\dfs.cpp Tue Dec 01 20:10:19 2009 @@ -455,6 +455,10 @@ LastError(0); HV *dfs = NULL; + + // return the library error if the library isn't loaded correctly + if(!NetDfsRenameCall) + RaiseFalseError(NetApi32LibError); if(items == 2) { @@ -468,7 +472,7 @@ oldEntryPath = S2W(SvPV(ST(0), PL_na)); newEntryPath = S2W(SvPV(ST(1), PL_na)); - LastError(NetDfsRename(oldEntryPath, newEntryPath)); + LastError(NetDfsRenameCall(oldEntryPath, newEntryPath)); } __except(SetExceptCode(excode)) { @@ -512,6 +516,10 @@ LastError(0); HV *dfs = NULL; + + // return the library error if the library isn't loaded correctly + if(!NetDfsRenameCall) + RaiseFalseError(NetApi32LibError); if(items == 2) { @@ -525,7 +533,7 @@ oldEntryPath = S2W(SvPV(ST(0), PL_na)); newEntryPath = S2W(SvPV(ST(1), PL_na)); - LastError(NetDfsMove(oldEntryPath, newEntryPath)); + LastError(NetDfsMoveCall(oldEntryPath, newEntryPath)); } __except(SetExceptCode(excode)) { diff -ru Lanman_orig\domain.cpp Lanman\domain.cpp --- Lanman_orig\domain.cpp Mon Aug 26 16:18:38 2002 +++ Lanman\domain.cpp Wed Dec 02 15:58:11 2009 @@ -12,6 +12,7 @@ #include "domain.h" +#include "addloader.h" #include "wstring.h" #include "strhlp.h" #include "misc.h" @@ -254,6 +255,10 @@ LastError(0); AV *domains = NULL; + + // return the library error if the library isn't loaded correctly + if(!NetEnumerateTrustedDomainsCall) + RaiseFalseError(NetApi32LibError); if(items == 2 && CHK_ASSIGN_AREF(domains, ST(1))) { @@ -267,7 +272,7 @@ AV_CLEAR(domains); - if(!LastError(NetEnumerateTrustedDomains(server, &info))) + if(!LastError(NetEnumerateTrustedDomainsCall(server, &info))) for(PWSTR infoPtr = info; infoPtr && *infoPtr; infoPtr += wcslen(infoPtr) + 1) A_STORE_WSTR(domains, infoPtr); else @@ -315,6 +320,10 @@ LastError(0); AV *contrList = NULL; + + // return the library error if the library isn't loaded correctly + if(!I_NetGetDCListCall) + RaiseFalseError(NetApi32LibError); if(items == 3 && CHK_ASSIGN_AREF(contrList, ST(2))) { @@ -335,7 +344,7 @@ AV_CLEAR(contrList); // get dc's from a domain - if(!LastError(I_NetGetDCList(server, domain, &contrCount, &contr))) + if(!LastError(I_NetGetDCListCall(server, domain, &contrCount, &contr))) for(DWORD count = 0; count < contrCount; count++) A_STORE_WSTR(contrList, contr[count].name); } diff -ru Lanman_orig\lanman.cpp Lanman\lanman.cpp --- Lanman_orig\lanman.cpp Fri Jan 03 17:26:54 2003 +++ Lanman\lanman.cpp Wed Dec 02 16:50:27 2009 @@ -328,7 +328,7 @@ RET_VAL_IF_EQUAL(MSV1_0_CRED_VERSION, name); // oops, not longer supported - RET_VAL_IF_EQUAL(MSV1_0_DERIVECRED_TYPE_SHA1, name); + // RET_VAL_IF_EQUAL(MSV1_0_DERIVECRED_TYPE_SHA1, name); RET_VAL_IF_EQUAL(MSV1_0_DONT_TRY_GUEST_ACCOUNT, name); RET_VAL_IF_EQUAL(MSV1_0_LANMAN_SESSION_KEY_LENGTH, name); RET_VAL_IF_EQUAL(MSV1_0_MAX_AVL_SIZE, name); @@ -447,17 +447,17 @@ RET_VAL_IF_EQUAL(POLICY_VIEW_LOCAL_INFORMATION, name); RET_VAL_IF_EQUAL(POLICY_WRITE, name); - RET_VAL_IF_EQUAL(POLICY_QOS_ALLOW_LOCAL_ROOT_CERT_STORE, name); - RET_VAL_IF_EQUAL(POLICY_QOS_DHCP_SERVER_ALLOWED, name); - RET_VAL_IF_EQUAL(POLICY_QOS_INBOUND_CONFIDENTIALITY, name); - RET_VAL_IF_EQUAL(POLICY_QOS_INBOUND_INTEGRITY, name); - RET_VAL_IF_EQUAL(POLICY_QOS_OUTBOUND_CONFIDENTIALITY, name); - RET_VAL_IF_EQUAL(POLICY_QOS_OUTBOUND_INTEGRITY, name); - RET_VAL_IF_EQUAL(POLICY_QOS_RAS_SERVER_ALLOWED, name); - RET_VAL_IF_EQUAL(POLICY_QOS_SCHANNEL_REQUIRED, name); + // RET_VAL_IF_EQUAL(POLICY_QOS_ALLOW_LOCAL_ROOT_CERT_STORE, name); + // RET_VAL_IF_EQUAL(POLICY_QOS_DHCP_SERVER_ALLOWED, name); + // RET_VAL_IF_EQUAL(POLICY_QOS_INBOUND_CONFIDENTIALITY, name); + // RET_VAL_IF_EQUAL(POLICY_QOS_INBOUND_INTEGRITY, name); + // RET_VAL_IF_EQUAL(POLICY_QOS_OUTBOUND_CONFIDENTIALITY, name); + // RET_VAL_IF_EQUAL(POLICY_QOS_OUTBOUND_INTEGRITY, name); + // RET_VAL_IF_EQUAL(POLICY_QOS_RAS_SERVER_ALLOWED, name); + // RET_VAL_IF_EQUAL(POLICY_QOS_SCHANNEL_REQUIRED, name); // oops, not longer supported - RET_VAL_IF_EQUAL(PolicyDomainQualityOfServiceInformation, name); + // RET_VAL_IF_EQUAL(PolicyDomainQualityOfServiceInformation, name); RET_VAL_IF_EQUAL(PolicyDomainEfsInformation, name); RET_VAL_IF_EQUAL(PolicyDomainKerberosTicketInformation, name); @@ -487,8 +487,8 @@ RET_VAL_IF_EQUAL(PolicyServerRoleBackup, name); RET_VAL_IF_EQUAL(PolicyServerRolePrimary, name); - RET_VAL_IF_EQUAL(PolicyServerDisabled, name); - RET_VAL_IF_EQUAL(PolicyServerEnabled, name); + // RET_VAL_IF_EQUAL(PolicyServerDisabled, name); + // RET_VAL_IF_EQUAL(PolicyServerEnabled, name); RET_VAL_IF_EQUAL(Proxy, name); break; @@ -693,10 +693,10 @@ RET_VAL_IF_EQUAL(TRUST_ATTRIBUTE_NON_TRANSITIVE, name); // oops, not longer supported - RET_VAL_IF_EQUAL(TRUST_ATTRIBUTE_TREE_PARENT, name); + // RET_VAL_IF_EQUAL(TRUST_ATTRIBUTE_TREE_PARENT, name); // oops, not longer supported - RET_VAL_IF_EQUAL(TRUST_ATTRIBUTE_TREE_ROOT, name); + // RET_VAL_IF_EQUAL(TRUST_ATTRIBUTE_TREE_ROOT, name); RET_VAL_IF_EQUAL(TRUST_ATTRIBUTE_UPLEVEL_ONLY, name); RET_VAL_IF_EQUAL(TRUST_ATTRIBUTES_USER, name); RET_VAL_IF_EQUAL(TRUST_ATTRIBUTES_VALID, name); @@ -711,7 +711,7 @@ RET_VAL_IF_EQUAL(TRUST_DIRECTION_INBOUND, name); RET_VAL_IF_EQUAL(TRUST_DIRECTION_OUTBOUND, name); - RET_VAL_IF_EQUAL(TRUST_TYPE_DCE, name); //nt5 + // RET_VAL_IF_EQUAL(TRUST_TYPE_DCE, name); //nt5 RET_VAL_IF_EQUAL(TRUST_TYPE_DOWNLEVEL, name); RET_VAL_IF_EQUAL(TRUST_TYPE_MIT, name); //nt5 RET_VAL_IF_EQUAL(TRUST_TYPE_UPLEVEL, name); //nt5 diff -ru Lanman_orig\makefile Lanman\makefile --- Lanman_orig\makefile Tue Jan 07 01:37:10 2003 +++ Lanman\makefile Wed Dec 02 17:17:14 2009 @@ -6,6 +6,7 @@ # # output directory for the appropriate build # +outdir10xx=.\perl.10xx.release outdir8xx=.\perl.8xx.release outdir6xx=.\perl.6xx.release outdir5xx=.\perl.5xx.release @@ -14,8 +15,9 @@ # where is the perl appropriate directory (the include header files must reside # in $(outdir)\lib\core) # -perldir8xx=c:\perl.8xx -perldir6xx=c:\perl.6xx +perldir10xx=C:\aperl510 +perldir8xx=C:\aperl58 +perldir6xx=C:\aperl56 perldir5xx=c:\perl.5xx # @@ -36,7 +38,8 @@ # # where is the platform sdk installed? # -platformsdk=c:\program files\microsoft sdk +platformsdk=C:\Program Files\Microsoft SDK +# c:\program files\microsoft sdk #platformsdk=c:\microsoft sdk # @@ -57,10 +60,11 @@ !message !endif -!if "$(cfg)" != "perl.8xx" && "$(cfg)" != "perl.6xx" && "$(cfg)" != "perl.5xx" +!if "$(cfg)" != "perl.10xx" && "$(cfg)" != "perl.8xx" && "$(cfg)" != "perl.6xx" && "$(cfg)" != "perl.5xx" !message !message Invalid configuration "$(cfg)" specified. Valid configurations are: !message +!message perl.10xx (for perl 5.10.0 build 10xx) !message perl.8xx (for perl 5.8.0 build 8xx) !message perl.6xx (for perl 5.6 build 6xx) !message perl.5xx (for perl 5.005_03 build 5xx) @@ -74,7 +78,36 @@ !error Invalid configuration specified. !endif -!if "$(cfg)" == "perl.8xx" +!if "$(cfg)" == "perl.10xx" + +# +# set parameters to build for (for perl 5.10.0 build 10xx) +# + +# set the output directory +outdir=$(outdir10xx) +# where is perl installed? +perldir="$(perldir10xx)" +# add per bin path to the path environment +PATH=$(perldir10xx)\bin;$(PATH) +# where is pod2html? +pod2html="$(perldir10xx)\bin\pod2html" +# where is ppm? +ppm="$(perldir10xx)\bin\ppm2" +# where do I find the perl include files and the perl510.lib? +perlsrcdir="$(perldir10xx)\lib\core" +# additional compiler settings +cpp_add_flags=/D PERL_5_10_0 +# additional linker settings +link_add_flags=perl510.lib +# dll name to create +dllname=$(prj).dll +# prefix output tar.gz file +targz_prefix= +# tar.gz file directory +targz_dir=mswin32-x86-multi-thread-5.10 + +!elseif "$(cfg)" == "perl.8xx" # # set parameters to build for (for perl 5.8.0 build 8xx) @@ -380,7 +413,7 @@ if not exist $(instdir)\$(cfg)\mkgz\blib\arch\auto\win32\$(prj)\$(dllname) copy $(outdir)\$(dllname) $(instdir)\$(cfg)\mkgz\blib\arch\auto\win32\$(prj)\$(dllname) if not exist $(instdir)\$(cfg)\mkgz\blib\arch\auto\win32\$(prj)\$(prj).lib copy $(outdir)\$(prj).lib $(instdir)\$(cfg)\mkgz\blib\arch\auto\win32\$(prj)\$(prj).lib if not exist $(instdir)\$(cfg)\mkgz\blib\arch\auto\win32\$(prj)\$(prj).exp copy $(outdir)\$(prj).exp $(instdir)\$(cfg)\mkgz\blib\arch\auto\win32\$(prj)\$(prj).exp - if not exist $(instdir)\$(cfg)\mkgz\blib\lib\win32\$(prj).pm copy $(miscdir)\$(prj).pm $(instdir)\$(cfg)\mkgz\blib\lib\win32\$(prj).pm + if not exist $(instdir)\$(cfg)\mkgz\blib\lib\win32\$(prj).pm copy .\$(prj).pm $(instdir)\$(cfg)\mkgz\blib\lib\win32\$(prj).pm if not exist $(instdir)\$(cfg)\mkgz\blib\html\site mkdir $(instdir)\$(cfg)\mkgz\blib\html\site if not exist $(instdir)\$(cfg)\mkgz\blib\html\site\.exists copy nul $(instdir)\$(cfg)\mkgz\blib\html\site\.exists if not exist $(instdir)\$(cfg)\mkgz\blib\html\site\lib mkdir $(instdir)\$(cfg)\mkgz\blib\html\site\lib @@ -419,8 +452,8 @@ # # create ppd file # -$(instdir)\$(cfg)\win32-$(prj).ppd : $(miscdir)\win32-$(prj).ppd - copy $(miscdir)\win32-$(prj).ppd $(instdir)\$(cfg)\win32-$(prj).ppd +$(instdir)\$(cfg)\win32-$(prj).ppd : .\win32-$(prj).ppd + copy .\win32-$(prj).ppd $(instdir)\$(cfg)\win32-$(prj).ppd # # install the package diff -ru Lanman_orig\plmisc.h Lanman\plmisc.h --- Lanman_orig\plmisc.h Fri Jan 03 21:17:28 2003 +++ Lanman\plmisc.h Wed Dec 02 17:44:19 2009 @@ -64,6 +64,20 @@ #endif +// perl 5.10.0 build 10xx +#ifdef PERL_5_10_0 + + #ifdef PERL_OBJECT + #undef PERL_OBJECT + #endif + + #define PERL_CALL_SINGLE + #define PERL_CALL + #define P_PERL + #define P_PERL_SINGLE + +#endif + #define ssize_t int // must be defined to avoid duplicate linker symbols