|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Subject: Re: Porting pam to Solaris, HP-UX, others
From: David Lee (T.D.Lee
durham.ac.uk)Date: Wed Dec 13 2000 - 03:47:30 CST
- Next message: David Lee: "Re: Porting pam to Solaris, HP-UX, others"
- Previous message: Ben Collins: "Re: Porting pam to Solaris, HP-UX, others"
- In reply to: Andrew Morgan: "Re: Porting pam to Solaris, HP-UX, others"
- Next in thread: David Lee: "Re: Porting pam to Solaris, HP-UX, others"
- Reply: David Lee: "Re: Porting pam to Solaris, HP-UX, others"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, 11 Dec 2000, Andrew Morgan wrote:
> 1. file a bug report for each logical change request - include a patch
> with that bug report.
Here's a patch so that pam_access can compile on Solaris (and probably on
other systems too).
====================== snip =======================
*** modules/pam_access/pam_access.c.orig Sat Nov 25 01:48:05 2000
--- modules/pam_access/pam_access.c Wed Dec 13 09:35:00 2000
***************
*** 13,19 ****
#include <stdlib.h>
#include <unistd.h>
/* man page says above file includes this... */
! extern int gethostname(char *name, size_t len);
#include <stdarg.h>
#include <syslog.h>
--- 13,21 ----
#include <stdlib.h>
#include <unistd.h>
/* man page says above file includes this... */
! /* Shouldn't locally declare "gethostname()" because of possible type conflicts
! on various OSes. Better to live with the warning */
! /* extern int gethostname(char *name, size_t len); */
#include <stdarg.h>
#include <syslog.h>
====================== snip =======================
My guess is that the original "gethostname()" declaration had been to
suppress a warning (not error) message from a compiler on one particular
OS (would I be wrong in guessing Linux?) as a supposed cure.
But for systems which have the expected declaration in the expected place,
which might be of a slightly different form, this "cure" is worse than
the illness and causes compiler errors.
So my patch above simply, in effect, removes that declaration. I leave it
to you to decide whether to do it "as is" (which at least leaves for
future generations an indication of why the declaration was poor) or
simply to delete the original lines.
Hope that helps.
--: David Lee I.T. Service : : Systems Programmer Computer Centre : : University of Durham : : http://www.dur.ac.uk/t.d.lee/ South Road : : Durham : : Phone: +44 191 374 2882 U.K. :
_______________________________________________ Pam-list mailing list Pam-list
redhat.com https://listman.redhat.com/mailman/listinfo/pam-list
- Next message: David Lee: "Re: Porting pam to Solaris, HP-UX, others"
- Previous message: Ben Collins: "Re: Porting pam to Solaris, HP-UX, others"
- In reply to: Andrew Morgan: "Re: Porting pam to Solaris, HP-UX, others"
- Next in thread: David Lee: "Re: Porting pam to Solaris, HP-UX, others"
- Reply: David Lee: "Re: Porting pam to Solaris, HP-UX, others"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]