diff --git a/src/shared/selinux-util.c b/src/shared/selinux-util.c index 36ed12ed89..fb7da12fb6 100644 --- a/src/shared/selinux-util.c +++ b/src/shared/selinux-util.c @@ -586,8 +586,7 @@ int mac_selinux_create_file_prepare_at( _cleanup_free_ char *abspath = NULL; int r; - if (dir_fd < 0 && dir_fd != AT_FDCWD) - return -EBADF; + assert(dir_fd >= 0 || dir_fd == AT_FDCWD); r = selinux_init(/* force= */ false); if (r <= 0)