diff options
author | midipix <writeonce@midipix.org> | 2017-01-08 17:03:46 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2017-01-08 17:03:46 -0500 |
commit | 1f883a394d38bea4792f9067285363b3dd400ec3 (patch) | |
tree | 2955782a6f2600aa96bac7256921cc77ff185773 | |
parent | a5dc9f23b94eddb634e915f600bc928b3e6ed316 (diff) | |
download | ntapi-1f883a394d38bea4792f9067285363b3dd400ec3.tar.bz2 ntapi-1f883a394d38bea4792f9067285363b3dd400ec3.tar.xz |
ntapi_tty_create_session(): removed hard-coded fallback image name.
-rw-r--r-- | include/ntapi/nt_tty.h | 2 | ||||
-rw-r--r-- | src/tty/ntapi_tty_create_session.c | 19 |
2 files changed, 5 insertions, 16 deletions
diff --git a/include/ntapi/nt_tty.h b/include/ntapi/nt_tty.h index 636f4ae..dc8c4f3 100644 --- a/include/ntapi/nt_tty.h +++ b/include/ntapi/nt_tty.h @@ -360,7 +360,7 @@ typedef int32_t __stdcall ntapi_tty_create_session( __in nt_tty_session_type type, __in nt_tty_session_subtype subtype, __in const nt_guid * guid __optional, - __in wchar16_t * image_name __optional, + __in wchar16_t * image_name, __in void * htty __optional); diff --git a/src/tty/ntapi_tty_create_session.c b/src/tty/ntapi_tty_create_session.c index 97e8a22..c152185 100644 --- a/src/tty/ntapi_tty_create_session.c +++ b/src/tty/ntapi_tty_create_session.c @@ -31,7 +31,7 @@ int32_t __stdcall __ntapi_tty_create_session( __in nt_tty_session_type type, __in nt_tty_session_subtype subtype, __in const nt_guid * guid __optional, - __in wchar16_t * image_name __optional, + __in wchar16_t * image_name, __in void * htty __optional) { nt_status status; @@ -47,14 +47,9 @@ int32_t __stdcall __ntapi_tty_create_session( nt_create_process_params params; nt_event_basic_information eready; - wchar16_t __attr_aligned__(8) __tty_image_name_fallback[] = { - '\\','?','?','\\', - 'C',':', - '\\','m','i','d','i','p','i','x', - '\\','b','i','n', - '\\','n','t','c','t','t','y', - '.','e','x','e', - 0}; + /* validate */ + if (!image_name) + return NT_STATUS_INVALID_PARAMETER; /* init */ __internals = __ntapi_internals(); @@ -76,9 +71,6 @@ int32_t __stdcall __ntapi_tty_create_session( if (!port_name) port_name = __internals->subsystem; - if (!image_name) - image_name = __tty_image_name_fallback; - break; case NT_TTY_SESSION_SECONDARY: @@ -91,9 +83,6 @@ int32_t __stdcall __ntapi_tty_create_session( if (!port_name) port_name = &sport_name; - if (!image_name) - image_name = __tty_image_name_fallback; - break; case NT_TTY_SESSION_PRIVATE: |