Ensure that mmap()ed memory is \0-terminated (v3)
Use pwrite() to write terminating \0-byte
This allows us to use standard string handling functions and we can avoid using
the GNU-extension memmem(). This simplifies removing the container from the
lxc_snapshots file. Wrap strstr() in a while loop to remove duplicate entries.
Signed-off-by:
Christian Brauner <christianvanbrauner@gmail.com>
Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
Showing
Please
register
or
sign in
to comment