Can one find a mount point just knowing the volume name?
Neulinger, Nathan R.
nneul@umr.edu
Thu, 8 Feb 2001 12:11:40 -0600
A much better approach is:
open(FH, "-|") || exec ("fs", "lsm", $name);
...
close(FH);
then you are guaranteed that the arguments are never processed by a shell.
-- Nathan
> -----Original Message-----
> From: Brandon S. Allbery KF8NH [mailto:allbery@ece.cmu.edu]
> Sent: Thursday, February 08, 2001 12:05 PM
> To: Neulinger, Nathan R.; 'Stephen Joyce'
> Cc: 'Morris Strongson'; info-afs@transarc.com
> Subject: RE: Can one find a mount point just knowing the volume name?
>
>
> On Thursday, February 08, 2001 11:43:27 -0600, "Neulinger, Nathan R."
> <nneul@umr.edu> wrote:
> +-----
> | > $vol = `fs lsmount $name`;
> |
> | I hope you don't plan on running that script with a user
> that has any
> | privileges as you've got a gaping security hole right there.
> +--->8
>
> Of late I've become quite a fan of quotemeta for this purpose:
>
> $vol = `/usr/afsws/bin/fs lsm \Q$name`;
>
> It's overkill but it works.
>
> --
> brandon s. allbery [os/2][linux][solaris][japh]
> allbery@kf8nh.apk.net
> system administrator [WAY too many hats]
> allbery@ece.cmu.edu
> electrical and computer engineering
> KF8NH
> carnegie mellon university ["better check the oblivious
> first" -ke6sls]
>