dragoneye_xp
New Member
- Messages
- 330
- Reaction score
- 0
- Points
- 0
I am trying to fix my LIST (and several other "command modules") for Pyro OS Command Shell so that users cannot go back any further than their user directories.
I've tried this...
PHP:
...but that's not working.
Can anyone help me?
I've tried this...
PHP:
Code:
function inhome($path){
global $passwd,$userhome,$userperms; //Password, user's home directory, and user's permission data in home directory.
if(strpos($userhome.$path,$userhome)===false){ //If the path the user specified is NOT in the user's home directory...
SendLn("//c:ff0000:Access is denied to //c//c:ffff00:".$path."//c"); //Output an error to the console.
return false; //Tell the caller that the path the user specified was not found in his or her user directory.
}
return true; //Otherwise, tell the caller that the path was found in the user's directory.
}
Can anyone help me?