Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion ext/soap/php_sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifndef O_BINARY
# define O_BINARY 0
Expand Down Expand Up @@ -3228,7 +3233,12 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, long cache_wsdl TSRMLS_DC)
unsigned char digest[16];
int len = strlen(SOAP_GLOBAL(cache_dir));
time_t cached;
char *user = php_get_current_user(TSRMLS_C);
#ifdef HAVE_UNISTD_H
char user[10]; /* storage for a 32-bit UID */
snprintf(user, 10, "%d", getuid());
#else
char *user = getenv("USERNAME");
#endif
int user_len = user ? strlen(user) + 1 : 0;

md5str[0] = '\0';
Expand Down