seccomp: document path calculation

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2019-05-06 09:39:40 +02:00
parent 192023dd5a
commit 18847d37dd
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -1338,7 +1338,10 @@ int seccomp_notify_handler(int fd, uint32_t events, void *data,
__do_close_prot_errno int fd_mem = -EBADF;
int reconnect_count, ret;
ssize_t bytes;
char mem_path[6 + 21 + 5];
char mem_path[6 /* /proc/ */
+ INTTYPE_TO_STRLEN(int64_t)
+ 3 /* mem */
+ 1 /* \0 */];
struct lxc_handler *hdlr = data;
struct lxc_conf *conf = hdlr->conf;
struct seccomp_notif *req = conf->seccomp.notifier.req_buf;