2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

now use sudo_realpath()

This commit is contained in:
Todd C. Miller
1994-07-25 22:25:58 +00:00
parent 0230d8474c
commit 93230e6c29

View File

@@ -110,7 +110,7 @@ char *find_path(file)
*/
/* XXX - check return val here? */
if (strchr(file, '/'))
return((char *) realpath(file, command));
return((char *) sudo_realpath(file, command));
/*
* grab PATH out of environment and make a local copy
@@ -180,7 +180,7 @@ static char * realpath_exec(path, file, command)
/* resolve the path */
errno = 0;
if (realpath(fn, command)) {
if (sudo_realpath(fn, command)) {
/* stat the file to make sure it is executable */
if (stat(command, &statbuf) == 0 && (statbuf.st_mode & 0000111))
return(command);