projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7091bbe
)
whitespace fixes
author
Andre
<maan@p133.(none)>
Fri, 10 Mar 2006 01:47:26 +0000
(
02:47
+0100)
committer
Andre
<maan@p133.(none)>
Fri, 10 Mar 2006 01:47:26 +0000
(
02:47
+0100)
command.c
patch
|
blob
|
history
diff --git
a/command.c
b/command.c
index
5a4dcae
..
3fe6e5d
100644
(file)
--- a/
command.c
+++ b/
command.c
@@
-18,7
+18,6
@@
/** \file command.c does client authentication and executes server commands */
/** \file command.c does client authentication and executes server commands */
-
#include <malloc.h> /* mallinfo */
#include <sys/time.h> /* gettimeofday */
#include "crypt.h"
#include <malloc.h> /* mallinfo */
#include <sys/time.h> /* gettimeofday */
#include "crypt.h"
@@
-334,7
+333,6
@@
static char *afs_status_tohuman(unsigned int flags)
return para_strdup("paused");
}
return para_strdup("paused");
}
-
/*
* return human readable permission string. Never returns NULL.
*/
/*
* return human readable permission string. Never returns NULL.
*/
@@
-987,7
+985,7
@@
static struct server_command *parse_cmd(const char *cmdstr)
sscanf(cmdstr, "%200s%n", buf, &n);
if (!n)
sscanf(cmdstr, "%200s%n", buf, &n);
if (!n)
- return NULL;
+ return NULL;
buf[n] = '\0';
return get_cmd_ptr(buf, NULL);
}
buf[n] = '\0';
return get_cmd_ptr(buf, NULL);
}
@@
-997,7
+995,6
@@
long int para_rand(long unsigned max)
return (long int) ((max + 0.0) * (random() / (RAND_MAX + 1.0)));
}
return (long int) ((max + 0.0) * (random() / (RAND_MAX + 1.0)));
}
-
/* Open user_list file, returns pointer to opened file on success,
* NULL on errors
*/
/* Open user_list file, returns pointer to opened file on success,
* NULL on errors
*/
@@
-1074,22
+1071,20
@@
static void init_rc4_keys(void)
PARA_DEBUG_LOG("rc4 keys initialized (%u:%u)\n",
(unsigned char) rc4_buf[0],
(unsigned char) rc4_buf[RC4_KEY_LEN]);
PARA_DEBUG_LOG("rc4 keys initialized (%u:%u)\n",
(unsigned char) rc4_buf[0],
(unsigned char) rc4_buf[RC4_KEY_LEN]);
-
RC4_set_key(&rc4_recv_key, RC4_KEY_LEN, rc4_buf);
-
RC4_set_key(&rc4_send_key, RC4_KEY_LEN, rc4_buf + RC4_KEY_LEN);
+ RC4_set_key(&rc4_recv_key, RC4_KEY_LEN, rc4_buf);
+ RC4_set_key(&rc4_send_key, RC4_KEY_LEN, rc4_buf + RC4_KEY_LEN);
}
static void rc4_recv(unsigned long len, const unsigned char *indata, unsigned char *outdata)
{
}
static void rc4_recv(unsigned long len, const unsigned char *indata, unsigned char *outdata)
{
-
RC4(&rc4_recv_key, len, indata, outdata);
+ RC4(&rc4_recv_key, len, indata, outdata);
}
}
+
static void rc4_send(unsigned long len, const unsigned char *indata, unsigned char *outdata)
{
static void rc4_send(unsigned long len, const unsigned char *indata, unsigned char *outdata)
{
-
RC4(&rc4_send_key, len, indata, outdata);
+ RC4(&rc4_send_key, len, indata, outdata);
}
}
-
-
-
int handle_connect(int fd, struct sockaddr_in *addr)
{
int numbytes, ret, argc, use_rc4 = 0;
int handle_connect(int fd, struct sockaddr_in *addr)
{
int numbytes, ret, argc, use_rc4 = 0;