Article delegate-en/2668 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A2667@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Problem with PAM authentication
23 Jun 2004 22:02:31 GMT feedback@delegate.org (Yutaka Sato)
The DeleGate Project


Hi,

On 06/23/04(21:45) you Jehan-Guillaume de Rorthais <p4edabdyi-rra4sdt2c3zr.ml@ml.delegate.org> wrote
in <_A2667@delegate-en.ML_>
 |I finally success use the pam authentication ! Everything work fine :)
 |
 |I don't know if what I did is the best way to correct the problem, but it's
 |working by add the "-lpam" option in the dgpam compilation lines :
 |
 |###### Patch ########
 |
 |--- Makefile    Wed Jun 23 14:31:41 2004
 |+++ Makefile.old        Wed Jun 23 14:40:56 2004
...
 | dgpam: Makefile dgpam.o ../lib/library.a
 |-       $(CC) $(CFLAGS) -o $@ dgpam.o -lpam $(LIBS) $(NETLIB)
 |+       $(CC) $(CFLAGS) -o $@ dgpam.o $(LIBS) $(NETLIB)
...
 |In fact, I don't realy anderstand everything in this matter, so I let you
 |consider this information in its real value...

At last I understand why you got "PAM: cannot start".  It was just
because a PAM module is not built-into your DeleGate and dgpam ;)

So the question now is why it was not built-in.  The availability of -lpam
is automatically detected and set into "NETLIB" variable as NETLIB=-lpam,
thus you don't need explicitly specify so.  At the very beginning of make,
it will be detected as follows:

$ make
cc -DMKMKMK -DDEFCC=\"cc\" -I../include  -L../lib mkmkmk.c -o mkmkmk.exe

"./mkmkmk.exe" -mkmkmk "cc" -I../include  -L../lib maker/mkmake.c -o mkmake.exe

####### -makeat: /tmp/delegate/src
make[1]: Entering directory `/tmp/delegate/src'
echo "GOT by MKMAKE=/tmp/delegate/mkmake.exe" > CONF_IS_GOT
creating Makefile.tst ...
"/tmp/delegate/mkmake.exe" -mkmake "make" Makefile.tst "-O" "-s -Zbin-files -Zbsd-signals -L../lib" "ar ts" "-lnsl -lsocket WSOCK32.LIB ADVAPI32.LIB OLE32.LIB SHELL32.LIB UUID.LIB -lpam" NETLIB "" "-lssl -lcrypto -lkssl" SSLLIB
        mkmake:
        #### creating Makefile.tst
        cpyfile Makefile[1-0][0-804e369] > Makefile.tst
        #ifdef UNIX #######################################################
        #ifdef UNIX,OS2EMX ################################################
        [SET] MKMAKE=/tmp/delegate/mkmake.exe
        [SET] RANLIB=/usr/bin/ranlib
        - checking availability of -lnsl []
        cpyfile DELEGATE_CONF[1-0][0-0] > _make
        - checking availability of -lsocket [-lnsl]
        cpyfile DELEGATE_CONF[1-0][0-0] > _make
        *** -mkmake exit(-1)
        - checking availability of WSOCK32.LIB [-lnsl]
        cpyfile DELEGATE_CONF[1-0][0-0] > _make
        *** -mkmake exit(-1)
        - checking availability of ADVAPI32.LIB [-lnsl]
        cpyfile DELEGATE_CONF[1-0][0-0] > _make
        *** -mkmake exit(-1)
        - checking availability of OLE32.LIB [-lnsl]
        cpyfile DELEGATE_CONF[1-0][0-0] > _make
        *** -mkmake exit(-1)
        - checking availability of SHELL32.LIB [-lnsl]
        cpyfile DELEGATE_CONF[1-0][0-0] > _make
        *** -mkmake exit(-1)
        - checking availability of UUID.LIB [-lnsl]
        cpyfile DELEGATE_CONF[1-0][0-0] > _make
        *** -mkmake exit(-1)
        - checking availability of -lpam [-lnsl]
        cpyfile DELEGATE_CONF[1-0][0-0] > _make
        [SET] NETLIB=-lnsl -lpam
        ^^^^^^^^^^^^^^^^^^^^^^^^
If you don't get message like this, it is the problem.  There was a
bug in maker/mkmake.c to detect library availability before DeleGate/8.9.3.
But your version seem 8.9.3 in which the bug is fixed.
So there might be another bug in mkmake.c.  Could you test it with
the following patch?

============================================================================
*** ../dist/delegate8.9.3/maker/mkmake.c	Mon Mar 29 16:42:21 2004
--- mkmake.c	Thu Jun 24 06:55:01 2004
***************
*** 671,676 ****
--- 671,682 ----
  		rcode = msystem(1,res,sizeof(res),command);
  		if( STRSTR(res,"SUCCESS") == NULL )
  			rcode = -1;
+ {
+ fprintf(stderr,"-------------------------------- _make for %s\n",l1);
+ system("cat _make");
+ fprintf(stderr,"-------------------------------- code=%d\n%s\n",rcode,res);
+ fprintf(stderr,"-------------------------------- end of %s detection\n",l1);
+ }
  
  		if( unlink("_.out") != 0 )
  			if( rcode == 0 )
============================================================================

On my host, make generate output like follows with the patch.

...
        - checking availability of -lpam [-lnsl]
        cpyfile DELEGATE_CONF[1-0][0-0] > _make
-------------------------------- _make for -lpam
#### MANAGER value got interactively ####
MANAGER=ysato@delegate.org

_.out:; $(CC) -o _.out _.c -lnsl -lpam
        echo SUCCESS
-------------------------------- code=0
make[2]: Entering directory `/home/y.sato/dg/src'
cc -o _.out _.c -lnsl -lpam
echo SUCCESS
SUCCESS
make[2]: Leaving directory `/home/y.sato/dg/src'

-------------------------------- end of -lpam detection

Cheers,
Yutaka
--
  D G   Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/
 ( - )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V