-int mac_selinux_get_child_mls_label(int socket_fd, const char *exe, char **label) {
+int mac_selinux_get_child_mls_label(int socket_fd, const char *exe, const char *exec_label, char **label) {
/* If there is no context set for next exec let's use context
of target executable */
r = getfilecon(exe, &fcon);
/* If there is no context set for next exec let's use context
of target executable */
r = getfilecon(exe, &fcon);
- r = selabel_lookup_raw(label_hnd, &filecon, newpath, S_IFDIR);
+ r = selabel_lookup_raw(label_hnd, &filecon, newpath, mode);
r = setfscreatecon(filecon);
if (r < 0) {
log_enforcing("Failed to set SELinux security context %s for %s: %m", filecon, path);
r = setfscreatecon(filecon);
if (r < 0) {
log_enforcing("Failed to set SELinux security context %s for %s: %m", filecon, path);