Hello community, here is the log from the commit of package apache2-mod_mono checked in at Thu Dec 7 19:14:27 CET 2006. -------- --- apache2-mod_mono/apache2-mod_mono.changes 2006-11-13 12:49:22.000000000 +0100 +++ /mounts/work_src_done/STABLE/apache2-mod_mono/apache2-mod_mono.changes 2006-12-02 21:56:03.000000000 +0100 @@ -1,0 +2,6 @@ +Sat Dec 2 21:54:31 CET 2006 - wberrier@suse.de + +- Update to 1.2.1 (Fate #301111) + -handle the new configurable umask directive + +------------------------------------------------------------------- Old: ---- mod_mono-1.1.18.tar.gz New: ---- mod_mono-1.2.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ apache2-mod_mono.spec ++++++ --- /var/tmp/diff_new_pack.bSS0MH/_old 2006-12-07 19:13:55.000000000 +0100 +++ /var/tmp/diff_new_pack.bSS0MH/_new 2006-12-07 19:13:55.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package apache2-mod_mono (Version 1.1.18) +# spec file for package apache2-mod_mono (Version 1.2.1) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -24,13 +24,13 @@ %define apache2_sysconfdir %(%{apxs} -q SYSCONFDIR) %define apache2_libexecdir %(%{apxs} -q LIBEXECDIR) %define apache_mmn %(MMN=$(%{apxs} -q LIBEXECDIR)_MMN; test -x $MMN && $MMN) -License: GNU General Public License (GPL) - all versions +License: The Apache Software License Group: Productivity/Networking/Web/Servers Autoreqprov: on Provides: mod_mono = %{version}-%{release} Requires: gnome-filesystem xsp Requires: apache2 %{apache_mmn} -Version: 1.1.18 +Version: 1.2.1 Release: 1 Summary: Run ASP.NET Pages on Unix with Apache and Mono Source: %{modname}-%{version}.tar.gz @@ -40,6 +40,8 @@ mod_mono is a module that interfaces Apache with Mono and allows running ASP.NET pages on Unix and Unix-like systems. +To load the module into Apache, run the command "a2enmod mono" as root. + %prep @@ -69,6 +71,9 @@ %{prefix}/share/man/man8/mod_mono.8.gz %changelog -n apache2-mod_mono +* Sat Dec 02 2006 - wberrier@suse.de +- Update to 1.2.1 (Fate #301111) + -handle the new configurable umask directive * Mon Nov 13 2006 - poeml@suse.de - add Provides: mod_mono = %%{version}-%%{release} * Mon Nov 13 2006 - poeml@suse.de ++++++ mod_mono-1.1.18.tar.gz -> mod_mono-1.2.1.tar.gz ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mod_mono-1.1.18/ChangeLog new/mod_mono-1.2.1/ChangeLog --- old/mod_mono-1.1.18/ChangeLog 2006-10-12 22:11:16.000000000 +0200 +++ new/mod_mono-1.2.1/ChangeLog 2006-11-21 23:24:50.000000000 +0100 @@ -1,7 +1,29 @@ -2006-10-05 Joshua Tauberer <jit@occams.info> +2006-11-21 Wade Berrier <wberrier@novell.com> - * src/mod_mono.c: Prefix every alias with the name of the vhost. - XXGLOBALs between vhosts were getting mixed up. + * configure.in: bump version -> 1.2.1 + +2006-11-21 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * src/mod_mono.c: + * ChangeLog: revert r66281 and r66836. It should make mod_mono work + again for most of the people, while it will break for certain virtual + host configurations. + +2006-11-02 Wade Berrier <wberrier@novell.com> + + * configure.in: bump version -> 1.2 + +2006-10-26 Marek Habersack <grendello@gmail.com> + + * man/mod_mono.8.in: describe the new MonoUnixUmask directive. + * src/mod_mono.c: add code to handle the new configurable umask + directive. + +2006-10-19 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * src/mod_mono.c: avoid using too much memory for long responses. + * src/mod_mono.h: defines for 1.3 to work with apr_pool. Fixes bug + #79701. Thanks to Cyrille Colin. 2006-08-31 Gonzalo Paniagua Javier <gonzalo@ximian.com> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mod_mono-1.1.18/configure new/mod_mono-1.2.1/configure --- old/mod_mono-1.1.18/configure 2006-10-12 22:11:28.000000000 +0200 +++ new/mod_mono-1.2.1/configure 2006-11-21 23:25:02.000000000 +0100 @@ -1817,7 +1817,7 @@ # Define the identity of the package. PACKAGE=mod_mono - VERSION=1.1.18 + VERSION=1.2.1 cat >>confdefs.h <<_ACEOF diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mod_mono-1.1.18/configure.in new/mod_mono-1.2.1/configure.in --- old/mod_mono-1.1.18/configure.in 2006-10-12 22:11:16.000000000 +0200 +++ new/mod_mono-1.2.1/configure.in 2006-11-21 23:24:50.000000000 +0100 @@ -1,5 +1,5 @@ AC_INIT(src/mod_mono.c) -AM_INIT_AUTOMAKE(mod_mono, 1.1.18) +AM_INIT_AUTOMAKE(mod_mono, 1.2.1) AM_CONFIG_HEADER(include/mod_mono_config.h:config.in) AC_PROG_CC diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mod_mono-1.1.18/man/mod_mono.8.in new/mod_mono-1.2.1/man/mod_mono.8.in --- old/mod_mono-1.1.18/man/mod_mono.8.in 2006-08-30 17:05:42.000000000 +0200 +++ new/mod_mono-1.2.1/man/mod_mono.8.in 2006-11-02 21:40:34.000000000 +0100 @@ -27,6 +27,12 @@ mod_mono for more examples. .TP +.I "MonoUnixUmask" +It accepts an octal number as a parameter. The number must be a valid unix +file creation mask value (see umask(2)). The mask will be applied whenever +a directory or file is created from within an ASP.NET application. +Default value: "0077". +.TP .I "MonoUnixSocket" It accepts a file name as argument. That file will be a named pipe used to send/receive data from/to mod_mono to/from mod-mono-server. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mod_mono-1.1.18/src/mod_mono.c new/mod_mono-1.2.1/src/mod_mono.c --- old/mod_mono-1.1.18/src/mod_mono.c 2006-10-12 22:11:16.000000000 +0200 +++ new/mod_mono-1.2.1/src/mod_mono.c 2006-11-21 23:24:50.000000000 +0100 @@ -53,9 +53,9 @@ typedef struct xsp_data { char is_default; - char *vhost; char *alias; char *filename; + char *umask_value; char *run_xsp; char *executable_path; char *path; @@ -73,6 +73,7 @@ char *env_vars; char status; /* One of the FORK_* in the enum above. * Don't care if run_xsp is "false" */ + char is_virtual; /* is the server virtual? */ } xsp_data; typedef struct { @@ -87,35 +88,16 @@ char *client_block_buffer; } request_data; -static char * get_default_socket_name (apr_pool_t *pool, xsp_data *xsp, const char *base); - - /* */ static int -search_for_alias (const char *alias, module_cfg *config, server_rec *server) +search_for_alias (const char *alias, module_cfg *config) { /* 'alias' may be NULL to search for the default XSP */ int i; xsp_data *xsp; - DEBUG_PRINT (2, "searching for alias '%s' in server '%s'", - alias == NULL ? "<default alias>" : alias, - !server->is_virtual || server->server_hostname == NULL ? "<main server>" : server->server_hostname); - for (i = 0; i < config->nservers; i++) { xsp = &config->servers [i]; - - DEBUG_PRINT (2, " found alias '%s' in server '%s'", - xsp->alias == NULL ? "<default alias>" : xsp->alias, - xsp->vhost == NULL ? "<main server>" : xsp->vhost); - - if (!server->is_virtual || server->server_hostname == NULL) { - if (xsp->vhost != NULL) continue; - } else { - if (xsp->vhost == NULL) continue; - if (strcmp(server->server_hostname, xsp->vhost)) continue; - } - if ((alias == NULL || !strcmp (alias, "default")) && xsp->is_default) return i; @@ -134,7 +116,7 @@ sconfig = ap_get_module_config (cmd->server->module_config, &mono_module); config->alias = (char *) alias; - if (search_for_alias (alias, sconfig, cmd->server) == -1) { + if (search_for_alias (alias, sconfig) == -1) { char *err = apr_pstrcat (cmd->pool, "Server alias '", alias, ", not found.", NULL); return err; } @@ -168,25 +150,22 @@ } static int -add_xsp_server (apr_pool_t *pool, const char *alias, module_cfg *config, int is_default, server_rec *servercfg) +add_xsp_server (apr_pool_t *pool, const char *alias, module_cfg *config, int is_default, int is_virtual) { xsp_data *server; xsp_data *servers; int nservers; int i; - i = search_for_alias (alias, config, servercfg); + i = search_for_alias (alias, config); if (i >= 0) return i; server = apr_pcalloc (pool, sizeof (xsp_data)); server->is_default = is_default; - if (!servercfg->is_virtual || servercfg->server_hostname == NULL) - server->vhost = NULL; - else - server->vhost = apr_pstrdup(pool, servercfg->server_hostname); server->alias = apr_pstrdup (pool, alias); server->filename = NULL; + server->umask_value = NULL; server->run_xsp = "True"; /* (Obsolete) server->executable_path = EXECUTABLE_PATH; */ server->path = NULL; @@ -205,6 +184,7 @@ server->debug = NULL; server->env_vars = NULL; server->status = FORK_NONE; + server->is_virtual = is_virtual; nservers = config->nservers + 1; servers = config->servers; @@ -236,7 +216,7 @@ config = ap_get_module_config (cmd->server->module_config, &mono_module); if (second == NULL) { if (config->auto_app) { - idx = search_for_alias ("XXGLOBAL", config, cmd->server); + idx = search_for_alias ("XXGLOBAL", config); ptr = (char *) &config->servers [idx]; ptr += offset; value = first; @@ -255,6 +235,8 @@ return NULL; } alias = "default"; + if (cmd->server->is_virtual) + alias = cmd->server->server_hostname; value = first; is_default = 1; } else { @@ -269,9 +251,9 @@ if (!config->auto_app_set) config->auto_app = FALSE; - idx = search_for_alias (alias, config, cmd->server); + idx = search_for_alias (alias, config); if (idx == -1) - idx = add_xsp_server (cmd->pool, alias, config, is_default, cmd->server); + idx = add_xsp_server (cmd->pool, alias, config, is_default, cmd->server->is_virtual); ptr = (char *) &config->servers [idx]; ptr += offset; @@ -330,6 +312,12 @@ return cfg; } +static char * +get_default_global_socket_name (apr_pool_t *pool, const char *base) +{ + return apr_pstrcat (pool, base, "_", "global", NULL); +} + static void * create_mono_server_config (apr_pool_t *p, server_rec *s) { @@ -338,8 +326,8 @@ server = apr_pcalloc (p, sizeof (module_cfg)); server->auto_app = TRUE; server->auto_app_set = FALSE; - add_xsp_server (p, "XXGLOBAL", server, FALSE, s); - server->servers [0].filename = get_default_socket_name (p, &server->servers[0], SOCKET_FILE); + add_xsp_server (p, "XXGLOBAL", server, FALSE, FALSE); + server->servers [0].filename = get_default_global_socket_name (p, SOCKET_FILE); return server; } @@ -637,6 +625,7 @@ int32_t i; uint32_t actual_size; int status = 0; + apr_pool_t *temp_pool; if (command < 0 || command >= LAST_COMMAND) { ap_log_error (APLOG_MARK, APLOG_ERR, STATUS_AND_SERVER, @@ -649,11 +638,14 @@ *result = OK; switch (command) { case SEND_FROM_MEMORY: - if (read_data_string (r->pool, sock, &str, &size) == NULL) { + apr_pool_create (&temp_pool, r->pool); + if (read_data_string (temp_pool, sock, &str, &size) == NULL) { status = -1; + apr_pool_destroy (temp_pool); break; } request_send_response_from_memory (r, str, size); + apr_pool_destroy (temp_pool); break; case GET_SERVER_VARIABLES: ap_add_cgi_vars (r); @@ -852,13 +844,9 @@ #endif static char * -get_default_socket_name (apr_pool_t *pool, xsp_data *xsp, const char *base) +get_default_socket_name (apr_pool_t *pool, const char *alias, const char *base) { - return apr_pstrcat (pool, base, "_", - xsp->vhost == NULL ? "" : xsp->vhost, - "_", - xsp->alias == NULL ? "default" : xsp->alias, - NULL); + return apr_pstrcat (pool, base, "_", alias == NULL ? "default" : alias, NULL); } static apr_status_t @@ -879,7 +867,7 @@ if (conf->filename != NULL) fn = conf->filename; else - fn = get_default_socket_name (pool, conf, SOCKET_FILE); + fn = get_default_socket_name (pool, conf->alias, SOCKET_FILE); DEBUG_PRINT (1, "Socket file name %s", fn); memcpy (unix_address.sun_path, fn, strlen (fn) + 1); @@ -1113,7 +1101,18 @@ setsid (); chdir ("/"); - umask (0077); + if (config->umask_value == NULL) + umask (0077); + else { + unsigned int uval; + DEBUG_PRINT (1, "unparsed umask value: %s", config->umask_value); + if (sscanf(config->umask_value, "%o", &uval) != 1) { + DEBUG_PRINT (1, "umask conversion to octal failed"); + uval = 0077; + } + DEBUG_PRINT (1, "setting umask to %o", uval); + umask (uval); + } DEBUG_PRINT (1, "child started"); #ifdef DEBUG @@ -1167,7 +1166,7 @@ fn = config->filename; if (fn == NULL) - fn = get_default_socket_name (pool, config, SOCKET_FILE); + fn = get_default_socket_name (pool, config->alias, SOCKET_FILE); argv [argi++] = "--filename"; argv [argi++] = fn; @@ -1414,7 +1413,6 @@ module_cfg *config; per_dir_config *dir_config = NULL; int idx; - char *alias; config = ap_get_module_config (r->server->module_config, &mono_module); DEBUG_PRINT (2, "config = %d", (int) config); @@ -1423,19 +1421,16 @@ DEBUG_PRINT (2, "dir_config = %d", (int) dir_config); if (dir_config != NULL && dir_config->alias != NULL) - alias = dir_config->alias; + idx = search_for_alias (dir_config->alias, config); else - alias = NULL; + idx = search_for_alias (NULL, config); - idx = search_for_alias (alias, config, r->server); + DEBUG_PRINT (2, "idx = %d", idx); - if (idx >= 0) { - DEBUG_PRINT (2, "idx = %d", idx); - } else { - DEBUG_PRINT (2, "Alias \"%s\" not found. Checking for auto-applications.", - alias == NULL ? "<default server>" : alias); + if (idx < 0) { + DEBUG_PRINT (2, "Alias not found. Checking for auto-applications."); if (config->auto_app) - idx = search_for_alias ("XXGLOBAL", config, r->server); + idx = search_for_alias ("XXGLOBAL", config); if (idx == -1) { DEBUG_PRINT (2, "Global config not found. Finishing request."); @@ -1653,7 +1648,7 @@ char *fn = xsp->filename; if (fn == NULL) - fn = get_default_socket_name (pconf, xsp, SOCKET_FILE); + fn = get_default_socket_name (pconf, xsp->alias, SOCKET_FILE); remove (fn); /* Don't bother checking error */ } @@ -1812,6 +1807,10 @@ #endif static const command_rec mono_cmds [] = { +MAKE_CMD12 (MonoUnixUmask, umask_value, + "Value of the file mode creation mask (see umask(2))" + "Default: 0077" + ), MAKE_CMD12 (MonoUnixSocket, filename, "Named pipe file name. Mutually exclusive with MonoListenPort. " "Default: /tmp/mod_mono_server" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mod_mono-1.1.18/src/mod_mono.h new/mod_mono-1.2.1/src/mod_mono.h --- old/mod_mono-1.1.18/src/mod_mono.h 2006-08-30 17:05:42.000000000 +0200 +++ new/mod_mono-1.2.1/src/mod_mono.h 2006-11-02 21:40:34.000000000 +0100 @@ -71,6 +71,8 @@ #define apr_psprintf ap_psprintf #define apr_uri_t uri_components #define apr_pool_t ap_pool +#define apr_pool_create(a,b) *(a) = ap_make_sub_pool (b) +#define apr_pool_destroy(a) ap_destroy_pool (a) #define apr_pcalloc_t ap_pcalloc_t #define apr_pcalloc ap_pcalloc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@suse.de