Mov file list from package function into seperate module, move declaration
into new high-level header.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
- don't chdir into root directory, use dirfd instead
- make sure we don't dereference symlinks when chaning permissions
(using appropriate AT_* flag)
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>