Simple MPM is in trunk
I've added the Simple MPM to trunk: https://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/ It isn't a fork on the previous MPMs, it is a about as clean room as it can get, and tries to keep every part of the MPM compartmentalized. At the same time it uses APR and APR-Util as much as possible. One of the major departures is that it doesn't use any of the functions from os/unixd/, which I believe is a good long term decision, since I would like to get the MPM working on Windows. I believe this MPM should be the default in 2.4 on Unix platforms. It obviously isn't ready yet, but I believe it lays a good foundation on a hybrid threading/event model that will let Apache 2.4 do more with less resources. What works: - You can run httpd -X, and it creates the main event loop, registers listener sockets, and can serve some basic http pages. - Normal command line things like -t, -V, etc all should work as expected. What doesn't work: - The name. Someone suggest something better than Simple. - Spawning children processes. - Keepalive has some issues. - Timeouts. Need _lots_ of thought on how to manage a timeout system with pools for the connection, right now its too easy to register a timer with a baton allocated out of a pool that gets destroyed. - Lots of things, patches welcome :-) What is on purpose: - SimpleProcCount and SimpleThreadCount. I hate MaxClients, MinSpareThreads, MaxSpareThreads, ThreadsPerChild, ThreadLimit, StartServers, StartThreads, and ServerLimit. They are all going to die in 2.4. Thoughts? Thanks, Paul
AW: svn commit: r708144 - /httpd/httpd/trunk/server/core_filters.c
-Ursprüngliche Nachricht- Von: Paul Querna Gesendet: Dienstag, 28. Oktober 2008 04:35 An: dev@httpd.apache.org Cc: [EMAIL PROTECTED] Betreff: Re: svn commit: r708144 - /httpd/httpd/trunk/server/core_filters.c [EMAIL PROTECTED] wrote: Author: rpluem Date: Mon Oct 27 04:39:04 2008 New Revision: 708144 URL: http://svn.apache.org/viewvc?rev=708144view=rev Log: * Do more greedy reads in the core input filter to get more closer to the number of bytes requested. Curious what you were seeing that this was needed? Something funky with event or one of the other MPMs? Neither. There is a situation in the proxy where we are willing to read large chunks of the backend response (ProxyIOBuffersize) at once but could't do this. An apr_bucket_read from a socket bucket delivers at most 8000 bytes regardless if there is more data available to read in the TCP buffers. Regards Rüdiger
Re: Simple MPM is in trunk
I built trunk with --with-mpm=simple, and I have found : * simple_io.c line 111 and 145 cause a build falure with --enable-maintainer-mode . * simple_children.c should include simple_children.h. * simple_io_timeot_cb should be static.
Re: Simple MPM is in trunk
Paul Querna wrote: What is on purpose: - SimpleProcCount and SimpleThreadCount. I hate MaxClients, MinSpareThreads, MaxSpareThreads, ThreadsPerChild, ThreadLimit, StartServers, StartThreads, and ServerLimit. They are all going to die in 2.4. Simplification is good :) How will the simple MPM behave as load increases? Regards, Graham -- smime.p7s Description: S/MIME Cryptographic Signature
Help: Extending an add on module
Hi, i try to extend an already existing apache module mod_auth_tkt! mod_auth_tkt reads from a cookie login information and additional user data. The login-information in cookie is a md5 hash. The additional data are in plain text. Now i set the additional data in the cookie as a blowfish encrypted string. This seems to work so far. Now the tricky part. I have included openssl/blowfish in the mod_auth_tkt.c #include openssl/blowfish.h I try to get my key config with this command: BF_set_key(key, 8, (unsigned char *)bf_key[1]); BF_Decrypt(b, key); I hope this is correct so far? make make install works so far. But if i try to start apache i get this error message: Syntax error on line 235 of /opt/apache/server/conf/httpd.conf: Cannot load /opt/apache/server/modules/mod_auth_tkt.so into server: /opt/apache/server/modules/mod_auth_tkt.so: undefined symbol: BF_Decrypt Any ideas where i can look for this? Christian
Re: Simple MPM is in trunk
On Oct 28, 2008, at 03:12, Paul Querna wrote: What is on purpose: - SimpleProcCount and SimpleThreadCount. I hate MaxClients, MinSpareThreads, MaxSpareThreads, ThreadsPerChild, ThreadLimit, StartServers, StartThreads, and ServerLimit. They are all going to die in 2.4. Thoughts? Bravo -- http://feathercast.org/
How can i decrypt a cookie in a module
Hello, how can i decrypt a blowfish sigend cookie in an module. I have tried to do this so far: mod_auth_tkt is the module which should decrypt the cookie. I have included openssl/blowfish in the mod_auth_tkt.c #include openssl/blowfish.h I try to get my key config with this command: BF_set_key(key, 8, (unsigned char *)bf_key[1]); BF_Decrypt(b, key); I hope this is correct so far? make make install works so far. But if i try to start apache i get this error message: Syntax error on line 235 of /opt/apache/server/conf/httpd.conf: Cannot load /opt/apache/server/modules/mod_auth_tkt.so into server: / opt/apache/server/modules/mod_auth_tkt.so: undefined symbol: BF_Decrypt Any ideas where i can look for this?
Re: Help: Extending an add on module
On Tue, 28 Oct 2008 12:08:57 +0100 Christian Klinger [EMAIL PROTECTED] wrote: Cannot load /opt/apache/server/modules/mod_auth_tkt.so into server: /opt/apache/server/modules/mod_auth_tkt.so: undefined symbol: BF_Decrypt See the LoadFile directive. Use it to load the library that exports the symbols you need. For future reference, the modules-dev list would be more on-topic for this kind of question. You might also want to check whether mod_session and family could be relevant to your needs. -- Nick Kew Application Development with Apache - the Apache Modules Book http://www.apachetutor.org/
Re: Help: Extending an add on module
Nick Kew schrieb: On Tue, 28 Oct 2008 12:08:57 +0100 Christian Klinger [EMAIL PROTECTED] wrote: Cannot load /opt/apache/server/modules/mod_auth_tkt.so into server: /opt/apache/server/modules/mod_auth_tkt.so: undefined symbol: BF_Decrypt See the LoadFile directive. Use it to load the library that exports the symbols you need. For future reference, the modules-dev list would be more on-topic for this kind of question. You might also want to check whether mod_session and family could be relevant to your needs. Hi Nick, i ´ve already found this list... Thanks for info. Christian
Re: How can i decrypt a cookie in a module
On Tue, Oct 28, 2008 at 12:35:51PM +0100, Christian Klinger wrote: Hello, how can i decrypt a blowfish sigend cookie in an module. I have tried to do this so far: mod_auth_tkt is the module which should decrypt the cookie. I have included openssl/blowfish in the mod_auth_tkt.c #include openssl/blowfish.h I try to get my key config with this command: BF_set_key(key, 8, (unsigned char *)bf_key[1]); BF_Decrypt(b, key); I hope this is correct so far? make make install works so far. But if i try to start apache i get this error message: Syntax error on line 235 of /opt/apache/server/conf/httpd.conf: Cannot load /opt/apache/server/modules/mod_auth_tkt.so into server: / opt/apache/server/modules/mod_auth_tkt.so: undefined symbol: BF_Decrypt Any ideas where i can look for this? The symbol BF_Decrypt is probably to be found in libcrypto from OpenSSL. When mod_auth_tkt was compiled, it was not linked with that library. So either you need to add -lcrypto to the compile command, or you can alternatively start Apache with the LoadFile directive, which will cause Apache to load the library so that the symbol can be found at runtime. Peter -- Contact: [EMAIL PROTECTED] (a.k.a. [EMAIL PROTECTED]) #opensuse-mirrors on freenode.net Info: http://en.opensuse.org/Mirror_Infrastructure SUSE LINUX Products GmbH Research Development pgpbN8Ck8unfl.pgp Description: PGP signature
Re: How can i decrypt a cookie in a module
The symbol BF_Decrypt is probably to be found in libcrypto from OpenSSL. When mod_auth_tkt was compiled, it was not linked with that library. So either you need to add -lcrypto to the compile command, or you can alternatively start Apache with the LoadFile directive, which will cause Apache to load the library so that the symbol can be found at runtime. Peter Hello Peter, thanks for the answers, but i don´t get it. I try to add the Icrypto in my Makefile i get the error again: g3:/opt/apache/mod_auth_tkt-2.0.0rc3 # make cd src make all make[1]: Entering directory `/opt/apache/mod_auth_tkt-2.0.0rc3/src' /opt/apache/server/bin/apxs -c -Wc, -Wall -ansi -g -Wall -ansi - pedantic -Wno-implicit-function-declaration -Wno-long-long -Icrypto mod_auth_tkt.c /opt/apache/server/build/libtool --silent --mode=compile gcc -prefer- pic -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT - D_GNU_SOURCE -g -O2 -pthread -I/opt/apache/server/include -I/opt/ apache/server/include -I/opt/apache/server/include-c -o mod_auth_tkt.lo mod_auth_tkt.c touch mod_auth_tkt.slo /opt/apache/server/build/libtool --silent --mode=link gcc -o mod_auth_tkt.la -rpath /opt/apache/server/modules -module -avoid- versionmod_auth_tkt.lo make[1]: Leaving directory `/opt/apache/mod_auth_tkt-2.0.0rc3/src' cd doc make all make[1]: Entering directory `/opt/apache/mod_auth_tkt-2.0.0rc3/doc' pod2man --section=3 --release=2.0.0rc3 mod_auth_tkt.pod mod_auth_tkt.3 make[1]: Leaving directory `/opt/apache/mod_auth_tkt-2.0.0rc3/doc' What file should i include to the LoadFile? Blowfish.h mod_auth_tkt.so? Sorry i´m a newbie in this stuff. Christian -- Contact: [EMAIL PROTECTED] (a.k.a. [EMAIL PROTECTED]) #opensuse-mirrors on freenode.net Info: http://en.opensuse.org/Mirror_Infrastructure SUSE LINUX Products GmbH Research Development
Re: How can i decrypt a cookie in a module
Christian Klinger wrote: thanks for the answers, but i don´t get it. I try to add the Icrypto in my Makefile i get the error again: [snip] That's a font issue - it's actually a lowercase L (for library) rather than an uppercase i (for include directory). What file should i include to the LoadFile? Blowfish.h mod_auth_tkt.so? I believe the LoadFile should be the path to the OpenSSL crypto library, which would be something like /usr/lib/libcrypto.so (but you may need to select a specific version). See the docs at http://httpd.apache.org/docs/2.2/mod/mod_so.html Sorry i´m a newbie in this stuff. Everyone starts somewhere :-) Dave
Re: How can i decrypt a cookie in a module
On Tue, Oct 28, 2008 at 02:12:26PM +0100, Christian Klinger wrote: The symbol BF_Decrypt is probably to be found in libcrypto from OpenSSL. When mod_auth_tkt was compiled, it was not linked with that library. So either you need to add -lcrypto to the compile command, or you can alternatively start Apache with the LoadFile directive, which will cause Apache to load the library so that the symbol can be found at runtime. Peter Hello Peter, thanks for the answers, but i don´t get it. I try to add the Icrypto in my Makefile i get the error again: I meant -l (as in link), not -I (as in include). Try to add this into the command: -lssl -lcrypto This will add a reference to libssl and libcrypto (from your library path) be added to the shared object that you compile with 'apxs -c ...'. You didn't get an error from the -I you tried, because it just adds a search path to look for include files, and non-existing paths are ignored. What file should i include to the LoadFile? Blowfish.h mod_auth_tkt.so? You would use it as such: LoadFile /usr/lib/libcrypto.so To find the correct library, you could try ldd $(which sshd) | grep crypto Sorry i´m a newbie in this stuff. Everybody is at some point in time :) Peter -- Contact: [EMAIL PROTECTED] (a.k.a. [EMAIL PROTECTED]) #opensuse-mirrors on freenode.net Info: http://en.opensuse.org/Mirror_Infrastructure SUSE LINUX Products GmbH Research Development pgpqL2OEZkIIB.pgp Description: PGP signature
Re: How can i decrypt a cookie in a module
Am 28.10.2008 um 14:30 schrieb Peter Poeml: On Tue, Oct 28, 2008 at 02:12:26PM +0100, Christian Klinger wrote: The symbol BF_Decrypt is probably to be found in libcrypto from OpenSSL. When mod_auth_tkt was compiled, it was not linked with that library. So either you need to add -lcrypto to the compile command, or you can alternatively start Apache with the LoadFile directive, which will cause Apache to load the library so that the symbol can be found at runtime. Peter Hello Peter, thanks for the answers, but i don´t get it. I try to add the Icrypto in my Makefile i get the error again: I meant -l (as in link), not -I (as in include). Try to add this into the command: -lssl -lcrypto This will add a reference to libssl and libcrypto (from your library path) be added to the shared object that you compile with 'apxs - c ...'. Hi Peter, now i have the -lssl and -lcrypt in the gcc command but i alwas get the same error again. make cd src make all make[1]: Entering directory `/opt/apache/mod_auth_tkt-2.0.0rc3/src' /opt/apache/server/bin/apxs -c -Wc, -Wall -ansi -g -Wall -ansi - pedantic -Wno-implicit-function-declaration -Wno-long-long -lssl - lcrypto -lssl -lcrypto mod_auth_tkt.c /opt/apache/server/build/libtool --silent --mode=compile gcc -prefer- pic -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT - D_GNU_SOURCE -g -O2 -pthread -I/opt/apache/server/include -I/opt/ apache/server/include -I/opt/apache/server/include-c -o mod_auth_tkt.lo mod_auth_tkt.c touch mod_auth_tkt.slo /opt/apache/server/build/libtool --silent --mode=link gcc -o mod_auth_tkt.la -lssl -lcrypto -rpath /opt/apache/server/modules - module -avoid-versionmod_auth_tkt.lo make[1]: Leaving directory `/opt/apache/mod_auth_tkt-2.0.0rc3/src' cd doc make all make[1]: Entering directory `/opt/apache/mod_auth_tkt-2.0.0rc3/doc' pod2man --section=3 --release=2.0.0rc3 mod_auth_tkt.pod mod_auth_tkt.3 make[1]: Leaving directory `/opt/apache/mod_auth_tkt-2.0.0rc3/doc' g3:/opt/apache/mod_auth_tkt-2.0.0rc3 # make install cd src make install make[1]: Entering directory `/opt/apache/mod_auth_tkt-2.0.0rc3/src' /opt/apache/server/bin/apxs -i mod_auth_tkt.la /opt/apache/server/build/instdso.sh SH_LIBTOOL='/opt/apache/server/ build/libtool' mod_auth_tkt.la /opt/apache/server/modules /opt/apache/server/build/libtool --mode=install cp mod_auth_tkt.la / opt/apache/server/modules/ cp .libs/mod_auth_tkt.so /opt/apache/server/modules/mod_auth_tkt.so cp .libs/mod_auth_tkt.lai /opt/apache/server/modules/mod_auth_tkt.la cp .libs/mod_auth_tkt.a /opt/apache/server/modules/mod_auth_tkt.a chmod 644 /opt/apache/server/modules/mod_auth_tkt.a ranlib /opt/apache/server/modules/mod_auth_tkt.a PATH=$PATH:/sbin ldconfig -n /opt/apache/server/modules -- Libraries have been installed in: /opt/apache/server/modules If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. -- chmod 755 /opt/apache/server/modules/mod_auth_tkt.so make[1]: Leaving directory `/opt/apache/mod_auth_tkt-2.0.0rc3/src' cd doc make install make[1]: Entering directory `/opt/apache/mod_auth_tkt-2.0.0rc3/doc' mkdir -p /usr/share/man/man3 cp mod_auth_tkt.3 /usr/share/man/man3 chmod 644 /usr/share/man/man3/mod_auth_tkt.3 make[1]: Leaving directory `/opt/apache/mod_auth_tkt-2.0.0rc3/doc' g3:/opt/apache/mod_auth_tkt-2.0.0rc3 # I have added the LoadFile with all possibilitys of libcrypto I´ve included all versions of the libcrypto lib. LoadFile /usr/lib/libcrypto.so.0.9.8 LoadFile /usr/lib/libcrypto.so.0.9.7 LoadFile /usr/lib/libcrypto but with no success Any Ideas left Christian
Re: Simple MPM is in trunk
On Tue, 28 Oct 2008 00:12:51 -0700 Paul Querna [EMAIL PROTECTED] wrote: I've added the Simple MPM to trunk: https://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/ One central part of interest (simplified): int simple_child_loop(simple_core_t *sc) { simple_setup_workers(sc); simple_setup_listeners(sc); simple_setup_privs(sc); simple_run_loop(sc); } For my immediate purposes, I'd like to see simple_setup_privs replaced by a hook (which is essentially the old child_init hook). Then add back in a mod_unixd to get the classic model of *X MPMs, and whatever is the equivalent on other platforms. But is there any reason we shouldn't replace *each of* the above functions with a hook? -- Nick Kew Application Development with Apache - the Apache Modules Book http://www.apachetutor.org/
Re: Simple MPM is in trunk
Takashi Sato wrote: I built trunk with --with-mpm=simple, and I have found : * simple_io.c line 111 and 145 cause a build falure with --enable-maintainer-mode . * simple_children.c should include simple_children.h. * simple_io_timeot_cb should be static. Fixed in trunk, r708599. Thanks, Paul
Re: Simple MPM is in trunk
Nick Kew wrote: On Tue, 28 Oct 2008 00:12:51 -0700 Paul Querna [EMAIL PROTECTED] wrote: I've added the Simple MPM to trunk: https://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/ One central part of interest (simplified): int simple_child_loop(simple_core_t *sc) { simple_setup_workers(sc); simple_setup_listeners(sc); simple_setup_privs(sc); simple_run_loop(sc); } For my immediate purposes, I'd like to see simple_setup_privs replaced by a hook (which is essentially the old child_init hook). Then add back in a mod_unixd to get the classic model of *X MPMs, and whatever is the equivalent on other platforms. But is there any reason we shouldn't replace *each of* the above functions with a hook? Yes, my intention as mentioned inside the simple_setup_privs function is to add hooks for things that unixd currently does like chroot and changing user IDs... I'm not sure about setup_listeners and the like, but my first goal was to get the MPM to a semi-usable state, before going and making everything hookable :-) Thanks, Paul
Re: svn commit: r708462 - in /httpd/httpd/trunk/server/mpm: ./ simple/
On 10/28/2008 08:00 AM, [EMAIL PROTECTED] wrote: Author: pquerna Date: Tue Oct 28 00:00:15 2008 New Revision: 708462 URL: http://svn.apache.org/viewvc?rev=708462view=rev Log: Add a work in progress, a completely new, Simple MPM. Added: httpd/httpd/trunk/server/mpm/simple/ (with props) Nitpicking: While event MPM is still in experimental simple is not? :-). As for name proposals, how about Generic MPM Universal MPM Added: httpd/httpd/trunk/server/mpm/simple/simple_api.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/simple_api.c?rev=708462view=auto == +static const char* +set_proccount(cmd_parms *cmd, void *baton, const char *arg) +{ + const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); + if (err != NULL) { +return err; + } + + simple_core_get()-procmgr.proc_count = atoi(arg); Does this work on ANSI compilers? Added: httpd/httpd/trunk/server/mpm/simple/simple_io.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/simple_io.c?rev=708462view=auto == --- httpd/httpd/trunk/server/mpm/simple/simple_io.c (added) +++ httpd/httpd/trunk/server/mpm/simple/simple_io.c Tue Oct 28 00:00:15 2008 @@ -0,0 +1,279 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include httpd.h +#include http_log.h +#include ap_listen.h +#include simple_types.h +#include simple_io.h +#include simple_event.h + +#include http_connection.h +#include util_filter.h +#include http_main.h +#include mpm.h +#include scoreboard.h +#include http_vhost.h + +void +simple_io_timeot_cb(simple_core_t *sc, I guess this should be simple_io_timeout_cb. + void *baton) +{ + simple_conn_t *scon = (simple_conn_t *)baton; + /* pqX: handle timeouts. */ + conn_rec *c = scon-c; + conn_state_t *cs = c-cs; + + cs = NULL; + + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf, + io timeout hit (?)); +} + +static apr_status_t +simple_io_process(simple_conn_t *scon) +{ + apr_status_t rv; + + if (scon-c-clogging_input_filters !scon-c-aborted) { +/* Since we have an input filter which 'cloggs' the input stream, + * like mod_ssl, lets just do the normal read from input filters, + * like the Worker MPM does. + */ +ap_run_process_connection(scon-c); +if (scon-c-cs-state != CONN_STATE_SUSPENDED) { + scon-c-cs-state = CONN_STATE_LINGER; +} + } + + simple_core_t *sc = scon-sc; + conn_rec *c = scon-c; + conn_state_t *cs = c-cs; This does not work on ANSI C compilers. Declarations need to be at the start of the block. Added: httpd/httpd/trunk/server/mpm/simple/simple_event.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/simple_event.c?rev=708462view=auto == --- httpd/httpd/trunk/server/mpm/simple/simple_event.c (added) +++ httpd/httpd/trunk/server/mpm/simple/simple_event.c Tue Oct 28 00:00:15 2008 @@ -0,0 +1,81 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define APR_RING_DEBUG 1 + +#include simple_types.h +#include simple_event.h + +void +simple_register_timer(simple_core_t *sc, + simple_timer_cb cb,
Re: svn commit: r708462 - in /httpd/httpd/trunk/server/mpm: ./ simple/
Ruediger Pluem wrote: On 10/28/2008 08:00 AM, [EMAIL PROTECTED] wrote: Author: pquerna Date: Tue Oct 28 00:00:15 2008 New Revision: 708462 URL: http://svn.apache.org/viewvc?rev=708462view=rev Log: Add a work in progress, a completely new, Simple MPM. Added: httpd/httpd/trunk/server/mpm/simple/ (with props) Nitpicking: While event MPM is still in experimental simple is not? :-). I think the whole 'experimental' MPM thing should go away. If its in a stable released version, it should be stable, not experimental But thats a different thread. Anyways, I would support moving Event out, since we have had the clogging input filters / mod_ssl support in there for awhile :-) As for name proposals, how about Generic MPM Universal MPM Added: httpd/httpd/trunk/server/mpm/simple/simple_api.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/simple_api.c?rev=708462view=auto == +static const char* +set_proccount(cmd_parms *cmd, void *baton, const char *arg) +{ + const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); + if (err != NULL) { +return err; + } + + simple_core_get()-procmgr.proc_count = atoi(arg); Does this work on ANSI compilers? Doubtful. + simple_core_t *sc = scon-sc; + conn_rec *c = scon-c; + conn_state_t *cs = c-cs; This does not work on ANSI C compilers. Declarations need to be at the start of the block. Then lets not support them. C90 required that variable decls came before code, but IIRC C99 style mid-function declarations should work on pretty much all modern platforms, aka anything with GCC or MSVC. +APR_RING_CHECK_CONSISTENCY(sc-timer_ring, simple_timer_t, link); Do we really need this check here? We have already done this. + APR_RING_CHECK_CONSISTENCY(sc-timer_ring, simple_timer_t, link); Do we really need this check here? We have already done this. Ring Consistency Checks are no-ops unless APR_RING_DEBUG is defined, so, all of these lines compile out unless you are hunting down a place you are corrupting the ring. I don't view them as important to remove, mostly because I was chasing down a bug where I corrupted the timer_ring earlier in the evening. Regards Rüdiger Thanks for reviewing, Paul
Re: svn commit: r708462 - in /httpd/httpd/trunk/server/mpm: ./ simple/
* Paul Querna wrote: Ruediger Pluem wrote: This does not work on ANSI C compilers. Declarations need to be at the start of the block. Then lets not support them. C90 required that variable decls came before code, but IIRC C99 style mid-function declarations should work on pretty much all modern platforms, aka anything with GCC or MSVC. -1. IIRC and pretty much all modern are both bad reasons for being sloppy ;-) IIRC ( :- ) the AIX compiler actually doesn't like it, but other people know that better. nd -- Rätselnd, was ein Anthroposoph mit Unterwerfung zu tun hat... [...] Dieses Wort gibt so viele Stellen für einen Spelling Flame her, und Du gönnst einem keine einzige.-- Jean Claude und David Kastrup in dtl
Re: svn commit: r708462 - in /httpd/httpd/trunk/server/mpm: ./ simple/
André Malo wrote: * Paul Querna wrote: Ruediger Pluem wrote: This does not work on ANSI C compilers. Declarations need to be at the start of the block. Then lets not support them. C90 required that variable decls came before code, but IIRC C99 style mid-function declarations should work on pretty much all modern platforms, aka anything with GCC or MSVC. -1. IIRC and pretty much all modern are both bad reasons for being sloppy ;-) IIRC ( :- ) the AIX compiler actually doesn't like it, but other people know that better. Then lets not support AIX :-) Paul
Re: svn commit: r708462 - in /httpd/httpd/trunk/server/mpm: ./ simple/
Paul Querna wrote: André Malo wrote: * Paul Querna wrote: Ruediger Pluem wrote: This does not work on ANSI C compilers. Declarations need to be at the start of the block. Then lets not support them. C90 required that variable decls came before code, but IIRC C99 style mid-function declarations should work on pretty much all modern platforms, aka anything with GCC or MSVC. -1. IIRC and pretty much all modern are both bad reasons for being sloppy ;-) IIRC ( :- ) the AIX compiler actually doesn't like it, but other people know that better. Then lets not support AIX :-) To expand on my beliefs around this a little bit, if a platform doesn't have things like kqueue, epool or event ports, and it still doesn't have a c99 compiler, where is the value in supporting it, they are likely still using Apache 1.3 anyways. -Paul
Re: How can i decrypt a cookie in a module
Hi Christian, On Tue, Oct 28, 2008 at 02:45:05PM +0100, Christian Klinger wrote: now i have the -lssl and -lcrypt in the gcc command but i alwas get the same error again. With the same error, you mean the same symbol is still missing when you run Apache and use the modules functionality? make [...] Libraries have been installed in: /opt/apache/server/modules [...] The output of your make command looks fine anyway. I have added the LoadFile with all possibilitys of libcrypto Just to not be misunderstood: You need only one of the two means - either linking to all needed libraries, and letting the runtime linker do the work -- or use the LoadFile directive to take care. I´ve included all versions of the libcrypto lib. LoadFile /usr/lib/libcrypto.so.0.9.8 LoadFile /usr/lib/libcrypto.so.0.9.7 LoadFile /usr/lib/libcrypto Btw, doing this with different version of a library is maybe not a good idea, because their symbols could clash. but with no success Any Ideas left Christian On Tue, Oct 28, 2008 at 03:40:12PM +0100, Christian Klinger wrote: Hi again, ldd mod_auth_tkt.so linux-gate.so.1 = (0xe000) libssl.so.0.9.8 = /usr/lib/libssl.so.0.9.8 (0xb7f6f000) libcrypto.so.0.9.8 = /usr/lib/libcrypto.so.0.9.8 (0xb7e29000) libc.so.6 = /lib/libc.so.6 (0xb7cf6000) libdl.so.2 = /lib/libdl.so.2 (0xb7cf2000) libz.so.1 = /lib/libz.so.1 (0xb7cde000) /lib/ld-linux.so.2 (0x8000) is this ok? Or do I need something special for blowfish.h? You could check if your libcrypto actually contains the symbol you were missing -- after all it might be possible that your OpenSSL is compiled without blowfish support? Does strings /usr/lib/libcrypto.so.0.9.8 | grep BF_Decrypt print something? If all else fails, check if you have some kind of mess from previous build attempts which causes Apache to load other objects than you might think. lsof -p $pid_of_parent_apache_proxy can be a valuable tool to double check. Peter -- Contact: [EMAIL PROTECTED] (a.k.a. [EMAIL PROTECTED]) #opensuse-mirrors on freenode.net Info: http://en.opensuse.org/Mirror_Infrastructure SUSE LINUX Products GmbH Research Development pgpUDd7EU4Y4X.pgp Description: PGP signature
Re: svn commit: r708462 - in /httpd/httpd/trunk/server/mpm: ./ simple/
On Tue, 28 Oct 2008 16:16:38 -0700 Paul Querna [EMAIL PROTECTED] wrote: Paul Querna wrote: André Malo wrote: * Paul Querna wrote: Ruediger Pluem wrote: This does not work on ANSI C compilers. Declarations need to be at the start of the block. Then lets not support them. C90 required that variable decls came before code, but IIRC C99 style mid-function declarations should work on pretty much all modern platforms, aka anything with GCC or MSVC. -1. IIRC and pretty much all modern are both bad reasons for being sloppy ;-) IIRC ( :- ) the AIX compiler actually doesn't like it, but other people know that better. Then lets not support AIX :-) To expand on my beliefs around this a little bit, if a platform doesn't have things like kqueue, epool or event ports, and it still doesn't have a c99 compiler, where is the value in supporting it, they are likely still using Apache 1.3 anyways. -Paul VC++2005 doesn't support mid-function declarations as a C compiler. Maybe VC++2008 doesn't either. With a file name extension .c, #include stdio.h int main(){ puts(); int a = 0; return 0; } does not compile with error C2143.
Re: svn commit: r708462 - in /httpd/httpd/trunk/server/mpm: ./ simple/
Takashi Sato wrote: On Tue, 28 Oct 2008 16:16:38 -0700 Paul Querna [EMAIL PROTECTED] wrote: Paul Querna wrote: André Malo wrote: * Paul Querna wrote: Ruediger Pluem wrote: This does not work on ANSI C compilers. Declarations need to be at the start of the block. Then lets not support them. C90 required that variable decls came before code, but IIRC C99 style mid-function declarations should work on pretty much all modern platforms, aka anything with GCC or MSVC. -1. IIRC and pretty much all modern are both bad reasons for being sloppy ;-) IIRC ( :- ) the AIX compiler actually doesn't like it, but other people know that better. Then lets not support AIX :-) To expand on my beliefs around this a little bit, if a platform doesn't have things like kqueue, epool or event ports, and it still doesn't have a c99 compiler, where is the value in supporting it, they are likely still using Apache 1.3 anyways. -Paul VC++2005 doesn't support mid-function declarations as a C compiler. Maybe VC++2008 doesn't either. With a file name extension .c, #include stdio.h int main(){ puts(); int a = 0; return 0; } does not compile with error C2143. thats lame. Can we just use c++ yet? Guess I'll go through all the code and fix this. Sigh, -Paul
Re: Re: svn commit: r708462 - in /httpd/httpd/trunk/server/mpm: ./ simple/
发件人: Paul Querna 发送时间: 2008-10-29 07:17:45 收件人: dev 抄送: 主题: Re: svn commit: r708462 - in /httpd/httpd/trunk/server/mpm: ./ simple/ Paul Querna wrote: André Malo wrote: * Paul Querna wrote: Ruediger Pluem wrote: This does not work on ANSI C compilers. Declarations need to be at the start of the block. Then lets not support them. C90 required that variable decls came before code, but IIRC C99 style mid-function declarations should work on pretty much all modern platforms, aka anything with GCC or MSVC. -1. IIRC and pretty much all modern are both bad reasons for being sloppy ;-) IIRC ( :- ) the AIX compiler actually doesn't like it, but other people know that better. Then lets not support AIX :-) To expand on my beliefs around this a little bit, if a platform doesn't have things like kqueue, epool or event ports, and it still doesn't have a c99 compiler, where is the value in supporting it, they are likely still using Apache 1.3 anyways. -Paul ^_^ I gree with you.
Re: svn commit: r708462 - in /httpd/httpd/trunk/server/mpm: ./ simple/
Paul Querna wrote: Takashi Sato wrote: int main(){ puts(); int a = 0; return 0; } does not compile with error C2143. thats lame. Can we just use c++ yet? Guess I'll go through all the code and fix this. Especially considering the MS doesn't have a C compiler, they use the C++ engine as the base of their C language compiler (leading to many unusual and irksome/convenient behaviors). Strange this isn't one of them.