Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
2477f80a
Commit
2477f80a
authored
Jan 06, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wrapped run_as_user into conditional
parent
cf94fb36
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
mongoose.c
mongoose.c
+7
-2
No files found.
mongoose.c
View file @
2477f80a
...
...
@@ -213,7 +213,10 @@ enum {
ACCESS_CONTROL_LIST
,
ACCESS_LOG_FILE
,
AUTH_DOMAIN
,
CGI_INTERPRETER
,
CGI_PATTERN
,
DAV_AUTH_FILE
,
DOCUMENT_ROOT
,
ENABLE_DIRECTORY_LISTING
,
ERROR_LOG_FILE
,
EXTRA_MIME_TYPES
,
GLOBAL_AUTH_FILE
,
HIDE_FILES_PATTERN
,
IDLE_TIMEOUT_MS
,
INDEX_FILES
,
LISTENING_PORT
,
RUN_AS_USER
,
IDLE_TIMEOUT_MS
,
INDEX_FILES
,
LISTENING_PORT
,
#ifndef _WIN32
RUN_AS_USER
,
#endif
#ifdef USE_SSL
SSL_CERTIFICATE
,
#endif
...
...
@@ -345,7 +348,9 @@ static const char *static_config_options[] = {
"idle_timeout_ms"
,
"30000"
,
"index_files"
,
"index.html,index.htm,index.cgi,index.shtml,index.php,index.lp"
,
"listening_port"
,
NULL
,
#ifndef _WIN32
"run_as_user"
,
NULL
,
#endif
#ifdef USE_SSL
"ssl_certificate"
,
NULL
,
#endif
...
...
@@ -3626,8 +3631,8 @@ const char *mg_set_option(struct mg_server *server, const char *name,
}
else
{
set_non_blocking_mode
(
server
->
listening_sock
);
}
}
else
if
(
ind
==
RUN_AS_USER
)
{
#ifndef _WIN32
}
else
if
(
ind
==
RUN_AS_USER
)
{
struct
passwd
*
pw
;
if
((
pw
=
getpwnam
(
value
))
==
NULL
)
{
error_msg
=
"Unknown user"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment