su: do not change to home dir unless -l
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
committed by
Denys Vlasenko
parent
588e284f53
commit
70fc8c17e2
@ -1414,7 +1414,7 @@ static void send_cgi_and_exit(
|
||||
if (script != url) { /* paranoia */
|
||||
*script = '\0';
|
||||
if (chdir(url + 1) != 0) {
|
||||
bb_perror_msg("chdir(%s)", url + 1);
|
||||
bb_perror_msg("can't change directory to '%s'", url + 1);
|
||||
goto error_execing_cgi;
|
||||
}
|
||||
// not needed: *script = '/';
|
||||
|
Reference in New Issue
Block a user