Ignore:
Timestamp:
20/04/06 16:22:50 (14 years ago)
Author:
spascoe
Message:

Server and Daemon will now compile and run on glue with the
trivial private authentication working.

Private authentication simply sends a version string from client to server. The
Version string is logged to syslog.

WARNING: The client is given the full privileges as the server daemon, so don't
run bbftpd as root.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/trunk/src/bbftp-server-3.2.0/bbftpd/bbftpd_private_user.c

    r802 r806  
    3333#include <daemon_proto.h> 
    3434#include <structures.h> 
     35#include <syslog.h> 
    3536 
    36 #include <bbftp_private_user.h> 
     37#include <bbftpd_private_user.h> 
    3738 
    3839extern char currentusername[MAXLEN] ; 
     
    9293int bbftpd_private_auth(char *logmessage)  
    9394{     
    94   char msg[NDG_MESSAGE_LEN]; 
     95  char msg[NDG_MESSAGE_LEN], logmsg[NDG_MESSAGE_LEN+64]; 
    9596  /* Send version verification message.  */ 
    96   if (bbftp_private_recv(msg, NDG_MESSAGE_LEN, logmessage) == -1) { 
     97  if (bbftpd_private_recv(msg, NDG_MESSAGE_LEN, logmessage) == -1) { 
    9798    return -1; 
    9899  } 
    99    
     100  else { 
     101    sprintf(logmsg, "Received auth message: %s", msg); 
     102    syslog(LOG_INFO, logmsg); 
     103  } 
     104 
    100105  return 0 ;  
    101106} 
Note: See TracChangeset for help on using the changeset viewer.