Bug 7 - can't find command when user can traverse a nfs-mounted/non-root-exported dir but root cannot
can't find command when user can traverse a nfs-mounted/non-root-exported dir...
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.3
Sun All
: normal normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2000-09-15 13:17 MDT by ccapelik
Modified: 2001-12-14 21:37 MST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ccapelik 2000-09-15 13:17:14 MDT
__FIX__

virgo<chip>34$ SCCSdiff sudo.c
+ : -------------------------------------------------------- 00/09/15 11:49:50
+ : COMMENTS: updates to fixing searching for the file to run when root is not
priviledged on the filesystem where the command exists
+ sccs sccsdiff -r1.1 -r1.2 sudo.c
438a439
> int chip_find_path;
546a548
> set_perms(PERM_USER, sudo_mode); /* when searching for the command, become the
user in case the file system is not root-exported and root can't traverse some
components in the PATH or access the FQ pathname given */
549c551
<       return(find_path(NewArgv[0], &user_cmnd));
---
>       chip_find_path = find_path(NewArgv[0], &user_cmnd);
551c553,556
<       return(FOUND);
---
>       chip_find_path = FOUND;
>
> set_perms(PERM_ROOT, sudo_mode); /* set back to where it was */
> return(chip_find_path);


__EXAMPLE__

[s7] claughli(/u/clarify/temp.dir): id
uid=2482(claughli) gid=100(users)

[s7] claughli(/u/clarify/temp.dir): groups
users clarify tuxedo

[s7] claughli(/u/clarify/temp.dir): env|grep PATH
PATH=.:/u/claughli/bin:/usr/local/bin:/software/links:/u/clarify/admin:/oracle/8.0.5/bin:/software/spro/SUNWspro/bin:/software/spro/SUNWste/license_tools:/sbin:/usr/sbin:/bin:/usr/bin:/etc:/usr/ucb:/usr/openv/bin:/usr/openwin/bin:/usr/ccs/bin:/usr/dt/bin:/usr/bin:

[s7] claughli(/u/clarify/temp.dir): pwd
/u/clarify/temp.dir

[s7] claughli(/u/clarify/temp.dir): ls -la
total 16
drwxrws---   2 clarify  clarify     4096 Sep 15 10:45 .
drwxrwsrwx  11 clarify  clarify     4096 Sep 15 10:43 ..
-rwxrwxr-x   1 claughli clarify        5 Sep 15 10:44 temp.date
-rwxrwxr-x   1 clarify  clarify        9 Sep 15 10:45 temp2.date

[s7] claughli(/u/clarify/temp.dir): cat temp2.date
date
id

[s7] claughli(/u/clarify/temp.dir): sudo -V
Sudo version 1.6.3p5

[s7] claughli(/u/clarify/temp.dir): sudo -u clarify temp2.date
/software/sudo.v1.6.3p5/bin/sudo: temp2.date: command not found

[s7] claughli(/u/clarify/temp.dir): sudo -u clarify ./temp2.date
/software/sudo.v1.6.3p5/bin/sudo: ./temp2.date: command not found

__AFTER FIX__

[s7] claughli(/u/clarify/temp.dir):
/software/sudo_home/install-sudo.v1.6.3p5.chip/sun4u.sparc.5.6/bin/sudo -u
clarify ./temp2.date
Fri Sep 15 11:48:05 PDT 2000
uid=2480(clarify) gid=101(dba)
Comment 1 Todd C. Miller 2001-12-14 17:37:59 MST
A similar change will appear in sudo 1.6.4