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

Re: Second shot at PAM

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).

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/

Reply to: