replace: fix build issues on GNU Hurd (#7998)

Jelmer Vernooij jelmer at samba.org
Mon May 30 17:33:46 MDT 2011


On Mon, 2011-05-30 at 09:16 +1000, Andrew Bartlett wrote:
> On Mon, 2011-05-30 at 00:55 +0200, Björn Jacke wrote:
> > The branch, master has been updated
> >        via  a4d0362 replace: fix build issues on GNU Hurd (#7998)
> >       from  c7c0e4c s3: Remove unused cli_session_request
> > 
> > http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
> > 
> > 
> > - Log -----------------------------------------------------------------
> > commit a4d03620cb51638d1786c32b50953029752b7bc5
> > Author: Björn Jacke <bj at sernet.de>
> > Date:   Sun May 29 23:42:09 2011 +0200
> > 
> >     replace: fix build issues on GNU Hurd (#7998)
> >     
> >     Patch from Samuel Thibault <sthibault at debian.org> to fix Debian Bug 610678
> >     resp. BSO #7998. IOV_MAX and UIO_MAXIOV are not defined on GNU Hurd.
> >     
> >     Autobuild-User: Björn Jacke <bj at sernet.de>
> >     Autobuild-Date: Mon May 30 00:53:59 CEST 2011 on sn-devel-104
> > 
> > -----------------------------------------------------------------------
> > 
> > Summary of changes:
> >  lib/replace/system/network.h |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > 
> > Changeset truncated at 500 lines:
> > 
> > diff --git a/lib/replace/system/network.h b/lib/replace/system/network.h
> > index f7c1bcf..2ec9ebd 100644
> > --- a/lib/replace/system/network.h
> > +++ b/lib/replace/system/network.h
> > @@ -332,7 +332,7 @@ typedef unsigned short int sa_family_t;
> >       */
> >  #   define IOV_MAX 512
> >  #  else
> > -#   error IOV_MAX and UIO_MAXIOV undefined
> > +#   warning IOV_MAX and UIO_MAXIOV undefined
> >  #  endif
> >  # endif
> >  #endif
> 
> Is this really the right fix?  
> 
> Wouldn't this just shift the build failure to parts of Samba that rely
> on IOV_MAX?
I think if we want to support the hurd we should also stop defining
PATH_MAX in libreplace. The Hurd doesn't define PATH_MAX and allows
arbitrary length paths. This means the system can provide paths that are
longer than the fallback PATH_MAX defined by libreplace (1024), which
can result in buffer overruns, etc.

See also

http://www.gnu.org/software/hurd/community/gsoc/project_ideas/maxpath.html

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110531/756a97af/attachment.pgp>


More information about the samba-technical mailing list