to flaw in initial integration. Enabled HAS_SHADOW for Solaris, which
always has shadow password files. Fixed all of pppd to compile with gcc
-Wall on Solaris. (Still need fixes for kernel modules; blocking
Makedefs.gcc update.) Tested with and without PAM, with gcc and Sun's
cc.
#
# Makefile for pppd under Solaris 2.
#
# Makefile for pppd under Solaris 2.
-# $Id: Makefile.sol2,v 1.29 2007/12/01 20:10:51 carlsonj Exp $
+# $Id: Makefile.sol2,v 1.30 2008/01/30 14:26:52 carlsonj Exp $
#
include ../Makedefs.com
#
include ../Makedefs.com
tty.o ccp.o ecp.o auth.o options.o demand.o utils.o sys-solaris.o \
chap-md5.o session.o
tty.o ccp.o ecp.o auth.o options.o demand.o utils.o sys-solaris.o \
chap-md5.o session.o
+# Solaris uses shadow passwords
+CFLAGS += -DHAS_SHADOW
+
-# uncomment the following to enable plugins
+# Comment the following out to disable plugins
#
CFLAGS += -DPLUGIN
LIBS += -ldl
#
CFLAGS += -DPLUGIN
LIBS += -ldl
#else /* #ifdef USE_PAM */
/*
#else /* #ifdef USE_PAM */
/*
- * Use the non-PAM methods directly
+ * Use the non-PAM methods directly. 'pw' will remain NULL if the user
+ * has not been authenticated using local UNIX system services.
if ((SESS_AUTH & flags)) {
pw = getpwnam(user);
if ((SESS_AUTH & flags)) {
pw = getpwnam(user);
logged_in = 1;
#if defined(_PATH_LASTLOG) && !defined(USE_PAM)
logged_in = 1;
#if defined(_PATH_LASTLOG) && !defined(USE_PAM)
+ /*
+ * Enter the user in lastlog only if he has been authenticated using
+ * local system services. If he has not, then we don't know what his
+ * UID might be, and lastlog is indexed by UID.
+ */
+ if (pw != NULL) {
struct lastlog ll;
int fd;
struct lastlog ll;
int fd;
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#define RCSID "$Id: sys-solaris.c,v 1.15 2007/06/19 02:08:35 carlsonj Exp $"
+#define RCSID "$Id: sys-solaris.c,v 1.16 2008/01/30 14:26:53 carlsonj Exp $"
#include <limits.h>
#include <stdio.h>
#include <limits.h>
#include <stdio.h>
char *name;
struct sockaddr *hwaddr;
{
char *name;
struct sockaddr *hwaddr;
{
int unit, iffd, adrlen;
unsigned char *adrp;
char ifdev[24];
int unit, iffd, adrlen;
unsigned char *adrp;
char ifdev[24];
{
int mfd, sfd;
char *pty_name;
{
int mfd, sfd;
char *pty_name;
mfd = open("/dev/ptmx", O_RDWR);
if (mfd < 0) {
mfd = open("/dev/ptmx", O_RDWR);
if (mfd < 0) {