Check for getuid and avoid the use of it in libwine if we don't have
it.
This commit is contained in:
parent
b96edb38cd
commit
e7c3ab1874
|
@ -16276,6 +16276,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for ac_func in \
|
for ac_func in \
|
||||||
|
@ -16308,6 +16309,7 @@ for ac_func in \
|
||||||
getservbyport \
|
getservbyport \
|
||||||
gettid \
|
gettid \
|
||||||
gettimeofday \
|
gettimeofday \
|
||||||
|
getuid \
|
||||||
inet_network \
|
inet_network \
|
||||||
lseek64 \
|
lseek64 \
|
||||||
lstat \
|
lstat \
|
||||||
|
|
|
@ -1083,6 +1083,7 @@ AC_CHECK_FUNCS(\
|
||||||
getservbyport \
|
getservbyport \
|
||||||
gettid \
|
gettid \
|
||||||
gettimeofday \
|
gettimeofday \
|
||||||
|
getuid \
|
||||||
inet_network \
|
inet_network \
|
||||||
lseek64 \
|
lseek64 \
|
||||||
lstat \
|
lstat \
|
||||||
|
|
|
@ -191,6 +191,9 @@
|
||||||
/* Define to 1 if you have the `gettimeofday' function. */
|
/* Define to 1 if you have the `gettimeofday' function. */
|
||||||
#undef HAVE_GETTIMEOFDAY
|
#undef HAVE_GETTIMEOFDAY
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getuid' function. */
|
||||||
|
#undef HAVE_GETUID
|
||||||
|
|
||||||
/* Define to 1 if you have the <gif_lib.h> header file. */
|
/* Define to 1 if you have the <gif_lib.h> header file. */
|
||||||
#undef HAVE_GIF_LIB_H
|
#undef HAVE_GIF_LIB_H
|
||||||
|
|
||||||
|
|
|
@ -105,10 +105,15 @@ inline static void remove_trailing_slashes( char *path )
|
||||||
static void init_server_dir( dev_t dev, ino_t ino )
|
static void init_server_dir( dev_t dev, ino_t ino )
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
|
#ifdef HAVE_GETUID
|
||||||
|
const unsigned int uid = getuid();
|
||||||
|
#else
|
||||||
|
const unsigned int uid = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
server_dir = xmalloc( sizeof(server_root_prefix) + 32 + sizeof(server_dir_prefix) +
|
server_dir = xmalloc( sizeof(server_root_prefix) + 32 + sizeof(server_dir_prefix) +
|
||||||
2*sizeof(dev) + 2*sizeof(ino) );
|
2*sizeof(dev) + 2*sizeof(ino) );
|
||||||
sprintf( server_dir, "%s%u%s", server_root_prefix, getuid(), server_dir_prefix );
|
sprintf( server_dir, "%s%u%s", server_root_prefix, uid, server_dir_prefix );
|
||||||
p = server_dir + strlen(server_dir);
|
p = server_dir + strlen(server_dir);
|
||||||
|
|
||||||
if (sizeof(dev) > sizeof(unsigned long) && dev > ~0UL)
|
if (sizeof(dev) > sizeof(unsigned long) && dev > ~0UL)
|
||||||
|
|
Loading…
Reference in New Issue