diff --git a/MakeFileGeneric b/MakeFileGeneric index 19044e1..6fc3640 100644 --- a/MakeFileGeneric +++ b/MakeFileGeneric @@ -11,6 +11,7 @@ OPTIMIZATION=-O3 HEADERS=-I LIBPATH=./build/modules/ BUILDFILES=start uFTP end +LIBS=-lpthread -lssl -lcrypto #DEFINITIONS= @@ -29,14 +30,17 @@ start: end: @echo Build process end -uFTP: uFTP.c fileManagement.o configRead.o logFunctions.o ftpCommandElaborate.o ftpData.o ftpServer.o daemon.o signals.o connection.o - @$(CC) $(DEFINITIONS) uFTP.c $(LIBPATH)dynamicVectors.o $(LIBPATH)fileManagement.o $(LIBPATH)configRead.o $(LIBPATH)logFunctions.o $(LIBPATH)ftpCommandElaborate.o $(LIBPATH)ftpData.o $(LIBPATH)ftpServer.o $(LIBPATH)daemon.o $(LIBPATH)signals.o $(LIBPATH)connection.o -o $(OUTPATH)uFTP -lpthread +uFTP: uFTP.c fileManagement.o configRead.o logFunctions.o ftpCommandElaborate.o ftpData.o ftpServer.o daemon.o signals.o connection.o openSsl.o + @$(CC) $(DEFINITIONS) uFTP.c $(LIBPATH)dynamicVectors.o $(LIBPATH)fileManagement.o $(LIBPATH)configRead.o $(LIBPATH)logFunctions.o $(LIBPATH)ftpCommandElaborate.o $(LIBPATH)ftpData.o $(LIBPATH)ftpServer.o $(LIBPATH)daemon.o $(LIBPATH)signals.o $(LIBPATH)connection.o $(LIBPATH)openSsl.o -o $(OUTPATH)uFTP $(LIBS) daemon.o: @$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)daemon.c -o $(LIBPATH)daemon.o dynamicVectors.o: @$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)dynamicVectors.c -o $(LIBPATH)dynamicVectors.o + +openSsl.o: + @$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)openSsl.c -o $(LIBPATH)openSsl.o configRead.o: dynamicVectors.o fileManagement.o @$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)configRead.c -o $(LIBPATH)configRead.o @@ -59,7 +63,7 @@ ftpCommandElaborate.o: ftpData.o: @$(CC) $(CFLAGS) ftpData.c -o $(LIBPATH)ftpData.o -ftpServer.o: +ftpServer.o: openSsl.o @$(CC) $(CFLAGS) ftpServer.c -o $(LIBPATH)ftpServer.o clean: diff --git a/build/Debug/GNU-Linux/ftpCommandElaborate.o b/build/Debug/GNU-Linux/ftpCommandElaborate.o deleted file mode 100644 index bd9195e..0000000 Binary files a/build/Debug/GNU-Linux/ftpCommandElaborate.o and /dev/null differ diff --git a/build/Debug/GNU-Linux/ftpCommandElaborate.o.d b/build/Debug/GNU-Linux/ftpCommandElaborate.o.d deleted file mode 100644 index 3f031c8..0000000 --- a/build/Debug/GNU-Linux/ftpCommandElaborate.o.d +++ /dev/null @@ -1,29 +0,0 @@ -build/Debug/GNU-Linux/ftpCommandElaborate.o: ftpCommandElaborate.c \ - library/dynamicVectors.h library/fileManagement.h \ - library/dynamicVectors.h ftpData.h library/dynamicVectors.h ftpServer.h \ - library/logFunctions.h library/fileManagement.h library/configRead.h \ - library/dynamicVectors.h library/../ftpData.h ftpCommandsElaborate.h - -library/dynamicVectors.h: - -library/fileManagement.h: - -library/dynamicVectors.h: - -ftpData.h: - -library/dynamicVectors.h: - -ftpServer.h: - -library/logFunctions.h: - -library/fileManagement.h: - -library/configRead.h: - -library/dynamicVectors.h: - -library/../ftpData.h: - -ftpCommandsElaborate.h: diff --git a/build/Debug/GNU-Linux/ftpData.o b/build/Debug/GNU-Linux/ftpData.o deleted file mode 100644 index 373b8d9..0000000 Binary files a/build/Debug/GNU-Linux/ftpData.o and /dev/null differ diff --git a/build/Debug/GNU-Linux/ftpData.o.d b/build/Debug/GNU-Linux/ftpData.o.d deleted file mode 100644 index 32965f1..0000000 --- a/build/Debug/GNU-Linux/ftpData.o.d +++ /dev/null @@ -1,27 +0,0 @@ -build/Debug/GNU-Linux/ftpData.o: ftpData.c library/dynamicVectors.h \ - library/fileManagement.h library/dynamicVectors.h ftpServer.h \ - ftpCommandsElaborate.h ftpData.h library/dynamicVectors.h \ - library/configRead.h library/dynamicVectors.h library/../ftpData.h \ - library/fileManagement.h - -library/dynamicVectors.h: - -library/fileManagement.h: - -library/dynamicVectors.h: - -ftpServer.h: - -ftpCommandsElaborate.h: - -ftpData.h: - -library/dynamicVectors.h: - -library/configRead.h: - -library/dynamicVectors.h: - -library/../ftpData.h: - -library/fileManagement.h: diff --git a/build/Debug/GNU-Linux/ftpServer.o b/build/Debug/GNU-Linux/ftpServer.o deleted file mode 100644 index ec6abe0..0000000 Binary files a/build/Debug/GNU-Linux/ftpServer.o and /dev/null differ diff --git a/build/Debug/GNU-Linux/ftpServer.o.d b/build/Debug/GNU-Linux/ftpServer.o.d deleted file mode 100644 index 0b9ef77..0000000 --- a/build/Debug/GNU-Linux/ftpServer.o.d +++ /dev/null @@ -1,33 +0,0 @@ -build/Debug/GNU-Linux/ftpServer.o: ftpServer.c library/dynamicVectors.h \ - library/fileManagement.h library/dynamicVectors.h ftpServer.h ftpData.h \ - library/dynamicVectors.h ftpCommandsElaborate.h library/fileManagement.h \ - library/logFunctions.h library/configRead.h library/dynamicVectors.h \ - library/../ftpData.h library/signals.h library/connection.h - -library/dynamicVectors.h: - -library/fileManagement.h: - -library/dynamicVectors.h: - -ftpServer.h: - -ftpData.h: - -library/dynamicVectors.h: - -ftpCommandsElaborate.h: - -library/fileManagement.h: - -library/logFunctions.h: - -library/configRead.h: - -library/dynamicVectors.h: - -library/../ftpData.h: - -library/signals.h: - -library/connection.h: diff --git a/build/Debug/GNU-Linux/library/configRead.o b/build/Debug/GNU-Linux/library/configRead.o deleted file mode 100644 index 2c3a8fe..0000000 Binary files a/build/Debug/GNU-Linux/library/configRead.o and /dev/null differ diff --git a/build/Debug/GNU-Linux/library/configRead.o.d b/build/Debug/GNU-Linux/library/configRead.o.d deleted file mode 100644 index 18058fc..0000000 --- a/build/Debug/GNU-Linux/library/configRead.o.d +++ /dev/null @@ -1,23 +0,0 @@ -build/Debug/GNU-Linux/library/configRead.o: library/configRead.c \ - library/dynamicVectors.h library/fileManagement.h \ - library/dynamicVectors.h library/configRead.h library/dynamicVectors.h \ - library/../ftpData.h library/../library/dynamicVectors.h \ - library/fileManagement.h library/daemon.h - -library/dynamicVectors.h: - -library/fileManagement.h: - -library/dynamicVectors.h: - -library/configRead.h: - -library/dynamicVectors.h: - -library/../ftpData.h: - -library/../library/dynamicVectors.h: - -library/fileManagement.h: - -library/daemon.h: diff --git a/build/Debug/GNU-Linux/library/connection.o b/build/Debug/GNU-Linux/library/connection.o deleted file mode 100644 index 7d8dc8c..0000000 Binary files a/build/Debug/GNU-Linux/library/connection.o and /dev/null differ diff --git a/build/Debug/GNU-Linux/library/connection.o.d b/build/Debug/GNU-Linux/library/connection.o.d deleted file mode 100644 index 9cfe267..0000000 --- a/build/Debug/GNU-Linux/library/connection.o.d +++ /dev/null @@ -1,16 +0,0 @@ -build/Debug/GNU-Linux/library/connection.o: library/connection.c \ - library/dynamicVectors.h library/fileManagement.h \ - library/dynamicVectors.h library/../ftpData.h \ - library/../library/dynamicVectors.h library/connection.h - -library/dynamicVectors.h: - -library/fileManagement.h: - -library/dynamicVectors.h: - -library/../ftpData.h: - -library/../library/dynamicVectors.h: - -library/connection.h: diff --git a/build/Debug/GNU-Linux/library/daemon.o b/build/Debug/GNU-Linux/library/daemon.o deleted file mode 100644 index c233c0f..0000000 Binary files a/build/Debug/GNU-Linux/library/daemon.o and /dev/null differ diff --git a/build/Debug/GNU-Linux/library/daemon.o.d b/build/Debug/GNU-Linux/library/daemon.o.d deleted file mode 100644 index 87c2092..0000000 --- a/build/Debug/GNU-Linux/library/daemon.o.d +++ /dev/null @@ -1,11 +0,0 @@ -build/Debug/GNU-Linux/library/daemon.o: library/daemon.c \ - library/dynamicVectors.h library/fileManagement.h \ - library/dynamicVectors.h library/fileManagement.h - -library/dynamicVectors.h: - -library/fileManagement.h: - -library/dynamicVectors.h: - -library/fileManagement.h: diff --git a/build/Debug/GNU-Linux/library/dynamicVectors.o b/build/Debug/GNU-Linux/library/dynamicVectors.o deleted file mode 100644 index b1fe279..0000000 Binary files a/build/Debug/GNU-Linux/library/dynamicVectors.o and /dev/null differ diff --git a/build/Debug/GNU-Linux/library/dynamicVectors.o.d b/build/Debug/GNU-Linux/library/dynamicVectors.o.d deleted file mode 100644 index a02322d..0000000 --- a/build/Debug/GNU-Linux/library/dynamicVectors.o.d +++ /dev/null @@ -1,11 +0,0 @@ -build/Debug/GNU-Linux/library/dynamicVectors.o: library/dynamicVectors.c \ - library/dynamicVectors.h library/fileManagement.h \ - library/dynamicVectors.h library/dynamicVectors.h - -library/dynamicVectors.h: - -library/fileManagement.h: - -library/dynamicVectors.h: - -library/dynamicVectors.h: diff --git a/build/Debug/GNU-Linux/library/fileManagement.o b/build/Debug/GNU-Linux/library/fileManagement.o deleted file mode 100644 index 5ecefd3..0000000 Binary files a/build/Debug/GNU-Linux/library/fileManagement.o and /dev/null differ diff --git a/build/Debug/GNU-Linux/library/fileManagement.o.d b/build/Debug/GNU-Linux/library/fileManagement.o.d deleted file mode 100644 index 78e7134..0000000 --- a/build/Debug/GNU-Linux/library/fileManagement.o.d +++ /dev/null @@ -1,14 +0,0 @@ -build/Debug/GNU-Linux/library/fileManagement.o: library/fileManagement.c \ - library/dynamicVectors.h library/fileManagement.h \ - library/dynamicVectors.h library/fileManagement.h \ - library/dynamicVectors.h - -library/dynamicVectors.h: - -library/fileManagement.h: - -library/dynamicVectors.h: - -library/fileManagement.h: - -library/dynamicVectors.h: diff --git a/build/Debug/GNU-Linux/library/logFunctions.o b/build/Debug/GNU-Linux/library/logFunctions.o deleted file mode 100644 index 6b5f61c..0000000 Binary files a/build/Debug/GNU-Linux/library/logFunctions.o and /dev/null differ diff --git a/build/Debug/GNU-Linux/library/logFunctions.o.d b/build/Debug/GNU-Linux/library/logFunctions.o.d deleted file mode 100644 index e52d825..0000000 --- a/build/Debug/GNU-Linux/library/logFunctions.o.d +++ /dev/null @@ -1,11 +0,0 @@ -build/Debug/GNU-Linux/library/logFunctions.o: library/logFunctions.c \ - library/dynamicVectors.h library/fileManagement.h \ - library/dynamicVectors.h library/logFunctions.h - -library/dynamicVectors.h: - -library/fileManagement.h: - -library/dynamicVectors.h: - -library/logFunctions.h: diff --git a/build/Debug/GNU-Linux/library/signals.o b/build/Debug/GNU-Linux/library/signals.o deleted file mode 100644 index 78c4af6..0000000 Binary files a/build/Debug/GNU-Linux/library/signals.o and /dev/null differ diff --git a/build/Debug/GNU-Linux/library/signals.o.d b/build/Debug/GNU-Linux/library/signals.o.d deleted file mode 100644 index ff9cc4d..0000000 --- a/build/Debug/GNU-Linux/library/signals.o.d +++ /dev/null @@ -1,11 +0,0 @@ -build/Debug/GNU-Linux/library/signals.o: library/signals.c \ - library/dynamicVectors.h library/fileManagement.h \ - library/dynamicVectors.h library/../ftpServer.h - -library/dynamicVectors.h: - -library/fileManagement.h: - -library/dynamicVectors.h: - -library/../ftpServer.h: diff --git a/build/Debug/GNU-Linux/uFTP.o b/build/Debug/GNU-Linux/uFTP.o deleted file mode 100644 index 63c9847..0000000 Binary files a/build/Debug/GNU-Linux/uFTP.o and /dev/null differ diff --git a/build/Debug/GNU-Linux/uFTP.o.d b/build/Debug/GNU-Linux/uFTP.o.d deleted file mode 100644 index 2e331b6..0000000 --- a/build/Debug/GNU-Linux/uFTP.o.d +++ /dev/null @@ -1,10 +0,0 @@ -build/Debug/GNU-Linux/uFTP.o: uFTP.c library/dynamicVectors.h \ - library/fileManagement.h library/dynamicVectors.h ftpServer.h - -library/dynamicVectors.h: - -library/fileManagement.h: - -library/dynamicVectors.h: - -ftpServer.h: diff --git a/build/modules/configRead.o b/build/modules/configRead.o index ce2895a..9ced74b 100644 Binary files a/build/modules/configRead.o and b/build/modules/configRead.o differ diff --git a/build/modules/connection.o b/build/modules/connection.o index 0ecef0a..b08f37c 100644 Binary files a/build/modules/connection.o and b/build/modules/connection.o differ diff --git a/build/modules/ftpCommandElaborate.o b/build/modules/ftpCommandElaborate.o index 65341d1..c843584 100644 Binary files a/build/modules/ftpCommandElaborate.o and b/build/modules/ftpCommandElaborate.o differ diff --git a/build/modules/ftpData.o b/build/modules/ftpData.o index 7191afa..afc9ecb 100644 Binary files a/build/modules/ftpData.o and b/build/modules/ftpData.o differ diff --git a/build/modules/ftpServer.o b/build/modules/ftpServer.o index fd05f0f..227a415 100644 Binary files a/build/modules/ftpServer.o and b/build/modules/ftpServer.o differ diff --git a/build/uFTP b/build/uFTP index afdda73..70fcd67 100755 Binary files a/build/uFTP and b/build/uFTP differ diff --git a/ftpCommandElaborate.c b/ftpCommandElaborate.c index bf0c4dc..db33332 100644 --- a/ftpCommandElaborate.c +++ b/ftpCommandElaborate.c @@ -40,6 +40,7 @@ #include "library/logFunctions.h" #include "library/fileManagement.h" #include "library/configRead.h" +#include "library/openSsl.h" #include "ftpCommandsElaborate.h" @@ -214,13 +215,29 @@ int parseCommandPass(ftpDataType * data, int socketId) } } -int parseCommandAuth(clientDataType *theClientData) +int parseCommandAuth(clientDataType *theClientData, SSL_CTX *ctx) { int returnCode; - returnCode = dprintf(theClientData->socketDescriptor, "502 Security extensions not implemented.\r\n"); + //returnCode = dprintf(theClientData->socketDescriptor, "502 Security extensions not implemented.\r\n"); + returnCode = dprintf(theClientData->socketDescriptor, "234 AUTH TLS OK..\r\n"); if (returnCode <= 0) return FTP_COMMAND_PROCESSED_WRITE_ERROR; + + theClientData->tlsIsEnabled = 1; + SSL *ssl; + ssl = SSL_new(ctx); + SSL_set_fd(ssl, theClientData->socketDescriptor); + + if (SSL_accept(ssl) <= 0) { + printf("\nSSL ERRORS"); + ERR_print_errors_fp(stderr); + } + else { + printf("\nSSL ACCEPTED"); + SSL_write(ssl, "ciao prova\r\n", strlen("ciao prova\r\n")); + } + //client -> AUTH TLS //server -> 234 AUTH TLS OK. @@ -272,7 +289,7 @@ int parseCommandFeat(clientDataType *theClientData) 211 End. */ int returnCode; - returnCode = dprintf(theClientData->socketDescriptor, "211-Extensions supported:\r\n PASV\r\nUTF8\r\n211 End.\r\n"); + returnCode = dprintf(theClientData->socketDescriptor, "211-Extensions supported:\r\n PASV\r\nUTF8\r\nAUTH TLS\r\n211 End.\r\n"); if (returnCode <= 0) return FTP_COMMAND_PROCESSED_WRITE_ERROR; diff --git a/ftpCommandsElaborate.h b/ftpCommandsElaborate.h index 9a82fe5..83926ef 100644 --- a/ftpCommandsElaborate.h +++ b/ftpCommandsElaborate.h @@ -37,7 +37,8 @@ #define FTP_CHMODE_COMMAND_RETURN_CODE_NO_FILE 2 #define FTP_CHMODE_COMMAND_RETURN_CODE_NO_PERMISSIONS 3 #define FTP_CHMODE_COMMAND_RETURN_NAME_TOO_LONG 4 - +#include +#include #include "ftpData.h" #ifdef __cplusplus @@ -49,7 +50,7 @@ extern "C" { int parseCommandUser(clientDataType *theClientData); int parseCommandSite(clientDataType *theClientData); int parseCommandPass(ftpDataType * data, int socketId); -int parseCommandAuth(clientDataType *theClientData); +int parseCommandAuth(clientDataType *theClientData, SSL_CTX *); int parseCommandPwd(clientDataType *theClientData); int parseCommandSyst(clientDataType *theClientData); int parseCommandFeat(clientDataType *theClientData); diff --git a/ftpData.h b/ftpData.h index 88f0a45..1f2e34a 100644 --- a/ftpData.h +++ b/ftpData.h @@ -27,6 +27,8 @@ #define FTPDATA_H #include +#include +#include #include "library/dynamicVectors.h" @@ -50,7 +52,6 @@ struct parameter char* value; } typedef parameter_DataType; - struct ownerShip { int ownerShipSet; @@ -116,6 +117,8 @@ struct ipData struct workerData { + + int threadIsAlive; int connectionPort; int passiveModeOn; @@ -147,6 +150,9 @@ struct workerData struct clientData { + SSL *ssl; + int tlsIsEnabled; + int clientProgressiveNumber; int socketDescriptor; int socketIsConnected; @@ -202,6 +208,7 @@ struct ConnectionParameters struct ftpData { + int connectedClients; char welcomeMessage[1024]; ConnectionData_DataType connectionData; diff --git a/ftpServer.c b/ftpServer.c index 1c45ba0..1a316ae 100644 --- a/ftpServer.c +++ b/ftpServer.c @@ -47,10 +47,11 @@ #include "library/logFunctions.h" #include "library/configRead.h" #include "library/signals.h" +#include "library/openSsl.h" #include "library/connection.h" ftpDataType ftpData; - +SSL_CTX *ctx; static int processCommand(int processingElement); void workerCleanup(void *socketId) @@ -325,9 +326,11 @@ void *connectionWorkerHandle(void * socketId) void runFtpServer(void) { - printf("\nHello uFTP server v%s starting..\n", UFTP_SERVER_VERSION); + + + /* Needed for Select*/ static int processingSock = 0, returnCode = 0; @@ -352,6 +355,10 @@ void runFtpServer(void) /* the maximum socket fd is now the main socket descriptor */ ftpData.connectionData.maxSocketFD = ftpData.connectionData.theMainSocket+1; + + init_openssl(); + ctx = create_context(); + configure_context(ctx); //Endless loop ftp process while (1) @@ -359,9 +366,7 @@ void runFtpServer(void) /* waits for socket activity, if no activity then checks for client socket timeouts */ if (selectWait(&ftpData) == 0) { - checkClientConnectionTimeout(&ftpData); - flushLoginWrongTriesData(&ftpData); } @@ -518,7 +523,38 @@ static int processCommand(int processingElement) else if(compareStringCaseInsensitive(ftpData.clients[processingElement].theCommandReceived, "AUTH", strlen("AUTH")) == 1) { printf("\nAUTH COMMAND RECEIVED"); - toReturn = parseCommandAuth(&ftpData.clients[processingElement]); + + int returnCode; + //returnCode = dprintf(theClientData->socketDescriptor, "502 Security extensions not implemented.\r\n"); + returnCode = dprintf(ftpData.clients[processingElement].socketDescriptor, "234 AUTH TLS OK..\r\n"); + + + ftpData.clients[processingElement].tlsIsEnabled = 1; + SSL *ssl; + ssl = SSL_new(ctx); + SSL_set_fd(ssl, ftpData.clients[processingElement].socketDescriptor); + + if (SSL_accept(ssl) <= 0) { + printf("\nSSL ERRORS"); + ERR_print_errors_fp(stderr); + } + else { + printf("\nSSL ACCEPTED"); + SSL_write(ssl, "ciao prova\r\n", strlen("ciao prova\r\n")); + } + + char buffer[100]; + int readenb = 0; + while(1) + { + readenb = SSL_read(ssl, buffer, 100); + if (readenb > 0) + printf("\nSslReaden: %s", buffer); + sleep(1); + + } + + // toReturn = parseCommandAuth(&ftpData.clients[processingElement], ctx); } else if(compareStringCaseInsensitive(ftpData.clients[processingElement].theCommandReceived, "PWD", strlen("PWD")) == 1) { diff --git a/nbproject/Makefile-Debug.mk b/nbproject/Makefile-Debug.mk index e44ad8f..b6f2d0e 100644 --- a/nbproject/Makefile-Debug.mk +++ b/nbproject/Makefile-Debug.mk @@ -44,6 +44,7 @@ OBJECTFILES= \ ${OBJECTDIR}/library/dynamicVectors.o \ ${OBJECTDIR}/library/fileManagement.o \ ${OBJECTDIR}/library/logFunctions.o \ + ${OBJECTDIR}/library/openSsl.o \ ${OBJECTDIR}/library/signals.o \ ${OBJECTDIR}/uFTP.o @@ -117,6 +118,11 @@ ${OBJECTDIR}/library/logFunctions.o: library/logFunctions.c ${RM} "$@.d" $(COMPILE.c) -g -D_LARGEFILE64_SOURCE -Ilibrary -include library/dynamicVectors.h -include library/fileManagement.h -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/library/logFunctions.o library/logFunctions.c +${OBJECTDIR}/library/openSsl.o: library/openSsl.c + ${MKDIR} -p ${OBJECTDIR}/library + ${RM} "$@.d" + $(COMPILE.c) -g -D_LARGEFILE64_SOURCE -Ilibrary -include library/dynamicVectors.h -include library/fileManagement.h -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/library/openSsl.o library/openSsl.c + ${OBJECTDIR}/library/signals.o: library/signals.c ${MKDIR} -p ${OBJECTDIR}/library ${RM} "$@.d" diff --git a/nbproject/Makefile-Release.mk b/nbproject/Makefile-Release.mk index db54051..e660c80 100644 --- a/nbproject/Makefile-Release.mk +++ b/nbproject/Makefile-Release.mk @@ -44,6 +44,7 @@ OBJECTFILES= \ ${OBJECTDIR}/library/dynamicVectors.o \ ${OBJECTDIR}/library/fileManagement.o \ ${OBJECTDIR}/library/logFunctions.o \ + ${OBJECTDIR}/library/openSsl.o \ ${OBJECTDIR}/library/signals.o \ ${OBJECTDIR}/uFTP.o @@ -117,6 +118,11 @@ ${OBJECTDIR}/library/logFunctions.o: library/logFunctions.c ${RM} "$@.d" $(COMPILE.c) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/library/logFunctions.o library/logFunctions.c +${OBJECTDIR}/library/openSsl.o: library/openSsl.c + ${MKDIR} -p ${OBJECTDIR}/library + ${RM} "$@.d" + $(COMPILE.c) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/library/openSsl.o library/openSsl.c + ${OBJECTDIR}/library/signals.o: library/signals.c ${MKDIR} -p ${OBJECTDIR}/library ${RM} "$@.d" diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml index 3ad328a..4b31e1b 100644 --- a/nbproject/configurations.xml +++ b/nbproject/configurations.xml @@ -10,6 +10,7 @@ library/dynamicVectors.h library/fileManagement.h library/logFunctions.h + library/openSsl.h library/signals.h library/daemon.h @@ -33,6 +34,7 @@ library/dynamicVectors.c library/fileManagement.c library/logFunctions.c + library/openSsl.c library/signals.c MakeFileGeneric @@ -124,6 +126,10 @@ + + + + @@ -197,6 +203,10 @@ + + + + diff --git a/nbproject/private/configurations.xml b/nbproject/private/configurations.xml index 7954229..641e381 100644 --- a/nbproject/private/configurations.xml +++ b/nbproject/private/configurations.xml @@ -13,8 +13,6 @@ - - diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml index aef7ea3..a39859f 100644 --- a/nbproject/private/private.xml +++ b/nbproject/private/private.xml @@ -6,6 +6,16 @@ - + + file:/home/ugo/NetBeansProjects/uFTP/ftpData.c + file:/home/ugo/NetBeansProjects/uFTP/library/openSsl.h + file:/home/ugo/NetBeansProjects/uFTP/ftpCommandElaborate.c + file:/home/ugo/NetBeansProjects/uFTP/ftpServer.c + file:/home/ugo/NetBeansProjects/uFTP/MakeFileGeneric + file:/home/ugo/NetBeansProjects/uFTP/library/openSsl.c + file:/home/ugo/NetBeansProjects/uFTP/ftpData.h + file:/home/ugo/NetBeansProjects/uFTP/library/configRead.c + file:/home/ugo/NetBeansProjects/uFTP/ftpCommandsElaborate.h + diff --git a/uftpd.cfg b/uftpd.cfg index 6d78ad9..3b65328 100644 --- a/uftpd.cfg +++ b/uftpd.cfg @@ -13,7 +13,7 @@ FTP_PORT = 21 SINGLE_INSTANCE = true #Allow only one server instance (true or false) -DAEMON_MODE = true +DAEMON_MODE = false #Run in background, daemon mode ok IDLE_MAX_TIMEOUT = 3600