Module: kamailio
Branch: master
Commit: d7a10e6a5ea8852681b57586eb9b4d73b75f05bf
URL:
https://github.com/kamailio/kamailio/commit/d7a10e6a5ea8852681b57586eb9b4d7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-03-11T09:40:52+01:00
core: set the global sock_uid/gid based on the user/group values
- they were left with initial value, more or less being unused
---
Modified: main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d7a10e6a5ea8852681b57586eb9b4d7…
Patch:
https://github.com/kamailio/kamailio/commit/d7a10e6a5ea8852681b57586eb9b4d7…
---
diff --git a/main.c b/main.c
index 8e6e9c8..8451e97 100644
--- a/main.c
+++ b/main.c
@@ -2301,12 +2301,15 @@ int main(int argc, char** argv)
fprintf(stderr, "bad user name/uid number: -u %s\n", user);
goto error;
}
+ sock_uid = uid;
+ sock_gid = gid;
}
if (group){
if (group2gid(&gid, group)<0){
fprintf(stderr, "bad group name/gid number: -u %s\n", group);
goto error;
}
+ sock_gid = gid;
}
if (fix_all_socket_lists()!=0){
fprintf(stderr, "failed to initialize list addresses\n");