Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 532842
Collapse All | Expand All

(-)a/configure.in (+14 lines)
Lines 336-341 AC_TRY_RUN([ Link Here
336
], [
336
], [
337
])
337
])
338
338
339
AC_TRY_RUN([
340
	#include <ap_release.h>
341
	int main ()
342
	{
343
		return (AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER == 4) ? 0 : 1;
344
	}
345
], [
346
	APACHE_VER=2.4
347
], [
348
])
339
fi
349
fi
340
350
341
if test ! "$APACHE_VER" = "1.3" -a ! "$APACHE_VER" = "retry" ; then
351
if test ! "$APACHE_VER" = "1.3" -a ! "$APACHE_VER" = "retry" ; then
Lines 385-390 if test "$APACHE_VER" = "2.2" ; then Link Here
385
	AC_DEFINE([APACHE22],,[Compiling for Apache >= 2.2 ])
395
	AC_DEFINE([APACHE22],,[Compiling for Apache >= 2.2 ])
386
fi
396
fi
387
397
398
if test "$APACHE_VER" = "2.4" ; then
399
	AC_DEFINE([APACHE24],,[Compiling for Apache >= 2.4 ])
400
fi
401
388
# check for --with-mono-default-config-dir
402
# check for --with-mono-default-config-dir
389
DFLT_MONO_CONFIG_DIR=`$APXS -q SYSCONFDIR`/mod-mono-applications
403
DFLT_MONO_CONFIG_DIR=`$APXS -q SYSCONFDIR`/mod-mono-applications
390
AC_ARG_WITH(mono-default-config-dir,
404
AC_ARG_WITH(mono-default-config-dir,
(-)a/src/mod_mono.c (-8 / +33 lines)
Lines 388-394 enum { Link Here
388
apache_get_userid ()
388
apache_get_userid ()
389
{
389
{
390
#ifdef HAVE_UNIXD
390
#ifdef HAVE_UNIXD
391
	return unixd_config.user_id;
391
#if defined(APACHE24)
392
  return ap_unixd_config.user_id;
393
#else
394
  return unixd_config.user_id;
395
#endif
392
#else
396
#else
393
	return ap_user_id;
397
	return ap_user_id;
394
#endif
398
#endif
Lines 398-404 enum { Link Here
398
apache_get_groupid ()
402
apache_get_groupid ()
399
{
403
{
400
#ifdef HAVE_UNIXD
404
#ifdef HAVE_UNIXD
401
	return unixd_config.group_id;
405
#if defined(APACHE24)
406
	return ap_unixd_config.user_id;
407
#else
408
  return unixd_config.user_id;
409
#endif
402
#else
410
#else
403
	return ap_group_id;
411
	return ap_group_id;
404
#endif
412
#endif
Lines 408-414 enum { Link Here
408
apache_get_username ()
416
apache_get_username ()
409
{
417
{
410
#ifdef HAVE_UNIXD
418
#ifdef HAVE_UNIXD
419
#if defined(APACHE24)
420
	return ap_unixd_config.user_name;
421
#else 
411
	return unixd_config.user_name;
422
	return unixd_config.user_name;
423
#endif
412
#else
424
#else
413
	return ap_user_name;
425
	return ap_user_name;
414
#endif
426
#endif
Lines 487-493 enum { Link Here
487
499
488
#if defined (AP_NEED_SET_MUTEX_PERMS) && defined (HAVE_UNIXD)
500
#if defined (AP_NEED_SET_MUTEX_PERMS) && defined (HAVE_UNIXD)
489
		DEBUG_PRINT (1, "Setting mutex permissions for %s", xsp->dashboard_lock_file);
501
		DEBUG_PRINT (1, "Setting mutex permissions for %s", xsp->dashboard_lock_file);
490
		rv = unixd_set_global_mutex_perms (xsp->dashboard_mutex);
502
		rv = ap_unixd_set_global_mutex_perms (xsp->dashboard_mutex);
491
		if (rv != APR_SUCCESS) {
503
		if (rv != APR_SUCCESS) {
492
			ap_log_error (APLOG_MARK, APLOG_CRIT, STATCODE_AND_SERVER (rv),
504
			ap_log_error (APLOG_MARK, APLOG_CRIT, STATCODE_AND_SERVER (rv),
493
				      "Failed to set mutex permissions for %s",
505
				      "Failed to set mutex permissions for %s",
Lines 854-862 enum { Link Here
854
#if defined(APACHE22)
866
#if defined(APACHE22)
855
	return c->remote_addr->port;
867
	return c->remote_addr->port;
856
#else
868
#else
869
#if defined(APACHE20)
857
	apr_port_t port;
870
	apr_port_t port;
858
	apr_sockaddr_port_get (&port, c->remote_addr);
871
	apr_sockaddr_port_get (&port, c->remote_addr);
859
	return port;
872
	return port;
873
#else 
874
  return c->client_addr->port;
875
#endif
860
#endif
876
#endif
861
877
862
}
878
}
Lines 867-875 enum { Link Here
867
#if defined(APACHE22)
883
#if defined(APACHE22)
868
	return r->connection->local_addr->port;
884
	return r->connection->local_addr->port;
869
#else
885
#else
886
#if defined(APACHE20)
870
	apr_port_t port;
887
	apr_port_t port;
871
	apr_sockaddr_port_get (&port, r->connection->local_addr);
888
	apr_sockaddr_port_get (&port, r->connection->local_addr);
872
	return port;
889
	return port;
890
#else
891
	return r->connection->local_addr->port;
892
#endif
873
#endif
893
#endif
874
}
894
}
875
895
Lines 1992-2000 enum { Link Here
1992
	size += info.local_ip_len + sizeof (int32_t);
2012
	size += info.local_ip_len + sizeof (int32_t);
1993
2013
1994
	size += sizeof (int32_t);
2014
	size += sizeof (int32_t);
1995
2015
#if defined(APACHE24)
1996
	info.remote_ip_len = strlen (r->connection->remote_ip);
2016
  info.remote_ip_len = strlen (r->connection->client_ip);
1997
	size += info.remote_ip_len + sizeof (int32_t);
2017
#else 
2018
  info.remote_ip_len = strlen (r->connection->remote_ip);
2019
#endif
2020
  size += info.remote_ip_len + sizeof (int32_t);
1998
2021
1999
	size += sizeof (int32_t);
2022
	size += sizeof (int32_t);
2000
2023
Lines 2041-2047 enum { Link Here
2041
	i = LE_FROM_INT (i);
2064
	i = LE_FROM_INT (i);
2042
	memcpy (ptr, &i, sizeof (i));
2065
	memcpy (ptr, &i, sizeof (i));
2043
	ptr += sizeof (int32_t);
2066
	ptr += sizeof (int32_t);
2067
#if defined(APACHE24)
2068
	ptr += write_string_to_buffer (ptr, 0, r->connection->client_ip, info.remote_ip_len);
2069
#else 
2044
	ptr += write_string_to_buffer (ptr, 0, r->connection->remote_ip, info.remote_ip_len);
2070
	ptr += write_string_to_buffer (ptr, 0, r->connection->remote_ip, info.remote_ip_len);
2071
#endif
2045
	i = connection_get_remote_port (r->connection);
2072
	i = connection_get_remote_port (r->connection);
2046
	i = LE_FROM_INT (i);
2073
	i = LE_FROM_INT (i);
2047
	memcpy (ptr, &i, sizeof (i));
2074
	memcpy (ptr, &i, sizeof (i));
2048
- 
2049
version < 2.4
2075
version < 2.4
2050
--
2051
src/mod_mono.c |    6 +++++-
2076
src/mod_mono.c |    6 +++++-
2052
1 file changed, 5 insertions(+), 1 deletion(-)
2077
1 file changed, 5 insertions(+), 1 deletion(-)
(-)a/src/mod_mono.c (-3 / +5 lines)
Lines 499-506 enum { Link Here
499
499
500
#if defined (AP_NEED_SET_MUTEX_PERMS) && defined (HAVE_UNIXD)
500
#if defined (AP_NEED_SET_MUTEX_PERMS) && defined (HAVE_UNIXD)
501
		DEBUG_PRINT (1, "Setting mutex permissions for %s", xsp->dashboard_lock_file);
501
		DEBUG_PRINT (1, "Setting mutex permissions for %s", xsp->dashboard_lock_file);
502
#if defined(APACHE24)
502
		rv = ap_unixd_set_global_mutex_perms (xsp->dashboard_mutex);
503
		rv = ap_unixd_set_global_mutex_perms (xsp->dashboard_mutex);
503
		if (rv != APR_SUCCESS) {
504
#else 
505
		rv = unixd_set_global_mutex_perms (xsp->dashboard_mutex);
506
#endif
507
    if (rv != APR_SUCCESS) {
504
			ap_log_error (APLOG_MARK, APLOG_CRIT, STATCODE_AND_SERVER (rv),
508
			ap_log_error (APLOG_MARK, APLOG_CRIT, STATCODE_AND_SERVER (rv),
505
				      "Failed to set mutex permissions for %s",
509
				      "Failed to set mutex permissions for %s",
506
				      xsp->dashboard_lock_file);
510
				      xsp->dashboard_lock_file);
507
- 
508
2.0
511
2.0
509
--
510
src/mod_mono.c |   12 ++++++------
512
src/mod_mono.c |   12 ++++++------
511
1 file changed, 6 insertions(+), 6 deletions(-)
513
1 file changed, 6 insertions(+), 6 deletions(-)
(-)a/src/mod_mono.c (-7 / +6 lines)
Lines 870-881 enum { Link Here
870
#if defined(APACHE22)
870
#if defined(APACHE22)
871
	return c->remote_addr->port;
871
	return c->remote_addr->port;
872
#else
872
#else
873
#if defined(APACHE20)
873
#if defined(APACHE24)
874
  return c->client_addr->port;
875
#else 
874
	apr_port_t port;
876
	apr_port_t port;
875
	apr_sockaddr_port_get (&port, c->remote_addr);
877
	apr_sockaddr_port_get (&port, c->remote_addr);
876
	return port;
878
	return port;
877
#else 
878
  return c->client_addr->port;
879
#endif
879
#endif
880
#endif
880
#endif
881
881
Lines 887-898 enum { Link Here
887
#if defined(APACHE22)
887
#if defined(APACHE22)
888
	return r->connection->local_addr->port;
888
	return r->connection->local_addr->port;
889
#else
889
#else
890
#if defined(APACHE20)
890
#if defined(APACHE24)
891
	return r->connection->local_addr->port;
892
#else
891
	apr_port_t port;
893
	apr_port_t port;
892
	apr_sockaddr_port_get (&port, r->connection->local_addr);
894
	apr_sockaddr_port_get (&port, r->connection->local_addr);
893
	return port;
895
	return port;
894
#else
895
	return r->connection->local_addr->port;
896
#endif
896
#endif
897
#endif
897
#endif
898
}
898
}
899
- 

Return to bug 532842