summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorGeorge Wang <gwang@php.net>2015-06-08 15:38:59 -0400
committerGeorge Wang <gwang@php.net>2015-06-08 15:46:56 -0400
commiteb15ec385e44c2bd5b8b44f77147faba7e0b0aa3 (patch)
treea46155a78602128df1dfe3dccfbe8e0cc0dc2119 /sapi
parentb861a4a4d2c3d48e15a746afacfd5393736c6bda (diff)
downloadphp-git-eb15ec385e44c2bd5b8b44f77147faba7e0b0aa3.tar.gz
Fixed Buf #68812 Unchecked return value.
Diffstat (limited to 'sapi')
-rw-r--r--sapi/litespeed/lsapilib.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c
index fd94ee908f..02a7068276 100644
--- a/sapi/litespeed/lsapilib.c
+++ b/sapi/litespeed/lsapilib.c
@@ -3131,10 +3131,20 @@ static int lsapi_initSuEXEC()
if ( !s_defaultUid || !s_defaultGid )
{
pw = getpwnam( "nobody" );
- if ( !s_defaultUid )
- s_defaultUid = pw->pw_uid;
- if ( !s_defaultGid )
- s_defaultGid = pw->pw_gid;
+ if ( pw )
+ {
+ if ( !s_defaultUid )
+ s_defaultUid = pw->pw_uid;
+ if ( !s_defaultGid )
+ s_defaultGid = pw->pw_gid;
+ }
+ else
+ {
+ if ( !s_defaultUid )
+ s_defaultUid = 10000;
+ if ( !s_defaultGid )
+ s_defaultGid = 10000;
+ }
}
return 0;
}