Pedro, One of the todo's in your rshd.c source is to process blanks in path names.
The attachment has a patch for this. Can I commit ? Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
*** rshd.c-1 2007-07-01 12:00:36.000000000 +0200 --- rshd.c 2007-07-01 12:27:40.000000000 +0200 *************** *** 514,519 **** --- 514,520 ---- exit(0); argslen = 0; + #if 0 args = program; /* TODO: program paths with embedded spaces? */ args = strchr (args, ' '); *************** *** 522,527 **** --- 523,550 ---- else args = ""; argslen = strlen (args); + #else + /* Find the first blank that's not preceded by a backslash */ + for (args=program; *args; args++) { + if (isspace(args[1]) && args[0] != '\\') { + args[1] = '\0'; + args+=2; + break; + } + } + /* Now, in program, remove backslashes followed by spaces */ + char *p, *q; + for (p=q=program; *p; p++) { + if (isspace(p[1]) && p[0] == '\\') + /* Skip backslash */; + else { + *q++ = *p; + } + } + *q = '\0'; + if (*args && args != program) + argslen = strlen(args); + #endif wargs = alloca ((argslen + 1) * sizeof (wchar_t)); mbstowcs (wargs, args, argslen + 1);
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
_______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel