mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-29 13:28:19 +00:00
Fix: segfault when processing directories
BugLink: http://bugs.launchpad.net/bugs/1534405 Patch -r 2952 switched over to using the library kernel interface, and added a kernel_interface parameter to the dir_cb struct, that is used to process directories. Unfortunately kernel_interface parameter of the dir_cb struct is not being properly initialized resulting in odd failures and sefaults when the parser is processing directories. Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Seth Arnold <seth.arnold@canonical.com> Acked-by: Steve Beattie <steve@nxnw.org>
This commit is contained in:
parent
3cb1477f5d
commit
a7bcffd9c6
@ -1141,8 +1141,10 @@ int main(int argc, char *argv[])
|
||||
void *data);
|
||||
struct dir_cb_data cb_data;
|
||||
|
||||
memset(&cb_data, 0, sizeof(struct dir_cb_data));
|
||||
cb_data.dirname = profilename;
|
||||
cb_data.cachedir = cacheloc;
|
||||
cb_data.kernel_interface = kernel_interface;
|
||||
cb = binary_input ? binary_dir_cb : profile_dir_cb;
|
||||
if ((retval = dirat_for_each(AT_FDCWD, profilename,
|
||||
&cb_data, cb))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user