summaryrefslogtreecommitdiffstats
path: root/vlib-api/vlibapi/api_shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'vlib-api/vlibapi/api_shared.c')
-rw-r--r--vlib-api/vlibapi/api_shared.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/vlib-api/vlibapi/api_shared.c b/vlib-api/vlibapi/api_shared.c
index 308f0028e25..0600e621a4e 100644
--- a/vlib-api/vlibapi/api_shared.c
+++ b/vlib-api/vlibapi/api_shared.c
@@ -647,6 +647,14 @@ vl_api_init (vlib_main_t *vm)
once = 1;
am->region_name = "/unset";
+ /*
+ * Eventually passed to fchown, -1 => "current user"
+ * instead of 0 => "root". A very fine disctinction at best.
+ */
+ if (am->api_uid == 0)
+ am->api_uid = -1;
+ if (am->api_gid == 0)
+ am->api_gid = -1;
return (0);
}