server: Use the prefix architecture instead of the server one to check for WoW processes.
This commit is contained in:
parent
58791c9acd
commit
bbc03d5172
|
@ -92,6 +92,9 @@ struct process_snapshot
|
|||
int handles; /* number of handles */
|
||||
};
|
||||
|
||||
#define CPU_FLAG(cpu) (1 << (cpu))
|
||||
#define CPU_64BIT_MASK CPU_FLAG(CPU_x86_64)
|
||||
|
||||
/* process functions */
|
||||
|
||||
extern unsigned int alloc_ptid( void *ptr );
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "file.h"
|
||||
#include "handle.h"
|
||||
#include "request.h"
|
||||
#include "process.h"
|
||||
#include "unicode.h"
|
||||
#include "security.h"
|
||||
|
||||
|
@ -1873,6 +1874,12 @@ void flush_registry(void)
|
|||
if (fchdir( server_dir_fd ) == -1) fatal_perror( "chdir to server dir" );
|
||||
}
|
||||
|
||||
/* determine if the thread is wow64 (32-bit client running on 64-bit prefix) */
|
||||
static int is_wow64_thread( struct thread *thread )
|
||||
{
|
||||
return (prefix_type == PREFIX_64BIT && !(CPU_FLAG(thread->process->cpu) & CPU_64BIT_MASK));
|
||||
}
|
||||
|
||||
|
||||
/* create a registry key */
|
||||
DECL_HANDLER(create_key)
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
#include "security.h"
|
||||
|
||||
|
||||
#define CPU_FLAG(cpu) (1 << (cpu))
|
||||
#ifdef __i386__
|
||||
static const unsigned int supported_cpus = CPU_FLAG(CPU_x86);
|
||||
#elif defined(__x86_64__)
|
||||
|
@ -67,7 +66,6 @@ static const unsigned int supported_cpus = CPU_FLAG(CPU_SPARC);
|
|||
#else
|
||||
#error Unsupported CPU
|
||||
#endif
|
||||
#define CPU_64BIT_MASK CPU_FLAG(CPU_x86_64)
|
||||
|
||||
/* thread queues */
|
||||
|
||||
|
@ -409,12 +407,6 @@ struct thread *get_thread_from_pid( int pid )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* determine if the thread is wow64 (32-bit client running on 64-bit server) */
|
||||
int is_wow64_thread( struct thread *thread )
|
||||
{
|
||||
return (supported_cpus & CPU_64BIT_MASK) && !(CPU_FLAG(thread->process->cpu) & CPU_64BIT_MASK);
|
||||
}
|
||||
|
||||
int set_thread_affinity( struct thread *thread, affinity_t affinity )
|
||||
{
|
||||
int ret = 0;
|
||||
|
|
|
@ -118,7 +118,6 @@ extern int thread_add_inflight_fd( struct thread *thread, int client, int server
|
|||
extern int thread_get_inflight_fd( struct thread *thread, int client );
|
||||
extern struct thread_snapshot *thread_snap( int *count );
|
||||
extern struct token *thread_get_impersonation_token( struct thread *thread );
|
||||
extern int is_wow64_thread( struct thread *thread );
|
||||
extern int set_thread_affinity( struct thread *thread, affinity_t affinity );
|
||||
|
||||
/* ptrace functions */
|
||||
|
|
Loading…
Reference in New Issue