[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: pam_radius + saslauthd + cyrus imapd



Hi Joe, 
I skipped the problem. There is a problem with feof
and fclose functions I think. I put a log tag right
after the while loop before line++; and saw that it
never reaches the second loop. and the last error I
see is socket23. I assumed that I have just one line
in /etc/raddb/server and changed the while this way: 
int switch=1;

  while (switch) {
         fgets (buffer, sizeof(buffer), fserver) ;
   _pam_log(LOG_ERR, "Unable to open socketW1: %s\n",
strerror(errno));
    line++;
   _pam_log(LOG_ERR, "Unable to open socketW2: %s\n",
strerror(errno));

and after socket23 I changed the switch variable to 0;

this way I could come out of that loop but again there
was no success. At last I commented the 
fclose(fserver); function and this way I could get
authenticated. Then I moved this function at the end
of the program and it could work in that place. It
seems there is some problem with end of file or
closing file in redhat3. I don't know if this is a OS
bug or a discompatibilty in your program and RH3. Can
you give any help? With what I did I can not set two
radius servers in my file. 

Thanks in advance
Fatemeh Taj 


--- Fatemeh Taj <fatemeh53 yahoo com> wrote:
> There is no blank line after my settings :( 
> 
> --- Joe Lewis <joe joe-lewis com> wrote:
> > After the :
> > 
> >    pam_radius_auth: Unable to open socket5:
> Success
> >    Jun  7 10:22:34 test saslauthd[16217]:
> > pam_radius_auth: Not handling
> >    blank line: # server[:port] shared_secret     
> > timeout (s)
> > 
> > That looks fine.  It means that the first line (a
> > comment) is being 
> > seen.  After that, you should get a line :
> > 
> >    Unable to open socket8: Success
> > 
> > in the logs, as well.  What I am looking for is to
> > check after the
> > 
> >    Unable to open socket8: Success
> >    Unable to open socket10: Success
> > 
> > lines in the output, and THEN you might have :
> > 
> >    test saslauthd[16217]: pam_radius_auth: Not
> > handling
> >    blank line:
> > 
> > lines.  You should have a LOT of these lines if we
> > are in an endless 
> > loop and the EOF on the fserver file handle are
> > failing to return truth. 
> >     It may be OS specific.  Perhaps add one more
> > line :
> > 
> >    _pam_log(LOG_ERR, "feof(fserver): %d\n",
> > feof(fserver));
> > 
> > Just inside the while loop.  Each pass should
> print
> > the feof output (a 
> > couple should return 0, and then you should get
> > non-zero results).  If 
> > these numbers match, the while loop should fail,
> and
> > you will get a
> > 
> >    Unable to open socketAAA: Success
> > 
> > logged.  However, I don't think that is happening.
> 
> > Perhaps a blank line 
> > at the end of the /etc/raddb/servers may change
> how
> > things work.  Try it 
> > and tell me what happens on that.
> > 
> > Joe
> > 
> > Fatemeh Taj wrote:
> > 
> > > First I should say thanks for your continous
> help.
> > I
> > > did what you said. You are right it has problem
> > with
> > > blanks. Here is the result: 
> > > 
> > > There are same results when /etc/raddb/server is
> > > configured normally and also when I add some
> blank
> > > lines after IP address.
> > > 
> > > Jun  7 10:22:34 test saslauthd[16217]:
> > rel_accept_lock
> > > : released accept lock
> > > Jun  7 10:22:34 test saslauthd[16218]:
> > get_accept_lock
> > > : acquired accept lock
> > > Jun  7 10:22:34 test saslauthd[16217]:
> > > pam_radius_auth: Got user name fatemeh
> > > Jun  7 10:22:34 test saslauthd[16217]:
> > > pam_radius_auth: Unable to open socket5: 
> > > Success 
> > > Jun  7 10:22:34 test saslauthd[16217]:
> > > pam_radius_auth: Not handling blank line:
> > > # server[:port] shared_secret      timeout (s)  
> > > 
> > > Now how I should solve this problem? By the way,
> > why
> > > it does not go furthur to socket10 or socket23
> > tags ?
> > > 
> > > Thanks
> > > Fatemeh Taj
> > > 
> > > 
> > > 
> > > 	
> > > 		
> > > __________________________________
> > > Do you Yahoo!?
> > > Friends.  Fun.  Try the all-new Yahoo!
> Messenger.
> > > http://messenger.yahoo.com/ 
> > > 
> > > 
> > > _______________________________________________
> > > Pam-list mailing list
> > > Pam-list redhat com
> > > https://www.redhat.com/mailman/listinfo/pam-list
> > 
> > 
> > _______________________________________________
> > Pam-list mailing list
> > Pam-list redhat com
> > https://www.redhat.com/mailman/listinfo/pam-list
> 
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Friends.  Fun.  Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/ 
> 
> 
> _______________________________________________
> Pam-list mailing list
> Pam-list redhat com
> https://www.redhat.com/mailman/listinfo/pam-list



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]