scottobear: (Default)
[personal profile] scottobear
 
	# procedure to check if the setuid bit is on 
	sub checkSUID { 
		return( -u $_[0] ); 
	} 

Some file test operators
-r readable
-x executable
-e exists
-d is a directory
-t is a tty
-T text file

Example


 
################################################################ 
# Check Security 
################################################################ 
# Users who wish to use this program must 
# put the file ".allowmailform" in their home directory on the  
# machine running this script.  We don't want people creating 
# forms that are abused to send "anonymous" mail. 
$homedir = (getpwnam($recipient))[7]; 
if (! -e "$homedir/.allowmailform") { 
	# this user does not permit the server to send mail to him.  Quit. 
	&error("The recipient of the form has not enabled access for this form");    exit(0); 
} 

Profile

scottobear: (Default)
scott von berg

April 2017

S M T W T F S
       1
2 345678
9 10 11 12 13 14 15
16 1718 19 20 21 22
23 2425 26 2728 29
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 20th, 2026 07:40 pm
Powered by Dreamwidth Studios