comparison cinst/nssstore_win.c @ 392:8090a1bc1b5b

Add a space in the command line
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 15 Apr 2014 20:26:42 +0200
parents cbd0c1c20b30
children 17e1c8f37d72
comparison
equal deleted inserted replaced
391:cbd0c1c20b30 392:8090a1bc1b5b
151 } 151 }
152 /* TODO! if (is_elevated()) 152 /* TODO! if (is_elevated())
153 restrict token -> hChildToken 153 restrict token -> hChildToken
154 */ 154 */
155 155
156 cmd_line_len = wcslen (lpApplicationName) + wcslen(selection_file) + 1; 156 cmd_line_len = wcslen (lpApplicationName) + wcslen(selection_file) + 2;
157 lpCommandLine = xmalloc (cmd_line_len * sizeof(wchar_t)); 157 lpCommandLine = xmalloc (cmd_line_len * sizeof(wchar_t));
158 158
159 wcscpy_s (lpCommandLine, cmd_line_len, lpApplicationName); 159 wcscpy_s (lpCommandLine, cmd_line_len, lpApplicationName);
160 wcscpy_s (lpCommandLine, cmd_line_len, L" ");
160 wcscat_s (lpCommandLine, cmd_line_len, selection_file); 161 wcscat_s (lpCommandLine, cmd_line_len, selection_file);
162
163 DEBUGPRINTF ("Starting %S with command line %S\n", lpApplicationName, lpCommandLine);
161 164
162 success = CreateProcessAsUserW (hToken, 165 success = CreateProcessAsUserW (hToken,
163 lpApplicationName, 166 lpApplicationName,
164 lpCommandLine, /* Commandline */ 167 lpCommandLine, /* Commandline */
165 NULL, /* Process attributes. Take hToken */ 168 NULL, /* Process attributes. Take hToken */

http://wald.intevation.org/projects/trustbridge/