summaryrefslogtreecommitdiff
path: root/lib/vty.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-02-02 10:42:51 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-02-02 10:42:51 -0500
commit1a35e2e56533f75d68ed30bf24b3c131da4ba950 (patch)
tree068c7730ed7a58d5374d8123d81720597b40bbcd /lib/vty.c
parentb384af46d50caaae87e1c7807227ac6b4d87f377 (diff)
parent56041a77064fe6924ca55dd4e394777b7a5900d0 (diff)
Merge remote-tracking branch 'origin/stable/2.0'
Diffstat (limited to 'lib/vty.c')
-rw-r--r--lib/vty.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/vty.c b/lib/vty.c
index 9e0625e3cb..b6f493b6c9 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2022,7 +2022,10 @@ vty_serv_un (const char *path)
zprivs_get_ids(&ids);
- if (ids.gid_vty > 0)
+ /* Hack: ids.gid_vty is actually a uint, but we stored -1 in it
+ earlier for the case when we don't need to chown the file
+ type casting it here to make a compare */
+ if ((int)ids.gid_vty > 0)
{
/* set group of socket */
if ( chown (path, -1, ids.gid_vty) )