aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-06-21 12:01:37 +0200
committerDave Barach <openvpp@barachs.net>2017-06-21 15:22:40 +0000
commitf6616388113efa59e5278c75e5223612d209d4a0 (patch)
treeebf3379bf5c49dfeb9fee4f21296a60d46135e74 /src/vlib
parenta54230d4e79e088b13f581e301846fc3e259548e (diff)
Add option to create clib_socket with group write permissions
Also allow group write as default for CLI socket connections. Change-Id: I6af1f277f70581358cd9241bf0f5cb0752fe250f Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/unix/cli.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vlib/unix/cli.c b/src/vlib/unix/cli.c
index 74dea161..953d133c 100644
--- a/src/vlib/unix/cli.c
+++ b/src/vlib/unix/cli.c
@@ -57,6 +57,8 @@
#include <unistd.h>
#include <arpa/telnet.h>
#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <unistd.h>
/** ANSI escape code. */
#define ESC "\x1b"
@@ -2640,7 +2642,8 @@ unix_cli_config (vlib_main_t * vm, unformat_input_t * input)
/* CLI listen. */
unix_file_t template = { 0 };
- s->flags = SOCKET_IS_SERVER; /* listen, don't connect */
+ s->flags = SOCKET_IS_SERVER | /* listen, don't connect */
+ SOCKET_ALLOW_GROUP_WRITE; /* PF_LOCAL socket only */
error = clib_socket_init (s);
if (error)