Subject: OPIE in VR17.. (Success again after 2 fixes..)

From: wuftpd <[email-masked]>
Date: Thu, 1 Apr 1999 18:59:18 -0500 (EST)

Hi there...

Sorry to rant again.. 
OPIE is still broken VR17 ...

This is using VR17 straight from the ftp://ftp.vr.net/pub/wu-ftpd/ 
This is being compiled on a RedHat 5.2.

I am using the following to build.

./build lnx NOPAM=1

Yes ,I dont want PAM . I want OPIE.

The build picks up the -DOPIE just fine after moving
opie.h  to  /usr/local/opie/opie.h
libopie.a  to  /usr/local/opie/libopie/libopie.a

Which is fine...Except in config.h you still have

#undef OPIE

Took me an hour to figure that one out.The one in config.h
cancels out the commandline -DOPIE ...
After removing the line (defining OPIE in there gives you warning
messages), everything looks good. But wait...

The ftpd cores on signal 11, due to same problem I reported a few
weeks ago. The fix for that is below as well.

Fixes are ....
1. Delete the #undef OPIE from config.h in the top level.
2. Make the area around (!opieverify) looks like this :

#else /* OPIE */
        if(!opieverify(&opiestate, passwd))
            {
            rval = 0;
            xpasswd = crypt(passwd, pw->pw_passwd);   
            }
        else     
               xpasswd = crypt(passwd, pw->pw_passwd);
#endif /* OPIE */

This works for me. I am sending this out 
just in case anyone else's uses OPIE with wuftpd.

Thanks,
David

---

From: Gregory A Lundberg <[email-masked]>
Date: Thu, 1 Apr 1999 20:25:56 -0500 (EST)

On Thu, 1 Apr 1999, wuftpd wrote:

> ./build lnx NOPAM=1
> 
> Yes,I dont want PAM. I want OPIE.

Yep.  If PAM is there, that's all you'll get.  NOPAM=1 is required to
suppress it.  Pragmatic choice: assume most Redhat people want a fast
build to be just (or very much) like Redhat would give them.

> The build picks up the -DOPIE just fine after moving opie.h to
> /usr/local/opie/opie.h libopie.a to /usr/local/opie/libopie/libopie.a

There's command-line ways to override these defaults.  I took the defaults
from a default 'make install' of OPIE.

> Which is fine...Except in config.h you still have

Oh DUH.

> 1. Delete the #undef OPIE from config.h in the top level.

Doing it right away.

> This works for me. I am sending this out just in case anyone else's
> uses OPIE with wuftpd.

The following looks to be cleaner.

#else /* OPIE */

The question is "Why signal 11?"  The answer is xpasswd is a char* which
will be referenced later.  Would it not be more correct to say "If OPIE's
opieverify() says NO then you're not getting in."? ...

#ifdef ULTRIX_AUTH
        if ((numfails = ultrix_check_pass(passwd, xpasswd)) >= 0) {
#else
        /* The strcmp does not catch null passwords! */
      if (pw !=NULL && *pw->pw_passwd != '\0'
#ifdef HAS_PW_EXPIRE
          && (pw->pw_expire && time(NULL) < pw->pw_expire)
#endif
ifndef OPIE
          && strcmp(xpasswd, pw->pw_passwd) == 0
#endif
#endif
      ) {
            rval = 0;

Someone with OPIE want to tell me which way is better?

-- 

Gregory A Lundberg              Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195

---

From: wuftpd <[email-masked]>
Date: Fri, 2 Apr 1999 07:05:47 -0500 (EST)

Hi there...
> build to be just (or very much) like Redhat would give them.
Im kinda finicky of some things. RedHat does a good job but I still
feel the need to modify things differently than RedHat would do them.

> from a default 'make install' of OPIE.
I will look into overriding those default next time I compile.

> Oh DUH.
Thats what I said... Oops!...

> Doing it right away.
No problemo...
 
>         xpasswd = crypt(passwd, pw->pw_passwd);
Yeah...That will work too.... ;)
> opieverify() says NO then you're not getting in."? ...
Im not sure of the signal 11, but somewhere down farther it was still
checking on the xpassword and it was core dumping. I didnt look
into it and left it when I figured out the workaround..
(which yours is cleaner..)

I dont know if anyone else is running OPIE ( probably not since
most people dont care). But thanks for looking into it.
I have VR17 running with OPIE and thats all that matters..

Thanks,
David