aboutsummaryrefslogtreecommitdiffstats
path: root/erts/epmd/src/epmd_int.h
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-08-25 18:04:56 +0200
committerPatrik Nyblom <[email protected]>2010-08-31 15:42:52 +0200
commit1ff4783ab8b1bdb32ced6072eb193896b429d115 (patch)
treeb4127695639279808b40b65fb4f3774af43976e3 /erts/epmd/src/epmd_int.h
parent716d3f57b471b2e2c3b5772008f5d32767c6cbeb (diff)
downloadotp-1ff4783ab8b1bdb32ced6072eb193896b429d115.tar.gz
otp-1ff4783ab8b1bdb32ced6072eb193896b429d115.tar.bz2
otp-1ff4783ab8b1bdb32ced6072eb193896b429d115.zip
Fix anomalies in epmd not yet reported as security issues
Use erts_(v)snprintf to ensure no buffer overruns in debug printouts. Disallow everything except port and name requests from remote nodes. Disallow kill command even from localhost if alive nodes exist. -relaxed_command_check when starting epmd returns the possibility to kill this epmd when nodes are alive (from localhost). Disallow stop command completely except if -relaxed_command_check is given when epmd was started. Environment variable ERL_EPMD_RELAXED_COMMAND_CHECK can be set to always get -relaxed_command_check.
Diffstat (limited to 'erts/epmd/src/epmd_int.h')
-rw-r--r--erts/epmd/src/epmd_int.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h
index d69d8c93ef..c2558d52a1 100644
--- a/erts/epmd/src/epmd_int.h
+++ b/erts/epmd/src/epmd_int.h
@@ -246,8 +246,10 @@
typedef struct {
int fd; /* File descriptor */
- unsigned open:1; /* TRUE if open */
- unsigned keep:1; /* Don't close when sent reply */
+ unsigned char open; /* TRUE if open */
+ unsigned char keep; /* Don't close when sent reply */
+ unsigned char local_peer; /* The peer of this connection is via
+ loopback interface */
unsigned got; /* # of bytes we have got */
unsigned want; /* Number of bytes we want */
char *buf; /* The remaining buffer */
@@ -287,6 +289,7 @@ typedef struct {
int debug;
int silent;
int is_daemon;
+ int brutal_kill;
unsigned packet_timeout;
unsigned delay_accept;
unsigned delay_write;
@@ -308,6 +311,7 @@ void epmd_call(EpmdVars*,int);
void run(EpmdVars*);
void epmd_cleanup_exit(EpmdVars*, int);
int epmd_conn_close(EpmdVars*,Connection*);
+void stop_cli(EpmdVars *g, char *name);
#ifdef DONT_USE_MAIN
int start_epmd(char *,char *,char *,char *,char *,char *,char *,char *,char *,char *);