git.ucc.asn.au
/
tpg
/
opendispense2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed references to LDAP when USE_LDAP is undefined
[tpg/opendispense2.git]
/
src
/
server
/
server.c
diff --git
a/src/server/server.c
b/src/server/server.c
index
d3bb49b
..
330ac66
100644
(file)
--- a/
src/server/server.c
+++ b/
src/server/server.c
@@
-17,7
+17,6
@@
#include <string.h>
#include <limits.h>
#include <stdarg.h>
#include <string.h>
#include <limits.h>
#include <stdarg.h>
-#include <ldap.h>
#define DEBUG_TRACE_CLIENT 0
#define DEBUG_TRACE_CLIENT 0
@@
-322,7
+321,10
@@
void Server_ParseClientCommand(tClient *Client, char *CommandString)
* Usage: USER <username>
*/
void Server_Cmd_USER(tClient *Client, char *Args)
* Usage: USER <username>
*/
void Server_Cmd_USER(tClient *Client, char *Args)
-{
+{
+ char *space = strchr(Args, ' ');
+ if(space) *space = '\0'; // Remove characters after the ' '
+
// Debug!
if( giDebugLevel )
printf("Client %i authenticating as '%s'\n", Client->ID, Args);
// Debug!
if( giDebugLevel )
printf("Client %i authenticating as '%s'\n", Client->ID, Args);
@@
-357,9
+359,11
@@
void Server_Cmd_USER(tClient *Client, char *Args)
* Usage: PASS <hash>
*/
void Server_Cmd_PASS(tClient *Client, char *Args)
* Usage: PASS <hash>
*/
void Server_Cmd_PASS(tClient *Client, char *Args)
-{
- // TODO: Decrypt password passed
+{
+ char *space = strchr(Args, ' ');
+ if(space) *space = '\0'; // Remove characters after the ' '
+ // Pass on to cokebank
Client->UID = GetUserAuth(Client->Salt, Client->Username, Args);
if( Client->UID != -1 ) {
Client->UID = GetUserAuth(Client->Salt, Client->Username, Args);
if( Client->UID != -1 ) {
@@
-378,8
+382,8
@@
void Server_Cmd_PASS(tClient *Client, char *Args)
*/
void Server_Cmd_AUTOAUTH(tClient *Client, char *Args)
{
*/
void Server_Cmd_AUTOAUTH(tClient *Client, char *Args)
{
- char *sp
os
= strchr(Args, ' ');
- if(sp
os) *spos = '\0';
// Remove characters after the ' '
+ char *sp
ace
= strchr(Args, ' ');
+ if(sp
ace) *space = '\0';
// Remove characters after the ' '
// Check if trusted
if( !Client->bIsTrusted ) {
// Check if trusted
if( !Client->bIsTrusted ) {
UCC
git Repository :: git.ucc.asn.au