mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-03 07:45:47 +00:00
now use sudo_realpath()
This commit is contained in:
@@ -110,7 +110,7 @@ char *find_path(file)
|
|||||||
*/
|
*/
|
||||||
/* XXX - check return val here? */
|
/* XXX - check return val here? */
|
||||||
if (strchr(file, '/'))
|
if (strchr(file, '/'))
|
||||||
return((char *) realpath(file, command));
|
return((char *) sudo_realpath(file, command));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* grab PATH out of environment and make a local copy
|
* grab PATH out of environment and make a local copy
|
||||||
@@ -180,7 +180,7 @@ static char * realpath_exec(path, file, command)
|
|||||||
|
|
||||||
/* resolve the path */
|
/* resolve the path */
|
||||||
errno = 0;
|
errno = 0;
|
||||||
if (realpath(fn, command)) {
|
if (sudo_realpath(fn, command)) {
|
||||||
/* stat the file to make sure it is executable */
|
/* stat the file to make sure it is executable */
|
||||||
if (stat(command, &statbuf) == 0 && (statbuf.st_mode & 0000111))
|
if (stat(command, &statbuf) == 0 && (statbuf.st_mode & 0000111))
|
||||||
return(command);
|
return(command);
|
||||||
|
Reference in New Issue
Block a user