Sun Java System Web Server 7.0 Update 3 NSAPI Developer's Guide

util_sh_escape() Function

The util_sh_escape function parses a specified string and places a backslash (\) in front of any shell-special characters, returning the resulting string. Use this function to ensure that strings from clients do not cause a shell to do anything unexpected.

The shell-special characters are the space plus the following characters:



char *util_sh_escape(char *s);

Return Values

A newly allocated string.


char *s is the string to be parsed.

See Also

util_uri_escape() Function