I have made the attached change to look for pam/pam_appl.h as well as
security/pam_appl.h.  Fix will appear in 7.4.


---------------------------------------------------------------------------

Aaron Hillegass wrote:
> I decided to build 7.3.1 on MacOS 10.2.3 with PAM support.
> 
>       % ./configure --with-pam --with-openssl
>       ...
>       configure: error: header file <security/pam_appl.h> is required for PAM
> 
> There is, however, a /usr/include/pam/pam_appl.h.  So,  I did a 
> search/replace in configure and replaced it.
> 
>       % make
>       ...
>       gcc -traditional-cpp -g -O2 -Wall -Wmissing-prototypes 
> -Wmissing-declarations -I../../../src/include   -c -o auth.o auth.c
>       auth.c:45:31: security/pam_appl.h: No such file or directory
>       ...
>       make[3]: *** [auth.o] Error 1
> 
> So in auth.c,  I did the same find/replace:
> 
>       #ifdef USE_PAM
>       #include <pam/pam_appl.h>
> 
> I added a file to /etc/pam.d for postgresql:
> 
>       % cat /etc/pam.d/postgresql
>       auth       required       pam_nologin.so
>       auth       sufficient     pam_securityserver.so
>       auth       sufficient     pam_unix.so
>       auth       required       pam_deny.so
>       account    required       pam_permit.so
>       password   required       pam_deny.so
>       session    required       pam_uwtmp.so
> 
> And then it just worked:  my user login for the machine got me into 
> psql.
> 
> - Aaron
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: configure.in
===================================================================
RCS file: /cvsroot/pgsql-server/configure.in,v
retrieving revision 1.235
retrieving revision 1.236
diff -c -r1.235 -r1.236
*** configure.in        11 Feb 2003 21:05:35 -0000      1.235
--- configure.in        14 Feb 2003 14:05:00 -0000      1.236
***************
*** 724,730 ****
  fi
  
  if test "$with_pam" = yes ; then
!   AC_CHECK_HEADER(security/pam_appl.h, [], [AC_MSG_ERROR([header file 
<security/pam_appl.h> is required for PAM])])
  fi
  
  
--- 724,732 ----
  fi
  
  if test "$with_pam" = yes ; then
!   AC_CHECK_HEADERS(security/pam_appl.h, [],
!                    [AC_CHECK_HEADERS(pam/pam_appl.h, [],
!                                      [AC_MSG_ERROR([header file 
<security/pam_appl.h> or <pam/pam_appl.h> is required for PAM.])])])
  fi
  
  
Index: src/backend/libpq/auth.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/libpq/auth.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -c -r1.96 -r1.97
*** src/backend/libpq/auth.c    6 Jan 2003 09:58:23 -0000       1.96
--- src/backend/libpq/auth.c    14 Feb 2003 14:05:00 -0000      1.97
***************
*** 43,49 ****
--- 43,54 ----
  char     *pg_krb_server_keyfile;
  
  #ifdef USE_PAM
+ #ifdef HAVE_PAM_PAM_APPL_H
+ #include <pam/pam_appl.h>
+ #endif
+ #ifdef HAVE_SECURITY_PAM_APPL_H
  #include <security/pam_appl.h>
+ #endif
  
  #define PGSQL_PAM_SERVICE "postgresql"        /* Service name passed to PAM */
  
Index: src/include/pg_config.h.in
===================================================================
RCS file: /cvsroot/pgsql-server/src/include/pg_config.h.in,v
retrieving revision 1.38
retrieving revision 1.39
diff -c -r1.38 -r1.39
*** src/include/pg_config.h.in  25 Jan 2003 05:19:47 -0000      1.38
--- src/include/pg_config.h.in  14 Feb 2003 14:05:00 -0000      1.39
***************
*** 344,349 ****
--- 344,352 ----
  /* Set to 1 if you have <netinet/tcp.h> */
  #undef HAVE_NETINET_TCP_H
  
+ /* Set to 1 if you have <pam/pam_appl.h> */
+ #undef HAVE_PAM_PAM_APPL_H
+ 
  /* Set to 1 if you have <readline.h> */
  #undef HAVE_READLINE_H
  
***************
*** 352,357 ****
--- 355,363 ----
  
  /* Set to 1 if you have <readline/readline.h> */
  #undef HAVE_READLINE_READLINE_H
+ 
+ /* Set to 1 if you have <security/pam_appl.h> */
+ #undef HAVE_SECURITY_PAM_APPL_H
  
  /* Set to 1 if you have <sys/ipc.h> */
  #undef HAVE_SYS_IPC_H
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to