blob: 7573c967fa223f68f48a7bf153f306b2ba8e0d78 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001From dd353303f62d1dfe32cb000e482616b021708fbe Mon Sep 17 00:00:00 2001
2From: Mingli Yu <mingli.yu@windriver.com>
3Date: Thu, 29 Nov 2018 00:47:34 -0800
4Subject: [PATCH] vsftpd: allow syscalls in the seccomp sandbox
5
6* Allow sysinfo() and getdents64 in the seccomp
7 sandbox otherwise comes below OOPS: priv_sock_get_cmd
8 as the syscall sysinfo() and getdents64 not allowed
9
10root@qemux86-64:~# tnftp 192.168.1.1
11Connected to 192.168.1.1.
12220 (vsFTPd 3.0.3)
13Name (192.168.1.1:root): anonymous
14331 Please specify the password.
15Password:
16230 Login successful.
17Remote system type is UNIX.
18Using binary mode to transfer files.
19ftp> prompt
20Interactive mode off.
21ftp> mget small*
22OOPS: priv_sock_get_cmd
23
24Upstream-Status: Pending
25
26Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
27---
28 seccompsandbox.c | 2 ++
29 1 file changed, 2 insertions(+)
30
31diff --git a/seccompsandbox.c b/seccompsandbox.c
32index 2c350a9..377c50e 100644
33--- a/seccompsandbox.c
34+++ b/seccompsandbox.c
35@@ -409,6 +409,8 @@ seccomp_sandbox_setup_postlogin(const struct vsf_session* p_sess)
36 allow_nr(__NR_getcwd);
37 allow_nr(__NR_chdir);
38 allow_nr(__NR_getdents);
39+ allow_nr(__NR_getdents64);
40+ allow_nr(__NR_sysinfo);
41 /* Misc */
42 allow_nr(__NR_umask);
43
44--
452.17.1
46