9
0
Fork 0

Fix endless loop in automount code

A chdir to a path registered as an automount path followed by a 'ls'
results in an endless loop. This happens because the command the
automounter executes results in another automount request.
Fix this by running the automounter from the chdir code before
the cwd is actually changed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-11-27 11:21:59 +01:00
parent 239699fc83
commit 812c6f2bea
1 changed files with 2 additions and 0 deletions

View File

@ -579,6 +579,8 @@ int chdir(const char *pathname)
if (ret)
goto out;
automount_mount(p, 0);
strcpy(cwd, p);
out: