* fhandler_socket.cc (SECRET_EVENT_NAME): Remove.

(ENTROPY_SOURCE_NAME): Ditto.
	(secret_event_name): New static function.  Create shared event name
	with "Global\" prefix on systems supporting terminal services.
	(fhandler_socket::set_connect_secret): Fix conditional.
	(fhandler_socket::create_secret_event): Create secret event using
	secret_event_name().
	(fhandler_socket::close_secret_event): Ditto.
	* shared.cc (shared_name): Create shared object name with "Global\"
	prefix on systems supporting terminal services.
	* wincap.cc: Set has_terminal_services capability throughout.
	(wincap_2003): New global object representing Windows 2003 Server
	capabilities.
	(wincapc::init): Accomodate Windows 2003 Server.
	* wincap.h (struct wincaps): Add has_terminal_services capability.
This commit is contained in:
Corinna Vinschen
2003-05-20 15:22:09 +00:00
parent 10bada05fa
commit d4f3ce316c
5 changed files with 122 additions and 36 deletions

View File

@@ -48,7 +48,8 @@ static NO_COPY wincaps wincap_unknown = {
has_process_io_counters:false,
supports_reading_modem_output_lines:false,
needs_memory_protection:false,
pty_needs_alloc_console:false
pty_needs_alloc_console:false,
has_terminal_services:false
};
static NO_COPY wincaps wincap_95 = {
@@ -88,7 +89,8 @@ static NO_COPY wincaps wincap_95 = {
has_process_io_counters:false,
supports_reading_modem_output_lines:false,
needs_memory_protection:false,
pty_needs_alloc_console:false
pty_needs_alloc_console:false,
has_terminal_services:false
};
static NO_COPY wincaps wincap_95osr2 = {
@@ -128,7 +130,8 @@ static NO_COPY wincaps wincap_95osr2 = {
has_process_io_counters:false,
supports_reading_modem_output_lines:false,
needs_memory_protection:false,
pty_needs_alloc_console:false
pty_needs_alloc_console:false,
has_terminal_services:false
};
static NO_COPY wincaps wincap_98 = {
@@ -168,7 +171,8 @@ static NO_COPY wincaps wincap_98 = {
has_process_io_counters:false,
supports_reading_modem_output_lines:false,
needs_memory_protection:false,
pty_needs_alloc_console:false
pty_needs_alloc_console:false,
has_terminal_services:false
};
static NO_COPY wincaps wincap_98se = {
@@ -208,7 +212,8 @@ static NO_COPY wincaps wincap_98se = {
has_process_io_counters:false,
supports_reading_modem_output_lines:false,
needs_memory_protection:false,
pty_needs_alloc_console:false
pty_needs_alloc_console:false,
has_terminal_services:false
};
static NO_COPY wincaps wincap_me = {
@@ -248,7 +253,8 @@ static NO_COPY wincaps wincap_me = {
has_process_io_counters:false,
supports_reading_modem_output_lines:false,
needs_memory_protection:false,
pty_needs_alloc_console:false
pty_needs_alloc_console:false,
has_terminal_services:false
};
static NO_COPY wincaps wincap_nt3 = {
@@ -288,7 +294,8 @@ static NO_COPY wincaps wincap_nt3 = {
has_process_io_counters:false,
supports_reading_modem_output_lines:true,
needs_memory_protection:true,
pty_needs_alloc_console:true
pty_needs_alloc_console:true,
has_terminal_services:false
};
static NO_COPY wincaps wincap_nt4 = {
@@ -328,7 +335,8 @@ static NO_COPY wincaps wincap_nt4 = {
has_process_io_counters:false,
supports_reading_modem_output_lines:true,
needs_memory_protection:true,
pty_needs_alloc_console:true
pty_needs_alloc_console:true,
has_terminal_services:false
};
static NO_COPY wincaps wincap_nt4sp4 = {
@@ -368,7 +376,8 @@ static NO_COPY wincaps wincap_nt4sp4 = {
has_process_io_counters:false,
supports_reading_modem_output_lines:true,
needs_memory_protection:true,
pty_needs_alloc_console:true
pty_needs_alloc_console:true,
has_terminal_services:false
};
static NO_COPY wincaps wincap_2000 = {
@@ -408,7 +417,8 @@ static NO_COPY wincaps wincap_2000 = {
has_process_io_counters:true,
supports_reading_modem_output_lines:true,
needs_memory_protection:true,
pty_needs_alloc_console:true
pty_needs_alloc_console:true,
has_terminal_services:true
};
static NO_COPY wincaps wincap_xp = {
@@ -448,7 +458,49 @@ static NO_COPY wincaps wincap_xp = {
has_process_io_counters:true,
supports_reading_modem_output_lines:true,
needs_memory_protection:true,
pty_needs_alloc_console:true
pty_needs_alloc_console:true,
has_terminal_services:true
};
static NO_COPY wincaps wincap_2003 = {
lock_file_highword:0xffffffff,
chunksize:0,
shared:FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
is_winnt:true,
access_denied_on_delete:false,
has_delete_on_close:true,
has_page_guard:true,
has_security:true,
has_security_descriptor_control:true,
has_get_process_times:true,
has_lseek_bug:false,
has_lock_file_ex:true,
has_signal_object_and_wait:true,
has_eventlog:true,
has_ip_helper_lib:true,
has_set_handle_information:true,
has_set_handle_information_on_console_handles:true,
supports_smp:true,
map_view_of_file_ex_sucks:false,
altgr_is_ctrl_alt:true,
has_physical_mem_access:true,
has_working_copy_on_write:true,
share_mmaps_only_by_name:false,
virtual_protect_works_on_shared_pages:true,
has_hard_links:true,
can_open_directories:true,
has_move_file_ex:true,
has_negative_pids:false,
has_unreliable_pipes:false,
has_try_enter_critical_section:true,
has_raw_devices:true,
has_valid_processorlevel:true,
has_64bit_file_access:true,
has_process_io_counters:true,
supports_reading_modem_output_lines:true,
needs_memory_protection:true,
pty_needs_alloc_console:true,
has_terminal_services:true
};
wincapc wincap;
@@ -483,10 +535,19 @@ wincapc::init ()
break;
case 5:
os = "NT";
if (version.dwMinorVersion == 0)
caps = &wincap_2000;
else
caps = &wincap_xp;
switch (version.dwMinorVersion)
{
case 0:
caps = &wincap_2000;
break;
case 1:
caps = &wincap_xp;
break;
default:
caps = &wincap_2003;
}
break;
default:
os = "??";