summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-01-08 17:03:46 -0500
committermidipix <writeonce@midipix.org>2017-01-08 17:03:46 -0500
commit1f883a394d38bea4792f9067285363b3dd400ec3 (patch)
tree2955782a6f2600aa96bac7256921cc77ff185773 /src
parenta5dc9f23b94eddb634e915f600bc928b3e6ed316 (diff)
downloadntapi-1f883a394d38bea4792f9067285363b3dd400ec3.tar.bz2
ntapi-1f883a394d38bea4792f9067285363b3dd400ec3.tar.xz
ntapi_tty_create_session(): removed hard-coded fallback image name.
Diffstat (limited to 'src')
-rw-r--r--src/tty/ntapi_tty_create_session.c19
1 files changed, 4 insertions, 15 deletions
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: