A search in altavista dumped the link below wich includes the attached
patch. http://acua.gist.net.au/archive/acua_list/msg00651.html

I have also attached my modified SPEC for ppp 2.3.5.

To rebuild the ppp RPM do:
#rpm -ivh /path/to/srpms/ppp-2.3.5-1.src.rpm
#cp ppp-2.3.5-auth.patch /usr/src/redhat/SOURCES
#cp -f ppp-2.3.5.spec /usr/src/redhat/SPECS
#rpm -ba /usr/src/redhat/SPECS/ppp-2.3.5.spec
Then upgrade you ppp RPM:
#rpm -Uvh /usr/src/redhat/RPMS/i386/ppp-2.3.5-2.i386.rpm

Hope it helps.

Patrick Vielle

On Wed, 20 Jan 1999, Roger Buck wrote:

> Jonathan Marsden wrote:
> 
> Apparently there are patched versions around - Anyone know where we can
> get a patched version of pppd to properly register pap authenticated
> users in utmp - and to work with Linuxconf/RH?
> 
> 
diff -u -r ppp-2.3.5/pppd/auth.c ppp-2.3.5.new/pppd/auth.c
--- ppp-2.3.5/pppd/auth.c       Wed Mar 25 22:46:00 1998
+++ ppp-2.3.5.new/pppd/auth.c   Mon Jan 11 16:47:51 1999
@@ -776,6 +776,7 @@
     char **msg;
     int *msglen;
 {
+    char *tty;
 
 #ifdef USE_PAM
 
@@ -829,7 +830,6 @@
 #else /* #ifdef USE_PAM */
 
     struct passwd *pw;
-    char *tty;
 
 #ifdef HAS_SHADOW
     struct spwd *spwd;
@@ -867,20 +867,6 @@
        || strcmp(crypt(passwd, pw->pw_passwd), pw->pw_passwd) != 0)
        return (UPAP_AUTHNAK);
 
-    /* These functions are not enabled for PAM. The reason for this is that */
-    /* there is not necessarily a "passwd" entry for this user. That is     */
-    /* real purpose of 'PAM' -- to virtualize the account data from the     */
-    /* application. If you want to do the same thing, write the entry in    */
-    /* the 'session' hook.                                                  */
-
-    /*
-     * Write a wtmp entry for this user.
-     */
-
-    tty = devnam;
-    if (strncmp(tty, "/dev/", 5) == 0)
-       tty += 5;
-    logwtmp(tty, user, remote_name);           /* Add wtmp login entry */
 
 #if defined(_PATH_LASTLOG)
     {
@@ -899,6 +885,19 @@
 #endif
 
 #endif /* #ifdef USE_PAM */
+   /*
+    * Write a wtmp entry for this user.
+    * Function moved by Stevenson! <[EMAIL PROTECTED]>
+    * to allow logging users into wtmp even if they've been
+    * authenticated using PAM.  This is due to the fact that
+    * he's currently unable to make use of the PAM's session
+    * hook to obtain the same result.  Apologizes... for now.
+    */
+
+    tty = devnam;
+    if (strncmp(tty, "/dev/", 5) == 0)
+       tty += 5;
+    logwtmp(tty, user, remote_name);           /* Add wtmp login entry */
 
     syslog(LOG_INFO, "user %s logged in", user);
     logged_in = TRUE;
@@ -912,6 +911,7 @@
 static void
 plogout()
 {
+    char *tty;
 #ifdef USE_PAM
     struct pam_conv pam_conversation;
     pam_handle_t *pamh;
@@ -924,21 +924,18 @@
     memset (&pam_conversation, '\0', sizeof (struct pam_conv));
     pam_conversation.conv = &pam_conv;
 
-    pam_error = pam_start ("ppp", user, &pam_conversation, &pamh);
+    pam_error = pam_start ("ppp", peer_authname, &pam_conversation, &pamh);
     if (pam_error == PAM_SUCCESS) {
         (void) pam_set_item (pamh, PAM_TTY, devnam);
         (void) pam_close_session (pamh, PAM_SILENT);
        (void) pam_end (pamh, PAM_SUCCESS);
     }
 
-#else
-    char *tty;
-
+#endif
     tty = devnam;
     if (strncmp(tty, "/dev/", 5) == 0)
        tty += 5;
     logwtmp(tty, "", "");              /* Wipe out utmp logout entry */
-#endif
 
     logged_in = FALSE;
 }
Summary: ppp daemon package for linux 1.3.xx and greater
Name: ppp
%define version 2.3.5
Version: %{version}
Release: 2
Copyright: distributable
Group: Networking/Daemons
Source0: ftp://cs.anu.edu.au/pub/software/ppp/ppp-%{version}.tar.gz
Source1: ppp-%{version}-pamd.conf
Patch0: ppp-%{version}-make.patch
Patch1: ppp-%{version}-sample.patch
Patch2: ppp-%{version}-glibc.patch
Patch3: ppp-%{version}-auth.patch
Buildroot: /var/tmp/pppd
Requires: glibc >= 2.0.6
Summary(de): ppp-D�monpaket f�r Linux 1.3.xx und h�her
Summary(fr): Paquetage du d�mon ppp pour Linux 1.3.xx et sup�rieur
Summary(tr): PPP sunucu s�reci

%description
This is the daemon and documentation for PPP support.  It requires a kernel
greater than 2.0 which is built with PPP support. The default Red Hat
kernels include PPP support as a module.

%description -l de
Dies ist der D�mon und die Dokumentation f�r PPP-Support. Erfordert
einen Kernel h�her als 2.0, der mit PPP-Support gebaut ist. Die Standard-
Red-Hat-Kernel schlie�en PPP-Support als Modul ein.

%description -l fr
Ceci est le d�mon et la documentation pour le support PPP. Cela r�clame
un noyau sup�rieur au 2.0 et construit avec le support PPP. Le noyau par
d�faut de Red Hat contient le support PPP sous forme de module.

%description -l tr
Bu paket PPP deste�i i�in belgeler ve sunucu s�recini i�erir. �ekirdek
s�r�m�nun 2.0'dan daha y�ksek olmas�n� gerektirir. �ntan�ml� Red Hat
�ekirde�i PPP deste�ini bir mod�l olarak i�erir.

%prep
%setup  -q
%patch0 -p1 -b .make
%patch1 -p1 -b .sample
%patch2 -p1 -b .glibc
%patch3 -p1 -b .auth
find . -type f -name "*.sample" | xargs rm -f 

%build
./configure
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"

%install
rm -rf $RPM_BUILD_ROOT
make install TOPDIR=$RPM_BUILD_ROOT

## it shouldn't be SUID root be default
#chmod 755 $RPM_BUILD_ROOT/usr/sbin/pppd

strip $RPM_BUILD_ROOT/usr/sbin/chat $RPM_BUILD_ROOT/usr/sbin/pppstats \
        $RPM_BUILD_ROOT/usr/sbin/pppd 
chmod 644 scripts/*
mkdir -p $RPM_BUILD_ROOT/etc/pam.d
install -m 644 $RPM_SOURCE_DIR/ppp-%{version}-pamd.conf \
        $RPM_BUILD_ROOT/etc/pam.d/ppp

%clean
rm -rf $RPM_BUILD_ROOT

%files
%attr(0755,root,root)   /usr/sbin/chat
%attr(0755,root,root)   /usr/sbin/pppd
%attr(0755,root,daemon) /usr/sbin/pppstats
%attr(0644,root,root)   /usr/man/man8/chat.8
%attr(0644,root,root)   /usr/man/man8/pppd.8
%attr(0644,root,daemon) /usr/man/man8/pppstats.8
%attr(0755,root,root)   %dir /etc/ppp
%attr(0600,root,daemon) %config /etc/ppp/chap-secrets
%attr(0644,root,daemon) %config /etc/ppp/options
%attr(0600,root,daemon) %config /etc/ppp/pap-secrets
%attr(0644,root,root)   %config /etc/pam.d/ppp
%attr(-,-,-)            %doc README README.linux scripts sample

%changelog
* Mon Jan 11 1999 Patrick Vielle <[EMAIL PROTECTED]>
- Added patch (auth.c) to turn on wtmp/utmp/syslog logging.

* Fri Jun  5 1998 Jeff Johnson <[EMAIL PROTECTED]>
- updated to 2.3.5.

* Tue May 19 1998 Prospector System <[EMAIL PROTECTED]>
- translations modified for de

* Fri May  8 1998 Jakub Jelinek <[EMAIL PROTECTED]>
- make it run with kernels 2.1.100 and above.

* Fri Apr 24 1998 Prospector System <[EMAIL PROTECTED]>
- translations modified for de, fr, tr

* Wed Mar 18 1998 Cristian Gafton <[EMAIL PROTECTED]>
- requires glibc 2.0.6 or later

* Wed Mar 18 1998 Michael K. Johnson <[EMAIL PROTECTED]>
- updated PAM patch to not turn off wtmp/utmp/syslog logging.

* Wed Jan  7 1998 Cristian Gafton <[EMAIL PROTECTED]>
- added the /etc/pam.d config file
- updated PAM patch to include session support

* Tue Jan  6 1998 Cristian Gafton <[EMAIL PROTECTED]>
- updated to ppp-2.3.3, build against glibc-2.0.6 - previous patches not
  required any more.
- added buildroot
- fixed the PAM support, which was really, completely broken and against any
  standards (session support is still not here... :-( )
- we build against running kernel and pray that it will work
- added a samples patch; updated glibc patch

* Thu Dec 18 1997 Erik Troan <[EMAIL PROTECTED]>
- added a patch to use our own route.h, rather then glibc's (which has 
  alignment problems on Alpha's) -- I only applied this patch on the Alpha,
  though it should be safe everywhere

* Fri Oct 10 1997 Erik Troan <[EMAIL PROTECTED]>
- turned off the execute bit for scripts in /usr/doc

* Fri Jul 18 1997 Erik Troan <[EMAIL PROTECTED]>
- built against glibc

* Tue Mar 25 1997 Erik Troan <[EMAIL PROTECTED]>
- Integrated new patch from David Mosberger
- Improved description

Reply via email to