[shibboleth-sp2] 31/119: Update makefiles, backport I/O changes.
Ferenc Wágner
wferi-guest at moszumanska.debian.org
Tue Jan 26 21:29:47 UTC 2016
This is an automated email from the git hooks/post-receive script.
wferi-guest pushed a commit to annotated tag 1.3.1
in repository shibboleth-sp2.
commit 0c72090ed0f36340c3ce6013bf714fb20405d83d
Author: Scott Cantor <cantor.2 at osu.edu>
Date: Tue Jun 12 00:13:40 2007 +0000
Update makefiles, backport I/O changes.
---
apache/mod_apache.cpp | 41 ++++++++++++++++++++++++++++++++++++-----
apache/mod_shib20.dsp | 4 ++--
apache/mod_shib22.dsp | 4 ++--
shar/shar.rc | 4 ++--
shar/testclient.dsp | 4 ++--
5 files changed, 44 insertions(+), 13 deletions(-)
diff --git a/apache/mod_apache.cpp b/apache/mod_apache.cpp
index ee827fa..c249f56 100644
--- a/apache/mod_apache.cpp
+++ b/apache/mod_apache.cpp
@@ -300,24 +300,55 @@ public:
virtual string getArgs(void) { return string(m_req->args ? m_req->args : ""); }
virtual string getPostData(void) {
// Read the posted data
- if (ap_setup_client_block(m_req, REQUEST_CHUNKED_DECHUNK) != OK)
+#ifdef SHIB_APACHE_13
+ if (ap_setup_client_block(m_req, REQUEST_CHUNKED_DECHUNK))
throw FatalProfileException("Apache function (setup_client_block) failed while reading profile submission.");
if (!ap_should_client_block(m_req))
throw FatalProfileException("Apache function (should_client_block) failed while reading profile submission.");
if (m_req->remaining > 1024*1024)
throw FatalProfileException("Blocked too-large a submission to profile endpoint.");
+ int len;
string cgistr;
char buff[HUGE_STRING_LEN];
ap_hard_timeout("[mod_shib] getPostData", m_req);
- memset(buff, 0, sizeof(buff));
- while (ap_get_client_block(m_req, buff, sizeof(buff)-1) > 0) {
+ while ((len=ap_get_client_block(m_req, buff, sizeof(buff))) > 0) {
ap_reset_timeout(m_req);
- cgistr += buff;
- memset(buff, 0, sizeof(buff));
+ cgistr.append(buff, len);
}
ap_kill_timeout(m_req);
+ return cgistr;
+#else
+ string cgistr;
+ const char *data;
+ apr_size_t len;
+ int seen_eos = 0;
+ apr_bucket_brigade* bb = apr_brigade_create(m_req->pool, m_req->connection->bucket_alloc);
+ do {
+ apr_bucket *bucket;
+ apr_status_t rv = ap_get_brigade(m_req->input_filters, bb, AP_MODE_READBYTES, APR_BLOCK_READ, HUGE_STRING_LEN);
+ if (rv != APR_SUCCESS)
+ throw FatalProfileException("Apache function (ap_get_brigade) failed while reading profile submission.");
+
+ for (bucket = APR_BRIGADE_FIRST(bb); bucket != APR_BRIGADE_SENTINEL(bb); bucket = APR_BUCKET_NEXT(bucket)) {
+ if (APR_BUCKET_IS_EOS(bucket)) {
+ seen_eos = 1;
+ break;
+ }
+
+ /* We can't do much with this. */
+ if (APR_BUCKET_IS_FLUSH(bucket))
+ continue;
+ /* read */
+ apr_bucket_read(bucket, &data, &len, APR_BLOCK_READ);
+ if (len > 0)
+ cgistr.append(data, len);
+ }
+ apr_brigade_cleanup(bb);
+ } while (!seen_eos);
+ apr_brigade_destroy(bb);
return cgistr;
+#endif
}
virtual void clearHeader(const string &name) {
if (m_dc->bUseEnvVars==1) {
diff --git a/apache/mod_shib20.dsp b/apache/mod_shib20.dsp
index b6771fa..02dca9a 100644
--- a/apache/mod_shib20.dsp
+++ b/apache/mod_shib20.dsp
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 log4cpp.lib xerces-c_2.lib libapr.lib libhttpd.lib saml_5.lib /nologo /dll /machine:I386 /out:"mod_shib20___Win32_Release/mod_shib_20.so" /libpath:"\Apache2\lib" /libpath:"..\..\cpp-opensaml1\saml\Release"
+# ADD LINK32 log4cpp.lib xerces-c_2.lib libapr.lib libaprutil.lib libhttpd.lib saml_5.lib /nologo /dll /machine:I386 /out:"mod_shib20___Win32_Release/mod_shib_20.so" /libpath:"\Apache2\lib" /libpath:"..\..\cpp-opensaml1\saml\Release"
!ELSEIF "$(CFG)" == "mod_shib20 - Win32 Debug"
@@ -79,7 +79,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 log4cppD.lib xerces-c_2D.lib libapr.lib libhttpd.lib saml_5D.lib /nologo /dll /debug /machine:I386 /out:"mod_shib20___Win32_Debug/mod_shib_20.so" /pdbtype:sept /libpath:"\Apache2\lib" /libpath:"..\..\cpp-opensaml1\saml\Debug"
+# ADD LINK32 log4cppD.lib xerces-c_2D.lib libapr.lib libaprutil.lib libhttpd.lib saml_5D.lib /nologo /dll /debug /machine:I386 /out:"mod_shib20___Win32_Debug/mod_shib_20.so" /pdbtype:sept /libpath:"\Apache2\lib" /libpath:"..\..\cpp-opensaml1\saml\Debug"
!ENDIF
diff --git a/apache/mod_shib22.dsp b/apache/mod_shib22.dsp
index afe1867..1eaa5d6 100644
--- a/apache/mod_shib22.dsp
+++ b/apache/mod_shib22.dsp
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 log4cpp.lib xerces-c_2.lib saml_5.lib libapr-1.lib libhttpd.lib /nologo /dll /machine:I386 /out:"mod_shib22___Win32_Release/mod_shib_22.so" /libpath:"\Apache2.2\lib" /libpath:"..\..\cpp-opensaml1\saml\Release"
+# ADD LINK32 log4cpp.lib xerces-c_2.lib saml_5.lib libapr-1.lib libaprutil-1.lib libhttpd.lib /nologo /dll /machine:I386 /out:"mod_shib22___Win32_Release/mod_shib_22.so" /libpath:"\Apache2.2\lib" /libpath:"..\..\cpp-opensaml1\saml\Release"
!ELSEIF "$(CFG)" == "mod_shib22 - Win32 Debug"
@@ -79,7 +79,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 log4cppD.lib xerces-c_2D.lib saml_5D.lib libapr-1.lib libhttpd.lib /nologo /dll /debug /machine:I386 /out:"mod_shib22___Win32_Debug/mod_shib_22.so" /pdbtype:sept /libpath:"\Apache2.2\lib" /libpath:"..\..\cpp-opensaml1\saml\Debug"
+# ADD LINK32 log4cppD.lib xerces-c_2D.lib saml_5D.lib libapr-1.lib libaprutil-1.lib libhttpd.lib /nologo /dll /debug /machine:I386 /out:"mod_shib22___Win32_Debug/mod_shib_22.so" /pdbtype:sept /libpath:"\Apache2.2\lib" /libpath:"..\..\cpp-opensaml1\saml\Debug"
!ENDIF
diff --git a/shar/shar.rc b/shar/shar.rc
index fb44b32..6ece829 100644
--- a/shar/shar.rc
+++ b/shar/shar.rc
@@ -48,8 +48,8 @@ BEGIN
VALUE "CompanyName", "Internet2\0"
VALUE "FileDescription", "Shibboleth Daemon Service\0"
VALUE "FileVersion", "1, 3, 0, 0\0"
- VALUE "InternalName", "shar\0"
- VALUE "LegalCopyright", "Copyright � 2005 Internet2\0"
+ VALUE "InternalName", "shibd\0"
+ VALUE "LegalCopyright", "Copyright � 2007 Internet2\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "shibd.exe\0"
VALUE "PrivateBuild", "\0"
diff --git a/shar/testclient.dsp b/shar/testclient.dsp
index bc66197..4076d20 100644
--- a/shar/testclient.dsp
+++ b/shar/testclient.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "../oncrpc" /I "..\..\..\opensaml\c" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "../oncrpc" /I "..\..\cpp-opensaml1" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -66,7 +66,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".." /I "../oncrpc" /I "..\..\..\opensaml\c" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".." /I "../oncrpc" /I "..\..\cpp-opensaml1" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/shibboleth-sp2.git
More information about the Pkg-shibboleth-devel
mailing list