Lines Matching refs:script

204 	 * a script or not (because the interpreter sees a filename like
219 * Execute as a long pathname relative to "/". If this is a script,
220 * the interpreter will launch but fail to open the script because its
229 ksft_print_msg("Invoke script via root_dfd and relative filename\n");
244 char *fullname_script = realpath("script", NULL);
259 int fd_script = open_or_die("script", O_RDONLY);
263 int fd_script_ephemeral = open_or_die("script.ephemeral", O_RDONLY);
265 int fd_script_cloexec = open_or_die("script", O_RDONLY|O_CLOEXEC);
336 /* Shell script wrapping executable file: */
338 fail += check_execveat(subdir_dfd, "../script", 0);
339 fail += check_execveat(dot_dfd, "script", 0);
340 fail += check_execveat(dot_dfd_path, "script", 0);
347 /* O_CLOEXEC fd fails for a script (as script file inaccessible) */
350 fail += check_execveat_fail(dot_dfd_cloexec, "script", 0, ENOENT);
352 /* Mess with script file that's already open: */
354 rename("script.ephemeral", "script.moved");
357 unlink("script.moved"); /* remove the file while fd open */
362 fail += check_execveat(subdir_dfd_ephemeral, "../script", 0);
363 fail += check_execveat(subdir_dfd_ephemeral, "script", 0);
365 unlink("subdir.moved/script");
368 fail += check_execveat(subdir_dfd_ephemeral, "../script", 0);
369 fail += check_execveat_fail(subdir_dfd_ephemeral, "script", 0, ENOENT);
391 fail += check_execveat_pathmax(root_dfd, "script", 1);
398 const char *script = "#!/bin/bash\nexit $*\n";
403 exe_cp("script", "script.ephemeral");
406 fd = open("subdir.ephemeral/script", O_RDWR|O_CREAT|O_TRUNC, 0755);
407 write(fd, script, strlen(script));