Commit 0b96ea77 authored by 's avatar

Fixed typos in authentication code.

See previous commit log.


git-svn-id: file:///home/svn/mapi/trunk@415 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 8452f675
......@@ -349,7 +349,8 @@ void *handle_request(void *arg) {
dbuf->length = BASIC_SIZE;
break;
#endif
/* case AUTHENTICATE:
#ifdef WITH_AUTHENTICATION
case AUTHENTICATE:
fprintf(stdout, "AUTHENTICATE\n");
if(!agent_authenticate(dbuf))
dbuf->cmd = AUTHENTICATE_ACK;
......@@ -357,7 +358,8 @@ void *handle_request(void *arg) {
dbuf->cmd = ERROR_ACK;
dbuf->length = BASIC_SIZE;
break;*/
break;
#endif
default:
die("Default case found in handle_request loop!\n");
break;
......
......@@ -24,10 +24,6 @@
#include "parseconf.h"
#include "debug.h"
#ifdef WITH_AUTHENTICATION
#include "vod/vod.h"
#endif
#ifdef WITH_ADMISSION_CONTROL
#include "config.h"
#include "admctrl_cl.h"
......@@ -1741,6 +1737,15 @@ ret:
* Handles authentication with VOd (external process).
*/
#ifdef WITH_AUTHENTICATION
#define MAX_DATA_SIZE 128
typedef struct _authentication_message
{
char opcode;
char username[MAX_DATA_SIZE];
char password[MAX_DATA_SIZE];
char vo[MAX_DATA_SIZE];
} auth_msg_t;
static void cmd_authenticate(int fd, int pid, unsigned char *data, int socket)
{
struct mapiipcbuf qbuf; // response to agent.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment