From 812c6f2beace08c1af3c851c30d87e8c55d357ff Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 27 Nov 2013 11:21:59 +0100 Subject: 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 --- fs/fs.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs') diff --git a/fs/fs.c b/fs/fs.c index 4563a8126a..32dba8cf0a 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -579,6 +579,8 @@ int chdir(const char *pathname) if (ret) goto out; + automount_mount(p, 0); + strcpy(cwd, p); out: -- cgit v1.2.3