You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Joe Orton <jo...@redhat.com> on 2016/09/02 12:06:54 UTC

Re: svn commit: r1748322 - in /httpd/httpd/trunk: CHANGES include/ap_mmn.h modules/dav/main/mod_dav.c modules/dav/main/mod_dav.h modules/dav/main/props.c modules/dav/main/providers.c

On Mon, Jun 13, 2016 at 10:33:36PM -0000, minfrin@apache.org wrote:
> Author: minfrin
> Date: Mon Jun 13 22:33:35 2016
> New Revision: 1748322
> 
> URL: http://svn.apache.org/viewvc?rev=1748322&view=rev
> Log:
> Allow other modules to become providers and add ACLs
> to the DAV response. Requires apr-util v1.6+.
...
> --- httpd/httpd/trunk/modules/dav/main/mod_dav.h (original)
> +++ httpd/httpd/trunk/modules/dav/main/mod_dav.h Mon Jun 13 22:33:35 2016
...
> @@ -418,6 +422,12 @@ typedef struct dav_resource {
>         long as the dav_resource structure. */
>      apr_pool_t *pool;
>  
> +#ifdef APR_XML_X2T_PARSED
> +    const dav_acl_provider *acls; /* acls used for this resource */
> +#endif
> +
> +    void *ctx;  /* additional parameter */
> +
>  } dav_resource;

This looks fine for trunk but I think extending dav_resource in 2.4.x 
will break binary backwards compatibility, since that structure is 
created by external repos hook providers (such as mod_dav_svn).  At 
least, mod_dav can't assume the allocated dav_resource is large enough 
to contain the .acls and .ctx fields for repos with external providers 
which may have been built against httpd <= 2.4.23.

(There might be some hack to put a note in the pool or something to 
signal the structure size, so this *could* work for mod_dav_fs or any 
external module which set that note?  Not sure.)

Regards, Joe


Re: svn commit: r1748322 - in /httpd/httpd/trunk: CHANGES include/ap_mmn.h modules/dav/main/mod_dav.c modules/dav/main/mod_dav.h modules/dav/main/props.c modules/dav/main/providers.c

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Sep 2, 2016 7:07 AM, "Joe Orton" <jo...@redhat.com> wrote:
>
> On Mon, Jun 13, 2016 at 10:33:36PM -0000, minfrin@apache.org wrote:
> > Author: minfrin
> > Date: Mon Jun 13 22:33:35 2016
> > New Revision: 1748322
> >
> > URL: http://svn.apache.org/viewvc?rev=1748322&view=rev
> > Log:
> > Allow other modules to become providers and add ACLs
> > to the DAV response. Requires apr-util v1.6+.
> ...
> > --- httpd/httpd/trunk/modules/dav/main/mod_dav.h (original)
> > +++ httpd/httpd/trunk/modules/dav/main/mod_dav.h Mon Jun 13 22:33:35
2016
> ...
> > @@ -418,6 +422,12 @@ typedef struct dav_resource {
> >         long as the dav_resource structure. */
> >      apr_pool_t *pool;
> >
> > +#ifdef APR_XML_X2T_PARSED
> > +    const dav_acl_provider *acls; /* acls used for this resource */
> > +#endif
> > +
> > +    void *ctx;  /* additional parameter */
> > +
> >  } dav_resource;
>
> This looks fine for trunk but I think extending dav_resource in 2.4.x
> will break binary backwards compatibility, since that structure is
> created by external repos hook providers (such as mod_dav_svn).  At
> least, mod_dav can't assume the allocated dav_resource is large enough
> to contain the .acls and .ctx fields for repos with external providers
> which may have been built against httpd <= 2.4.23.
>
> (There might be some hack to put a note in the pool or something to
> signal the structure size, so this *could* work for mod_dav_fs or any
> external module which set that note?  Not sure.)

This reinforces the need to add create accessor fn's for every httpd struct
on trunk.