]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/seccomp.c
seccomp: refactor line handling of parse_config
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 25 May 2018 10:04:13 +0000 (12:04 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 25 May 2018 10:14:12 +0000 (12:14 +0200)
commit9dbd8ff383804094dc4059cc052d56b504ad3121
tree9175c6847209f3863d66fbd31d75a8a17d28984b
parentf858dd50cff72855f4fe305c150eeb02387f8fb5
seccomp: refactor line handling of parse_config

Moving parse_config_v2 to use getline accidentally parsed
the wrong buffer. Since both _v1 and _v2 now use getline it
seems to be simpler to also use getline() for the first line
before entering the version specific parsers and pass along
the pointer and size so they can reuse them.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fixes: 9c3798eba41c ("seccomp: parse_config_v2()")
src/lxc/seccomp.c