Skip to content

Commit

Permalink
Solaris10 support with PAM.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ollivier Robert committed Feb 12, 2007
1 parent 5dfec07 commit fc92c16
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 2 deletions.
3 changes: 3 additions & 0 deletions acconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H

/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H

/* Define if you have the <libgen.h> header file. */
#undef HAVE_LIBGEN_H

Expand Down
3 changes: 3 additions & 0 deletions auth_pam.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ auth_pam(struct passwd **ppw, const char *pass)
break;
}

/* XXX this does not work on solaris10 */
#ifndef solaris
if (rval == 0) {
e = pam_acct_mgmt(pamh, 0);
if (e == PAM_NEW_AUTHTOK_REQD) {
Expand All @@ -138,6 +140,7 @@ auth_pam(struct passwd **ppw, const char *pass)
rval = 1;
}
}
#endif /* solaris */

MESSAGE_1 ("auth_pam returns %d\n", rval);
return rval;
Expand Down
4 changes: 4 additions & 0 deletions conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
#include <syslog.h>
#endif /* HAVE_SYSLOG_H */

#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif /* HAVE_SYS_TIME_H */

#include <signal.h>
#include <stdio.h>
#include <time.h>
Expand Down
23 changes: 21 additions & 2 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dnl
dnl $Id: //depot/security/calife/main/configure.in#18 $
dnl

AC_INIT(calife.c)
AC_INIT(calife.c, [3.0], [[email protected]])
AC_CONFIG_HEADER(config.h)
AC_PREFIX_DEFAULT(/usr/local)

Expand Down Expand Up @@ -34,8 +34,11 @@ case "$host" in
CFLAGS="$CFLAGS -DAIX"
AC_CHECK_LIB(s, getuserattr)
;;
*-sun-solaris*)
*-sun-solaris2*)
os_solaris=yes
WITH_PAM=yes
with_pam=yes
AC_DEFINE(WITH_PAM)
;;
*-apple-darwin*)
os_darwin=yes
Expand Down Expand Up @@ -156,6 +159,22 @@ AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h libgen.h shadow.h stdarg.h stdlib.h)
AC_CHECK_HEADERS(string.h syslog.h unistd.h)
AC_CHECK_HEADERS(sys/param.h sys/resource.h sys/time.h)

AC_CHECK_HEADERS([utime.h], [], [],
[[#ifdef HAVE_UTIME_H
# include <utime.h>
#endif
]])

AC_CHECK_HEADERS([sys/resource.h], [], [],
[[#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
#endif
]])

AC_MSG_CHECKING(whether unistd.h needs _XOPEN_SOURCE for crypt(3))
AC_CACHE_VAL(su_cv_unistd_needs_xopen_source,
[AC_EGREP_CPP(yes, [#define crypt yes
Expand Down
4 changes: 4 additions & 0 deletions pam/solaris
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Insert these lines in your /etc/pam.conf
calife auth requisite pam_authtok_get.so.1
calife auth required pam_unix_cred.so.1
calife auth required pam_unix_auth.so.1

0 comments on commit fc92c16

Please sign in to comment.