Changeset 806 for TI05-delivery/trunk


Ignore:
Timestamp:
20/04/06 16:22:50 (13 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.

Location:
TI05-delivery/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/trunk/src/Makefile

    r776 r806  
    33 
    44PREFIX=$(HOME)/opt/bbftp 
    5 #!NOTE: Add --enable-authentication=private to activate private security hooks 
    6 CONFIG_OPTS=--prefix=$(PREFIX) --without-gzip --without-rfio 
     5CONFIG_OPTS=--prefix=$(PREFIX) --without-gzip --without-rfio --enable-authentication=private 
    76 
    87BBFTPD=bbftp-server-3.2.0/bbftpd 
  • TI05-delivery/trunk/src/bbftp-client-3.2.0/includes/bbftp_private_user.h

    r802 r806  
    4444 
    4545#define NDG_FTP_VERSION "v0.0.1" 
    46 #define NDG_FTP_PROTOCOL ("NDG-bbFTP" NDG_BBFTP_VERSION) 
     46#define NDG_FTP_PROTOCOL ("NDG-bbFTP" NDG_FTP_VERSION) 
    4747 
    4848#define NDG_MESSAGE_LEN 256 
  • 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.