[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Second shot at PAM



On Sun, Oct 29, 2000 at 01:13:20AM +0400, Stefanus Du Toit wrote:
> Hi Igor,
> 
> On Sun, Oct 29, 2000 at 12:38:32AM -0400, Igor Khavkine wrote:
> > Ok, I took took heed of the comments that I recieved and I updated
> > the patch. So here it is, less __GNU__ and more common sense. The patch
> > should work for Linux and Hurd so it can be incorporated into the debian 
> > package right away, whether it should be submitted to the upstream maintainers 
> > should most probably be at the discretion of the debian maintainer.
> 
> Shouldn't those #ifndef __GNU__ be replaced with #ifndef LIMIT where
> LIMIT is the limit definition in question?
> 
> And, at least in the case of MAXPATHLEN, sysconf() should probably be
> checked too.... this would make it clean for other (non-hurd) systems
> that don't have these limits. Marcus put up a good description of how
> to do this correctly on the debian-hurd porting page (mentioned in an
> earlier article).
> 

It depends on the scope of the patch. If it's only aimed at the debian
source package, then everything is fine because it in no way affects
builds on non-hurd systems since they'll probably be taken from the
original source release. If it's aimed to be submitted upstream, then 
you're right. However it's up to the upstream maintainers to decide
what level of POSIX compatibility they want to maintain. If they
are willing to get rid of MAXPATHLEN alltogether I'd be willing to
help since i've already done that for hurd. But again, that's up to
them.

Igor

> Also, if you have Advanced Programming In The UNIX Environment by
> W. Richard Stevens (a book I greatly recommend), read page 30 and
> onwards for a good discussion on limits on UNIX systems.
> 
> > Igor
> 
> > +#ifndef __GNU__	/* MAX* type macros don't make sense on Hurd */
> >  #ifndef MAXDNAME
> >  #define MAXDNAME  256
> >  #endif
> > +#endif
> 
> > +#ifndef __GNU__
> >      char buf[MAXHOSTNAMELEN + 128];                       /* host + login */
> > +#else
> > +		char *buf = 0, *old_buf = 0;
> > +		size_t buf_len = 0;
> > +#endif
> 
> -- 
> Stefanus Du Toit
> sjdutoit at uwaterloo dot ca                 http://3.141593.org/
> Please use GnuPG/PGP:                    http://3.141593.org/gpg/
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-hurd-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 



Reply to: