version 1.133, 2018/09/12 01:19:12 |
version 1.134, 2018/11/16 03:26:01 |
|
|
* Ensure that filename starts anchored. If not, be backward |
* Ensure that filename starts anchored. If not, be backward |
* compatible and prepend the '%h/' |
* compatible and prepend the '%h/' |
*/ |
*/ |
if (*file == '/') |
if (path_absolute(file)) |
return (file); |
return (file); |
|
|
i = snprintf(ret, sizeof(ret), "%s/%s", pw->pw_dir, file); |
i = snprintf(ret, sizeof(ret), "%s/%s", pw->pw_dir, file); |
|
|
* If executing an explicit binary, then verify the it exists |
* If executing an explicit binary, then verify the it exists |
* and appears safe-ish to execute |
* and appears safe-ish to execute |
*/ |
*/ |
if (*av[0] != '/') { |
if (!path_absolute(av[0])) { |
error("%s path is not absolute", tag); |
error("%s path is not absolute", tag); |
return 0; |
return 0; |
} |
} |