Lines Matching defs:script

191 	 * a script or not (because the interpreter sees a filename like
206 * Execute as a long pathname relative to "/". If this is a script,
207 * the interpreter will launch but fail to open the script because its
228 char *fullname_script = realpath("script", NULL);
243 int fd_script = open_or_die("script", O_RDONLY);
247 int fd_script_ephemeral = open_or_die("script.ephemeral", O_RDONLY);
249 int fd_script_cloexec = open_or_die("script", O_RDONLY|O_CLOEXEC);
320 /* Shell script wrapping executable file: */
322 fail += check_execveat(subdir_dfd, "../script", 0);
323 fail += check_execveat(dot_dfd, "script", 0);
324 fail += check_execveat(dot_dfd_path, "script", 0);
331 /* O_CLOEXEC fd fails for a script (as script file inaccessible) */
334 fail += check_execveat_fail(dot_dfd_cloexec, "script", 0, ENOENT);
336 /* Mess with script file that's already open: */
338 rename("script.ephemeral", "script.moved");
341 unlink("script.moved"); /* remove the file while fd open */
346 fail += check_execveat(subdir_dfd_ephemeral, "../script", 0);
347 fail += check_execveat(subdir_dfd_ephemeral, "script", 0);
349 unlink("subdir.moved/script");
352 fail += check_execveat(subdir_dfd_ephemeral, "../script", 0);
353 fail += check_execveat_fail(subdir_dfd_ephemeral, "script", 0, ENOENT);
375 fail += check_execveat_pathmax(root_dfd, "script", 1);
382 const char *script = "#!/bin/sh\nexit $*\n";
387 exe_cp("script", "script.ephemeral");
390 fd = open("subdir.ephemeral/script", O_RDWR|O_CREAT|O_TRUNC, 0755);
391 write(fd, script, strlen(script));