mirror of
https://github.com/kingk85/uFTP.git
synced 2025-07-18 09:46:08 +03:00
Default configuration
This commit is contained in:
15
Makefile
15
Makefile
@ -5,8 +5,11 @@ OUTPATH=./build/
|
|||||||
SOURCE_MODULES_PATH=./library/
|
SOURCE_MODULES_PATH=./library/
|
||||||
|
|
||||||
#FOR DEBUG PURPOSE
|
#FOR DEBUG PURPOSE
|
||||||
CFLAGSTEMP=-c -Wall -I. -g -O0
|
#CFLAGSTEMP=-c -Wall -I. -g -O0
|
||||||
#CFLAGSTEMP=-c -Wall -I.
|
|
||||||
|
#FOR RELEASE
|
||||||
|
CFLAGSTEMP=-c -Wall -I.
|
||||||
|
|
||||||
OPTIMIZATION=-O3
|
OPTIMIZATION=-O3
|
||||||
HEADERS=-I
|
HEADERS=-I
|
||||||
LIBPATH=./build/modules/
|
LIBPATH=./build/modules/
|
||||||
@ -19,14 +22,14 @@ ENABLE_LARGE_FILE_SUPPORT=-D LARGE_FILE_SUPPORT_ENABLED -D _LARGEFILE64_SOURCE
|
|||||||
|
|
||||||
ENABLE_OPENSSL_SUPPORT=
|
ENABLE_OPENSSL_SUPPORT=
|
||||||
#TO ENABLE OPENSSL SUPPORT UNCOMMENT NEXT 2 LINES
|
#TO ENABLE OPENSSL SUPPORT UNCOMMENT NEXT 2 LINES
|
||||||
ENABLE_OPENSSL_SUPPORT=-D OPENSSL_ENABLED
|
#ENABLE_OPENSSL_SUPPORT=-D OPENSSL_ENABLED
|
||||||
LIBS=-lpthread -lssl -lcrypto
|
#LIBS=-lpthread -lssl -lcrypto
|
||||||
|
|
||||||
ENABLE_PAM_SUPPORT=
|
ENABLE_PAM_SUPPORT=
|
||||||
PAM_AUTH_LIB=
|
PAM_AUTH_LIB=
|
||||||
#TO ENABLE PAM AUTH UNCOMMENT NEXT TWO LINES
|
#TO ENABLE PAM AUTH UNCOMMENT NEXT TWO LINES
|
||||||
ENABLE_PAM_SUPPORT= -D PAM_SUPPORT_ENABLED
|
#ENABLE_PAM_SUPPORT= -D PAM_SUPPORT_ENABLED
|
||||||
PAM_AUTH_LIB= -lpam
|
#PAM_AUTH_LIB= -lpam
|
||||||
|
|
||||||
#USER PAM AUTH
|
#USER PAM AUTH
|
||||||
#-lpam
|
#-lpam
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
build/uFTP
BIN
build/uFTP
Binary file not shown.
@ -160,6 +160,7 @@ int parseCommandPass(ftpDataType * data, int socketId)
|
|||||||
//printf("\nLogin try with user %s, password %s", data->clients[socketId].login.name.text, thePass);
|
//printf("\nLogin try with user %s, password %s", data->clients[socketId].login.name.text, thePass);
|
||||||
|
|
||||||
//PAM AUTH METHOD IF ENABLED
|
//PAM AUTH METHOD IF ENABLED
|
||||||
|
#ifdef PAM_SUPPORT_ENABLED
|
||||||
if (data->ftpParameters.pamAuthEnabled == 1)
|
if (data->ftpParameters.pamAuthEnabled == 1)
|
||||||
{
|
{
|
||||||
loginCheck( data->clients[socketId].login.name.text, thePass, &data->clients[socketId].login, &data->clients[socketId].memoryTable);
|
loginCheck( data->clients[socketId].login.name.text, thePass, &data->clients[socketId].login, &data->clients[socketId].memoryTable);
|
||||||
@ -173,7 +174,7 @@ int parseCommandPass(ftpDataType * data, int socketId)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
int searchUserNameIndex;
|
int searchUserNameIndex;
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
* Author: ugo
|
* Author: ugo
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef PAM_SUPPORT_ENABLED
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -123,7 +125,7 @@ void loginCheck(char *name, char *password, loginDataType *login, DYNMEM_MemoryT
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,9 +8,12 @@
|
|||||||
#ifndef LIBRARY_AUTH_H_
|
#ifndef LIBRARY_AUTH_H_
|
||||||
#define LIBRARY_AUTH_H_
|
#define LIBRARY_AUTH_H_
|
||||||
|
|
||||||
|
#ifdef PAM_SUPPORT_ENABLED
|
||||||
|
|
||||||
#include "ftpData.h"
|
#include "ftpData.h"
|
||||||
|
|
||||||
void loginCheck(char *name, char *password, loginDataType *login, DYNMEM_MemoryTable_DataType **memoryTable);
|
void loginCheck(char *name, char *password, loginDataType *login, DYNMEM_MemoryTable_DataType **memoryTable);
|
||||||
int authenticateSystem(const char *username, const char *password);
|
int authenticateSystem(const char *username, const char *password);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* LIBRARY_AUTH_H_ */
|
#endif /* LIBRARY_AUTH_H_ */
|
||||||
|
Reference in New Issue
Block a user