Lines Matching refs:params
385 const ExecParameters *params,
391 assert(params);
393 if (params->stdin_fd >= 0) {
394 if (dup2(params->stdin_fd, STDIN_FILENO) < 0)
404 i = fixup_input(context->std_input, socket_fd, params->apply_tty_stdin);
444 const ExecParameters *params,
456 assert(params);
459 if (fileno == STDOUT_FILENO && params->stdout_fd >= 0) {
461 if (dup2(params->stdout_fd, STDOUT_FILENO) < 0)
467 if (fileno == STDERR_FILENO && params->stderr_fd >= 0) {
468 if (dup2(params->stderr_fd, STDERR_FILENO) < 0)
474 i = fixup_input(context->std_input, socket_fd, params->apply_tty_stdin);
1373 const ExecParameters *params,
1377 assert(params);
1390 if (params->bus_endpoint_path)
1402 const ExecParameters *params,
1410 assert(params);
1412 if (params->stdin_fd >= 0)
1413 dont_close[n_dont_close++] = params->stdin_fd;
1414 if (params->stdout_fd >= 0)
1415 dont_close[n_dont_close++] = params->stdout_fd;
1416 if (params->stderr_fd >= 0)
1417 dont_close[n_dont_close++] = params->stderr_fd;
1426 if (params->bus_endpoint_fd >= 0)
1427 dont_close[n_dont_close++] = params->bus_endpoint_fd;
1443 const ExecParameters *params,
1462 assert(params);
1484 if (params->idle_pipe)
1485 do_idle_pipe_dance(params->idle_pipe);
1493 r = close_remaining_fds(params, runtime, socket_fd, fds, n_fds);
1505 exec_context_tty_reset(context, params);
1507 if (params->confirm_spawn) {
1551 r = setup_input(context, params, socket_fd);
1557 r = setup_output(unit, context, params, STDOUT_FILENO, socket_fd, basename(command->path), uid, gid);
1563 r = setup_output(unit, context, params, STDERR_FILENO, socket_fd, basename(command->path), uid, gid);
1569 if (params->cgroup_path) {
1570 r = cg_attach_everywhere(params->cgroup_supported, params->cgroup_path, 0, NULL, NULL);
1658 if (params->bus_endpoint_fd >= 0 && context->bus_endpoint) {
1661 r = bus_kernel_set_endpoint_policy(params->bus_endpoint_fd, ep_uid, context->bus_endpoint);
1671 if (params->cgroup_path && context->user && params->cgroup_delegate) {
1672 r = cg_set_task_access(SYSTEMD_CGROUP_CONTROLLER, params->cgroup_path, 0644, uid, gid);
1679 r = cg_set_group_access(SYSTEMD_CGROUP_CONTROLLER, params->cgroup_path, 0755, uid, gid);
1686 if (!strv_isempty(context->runtime_directory) && params->runtime_prefix) {
1692 p = strjoin(params->runtime_prefix, "/", *rt, NULL);
1714 if (params->apply_permissions) {
1765 needs_mount_namespace = exec_needs_mount_namespace(context, params, runtime);
1784 params->apply_chroot ? context->root_directory : NULL,
1790 params->bus_endpoint_path,
1816 if (params->apply_chroot) {
1840 if (params->apply_permissions && mac_selinux_use() && params->selinux_context_net && socket_fd >= 0) {
1865 if (params->apply_permissions) {
2006 r = build_environment(context, params, n_fds, home, username, shell, &our_env);
2019 params->environment,
2062 const ExecParameters *params,
2077 assert(params);
2078 assert(params->fds || params->n_fds <= 0);
2084 if (params->n_fds != 1) {
2089 socket_fd = params->fds[0];
2092 fds = params->fds;
2093 n_fds = params->n_fds;
2100 argv = params->argv ?: command->argv;
2120 params,
2149 if (params->cgroup_path)
2150 (void) cg_attach(SYSTEMD_CGROUP_CONTROLLER, params->cgroup_path, pid);