sh.1, nval.3, shell.3 + shcomp + suid_exec ... / was: Re:[ksh93-integration-discuss] Re: unreferenced filesexception_listwas Re: [osol-code]Roundtwo:((pre-)pre-review)ksh93-integrationwebrev2007-02-02

David Korn dgk at research.att.com
Wed Mar 7 05:50:19 PST 2007


> In theory... yes... in reality I never tested this. It may work but I
> have no clue how details like the isaexec chain may affect it (or not...
> I guess nothing bad will happen but to be honestly I completely forgot
> the setid-script thing and never tested this).
> 
> 

If the exec command supports #!, and #! also works for scripts
that are setuid and/or execute only, then there is no need for
suid_exec.

For execute only scripts, the exec call needs to open the
file and pass down the open file descriptor as /dev/fd/n
where n is the file descriptor.

This way the shell can read the script without needed read
permission on the script.

David Korn
dgk at research.att.com



More information about the ksh93-integration-discuss mailing list