{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1745737697,
"reponame":"libwebsockets",
"desc":"libwebsockets lightweight C networking library",
"owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets",
"f":3,
"items": [
{"schema":"libjg2-1",
"cid":"4cd9e3728a199be81320e4c0426aa60e",
"commit": {"type":"commit",
"time": 1455851710,
"time_ofs": 480,
"oid_tree": { "oid": "2305241404baf2631e3b9bc2ad8e4cb4e1c7ae4e", "alias": []},
"oid":{ "oid": "9231afca4bd92d176b55b3f2769a771f96ecbd99", "alias": []},
"msg": "test server allow set uid gid from cmdline",
"sig_commit": { "git_time": { "time": 1455851710, "offset": 480 }, "name": "Andy Green", "email": "andy.green@linaro.org", "md5": "4863edaebb4491aa6049a4d2d9c98c2c" },
"sig_author": { "git_time": { "time": 1455851710, "offset": 480 }, "name": "Andy Green", "email": "andy.green@linaro.org", "md5": "4863edaebb4491aa6049a4d2d9c98c2c" }},
"body": "test server allow set uid gid from cmdline\n\nSigned-off-by: Andy Green \u003candy.green@linaro.org\u003e\n"
,
"diff": "diff --git a/test-server/test-server.c b/test-server/test-server.c\nindex fe80a34..6007fde 100644\n--- a/test-server/test-server.c\n+++ b/test-server/test-server.c\n@@ -175,6 +175,7 @@ int main(int argc, char **argv)\n \tchar cert_path[1024] \u003d \u0022\u0022;\n \tchar key_path[1024] \u003d \u0022\u0022;\n \tchar ca_path[1024] \u003d \u0022\u0022;\n+\tint uid \u003d -1, gid \u003d -1;\n \tint use_ssl \u003d 0;\n \tint opts \u003d 0;\n \tint n \u003d 0;\n@@ -193,7 +194,7 @@ int main(int argc, char **argv)\n \tinfo.port \u003d 7681;\n \n \twhile (n \u003e\u003d 0) {\n-\t\tn \u003d getopt_long(argc, argv, \u0022eci:hsap:d:Dr:C:K:A:\u0022, options, NULL);\n+\t\tn \u003d getopt_long(argc, argv, \u0022eci:hsap:d:Dr:C:K:A:u:g:\u0022, options, NULL);\n \t\tif (n \u003c 0)\n \t\t\tcontinue;\n \t\tswitch (n) {\n@@ -208,6 +209,12 @@ int main(int argc, char **argv)\n \t\t\t#endif\n \t\t\tbreak;\n #endif\n+\t\tcase 'u':\n+\t\t\tuid \u003d atoi(optarg);\n+\t\t\tbreak;\n+\t\tcase 'g':\n+\t\t\tgid \u003d atoi(optarg);\n+\t\t\tbreak;\n \t\tcase 'd':\n \t\t\tdebug_level \u003d atoi(optarg);\n \t\t\tbreak;\n@@ -316,11 +323,12 @@ int main(int argc, char **argv)\n \t\tif (ca_path[0])\n \t\t\tinfo.ssl_ca_filepath \u003d ca_path;\n \t}\n-\tinfo.gid \u003d -1;\n-\tinfo.uid \u003d -1;\n-\tinfo.max_http_header_pool \u003d 1;\n+\tinfo.gid \u003d gid;\n+\tinfo.uid \u003d uid;\n+\tinfo.max_http_header_pool \u003d 16;\n \tinfo.options \u003d opts | LWS_SERVER_OPTION_VALIDATE_UTF8;\n \tinfo.extensions \u003d exts;\n+\tinfo.timeout_secs \u003d 5;\n \tinfo.ssl_cipher_list \u003d \u0022ECDHE-ECDSA-AES256-GCM-SHA384:\u0022\n \t\t\t \u0022ECDHE-RSA-AES256-GCM-SHA384:\u0022\n \t\t\t \u0022DHE-RSA-AES256-GCM-SHA384:\u0022\n","s":{"c":1745737697,"u": 1760}}
],"g": 3228,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}