mirror of
https://github.com/kingk85/uFTP.git
synced 2025-04-12 10:48:40 +03:00
Default configuration
This commit is contained in:
15
Makefile
15
Makefile
@ -5,8 +5,11 @@ OUTPATH=./build/
|
||||
SOURCE_MODULES_PATH=./library/
|
||||
|
||||
#FOR DEBUG PURPOSE
|
||||
CFLAGSTEMP=-c -Wall -I. -g -O0
|
||||
#CFLAGSTEMP=-c -Wall -I.
|
||||
#CFLAGSTEMP=-c -Wall -I. -g -O0
|
||||
|
||||
#FOR RELEASE
|
||||
CFLAGSTEMP=-c -Wall -I.
|
||||
|
||||
OPTIMIZATION=-O3
|
||||
HEADERS=-I
|
||||
LIBPATH=./build/modules/
|
||||
@ -19,14 +22,14 @@ ENABLE_LARGE_FILE_SUPPORT=-D LARGE_FILE_SUPPORT_ENABLED -D _LARGEFILE64_SOURCE
|
||||
|
||||
ENABLE_OPENSSL_SUPPORT=
|
||||
#TO ENABLE OPENSSL SUPPORT UNCOMMENT NEXT 2 LINES
|
||||
ENABLE_OPENSSL_SUPPORT=-D OPENSSL_ENABLED
|
||||
LIBS=-lpthread -lssl -lcrypto
|
||||
#ENABLE_OPENSSL_SUPPORT=-D OPENSSL_ENABLED
|
||||
#LIBS=-lpthread -lssl -lcrypto
|
||||
|
||||
ENABLE_PAM_SUPPORT=
|
||||
PAM_AUTH_LIB=
|
||||
#TO ENABLE PAM AUTH UNCOMMENT NEXT TWO LINES
|
||||
ENABLE_PAM_SUPPORT= -D PAM_SUPPORT_ENABLED
|
||||
PAM_AUTH_LIB= -lpam
|
||||
#ENABLE_PAM_SUPPORT= -D PAM_SUPPORT_ENABLED
|
||||
#PAM_AUTH_LIB= -lpam
|
||||
|
||||
#USER PAM AUTH
|
||||
#-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);
|
||||
|
||||
//PAM AUTH METHOD IF ENABLED
|
||||
#ifdef PAM_SUPPORT_ENABLED
|
||||
if (data->ftpParameters.pamAuthEnabled == 1)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
int searchUserNameIndex;
|
||||
|
@ -5,6 +5,8 @@
|
||||
* Author: ugo
|
||||
*/
|
||||
|
||||
#ifdef PAM_SUPPORT_ENABLED
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.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_
|
||||
#define LIBRARY_AUTH_H_
|
||||
|
||||
#ifdef PAM_SUPPORT_ENABLED
|
||||
|
||||
#include "ftpData.h"
|
||||
|
||||
void loginCheck(char *name, char *password, loginDataType *login, DYNMEM_MemoryTable_DataType **memoryTable);
|
||||
int authenticateSystem(const char *username, const char *password);
|
||||
#endif
|
||||
|
||||
#endif /* LIBRARY_AUTH_H_ */
|
||||
|
Reference in New Issue
Block a user