From: Steve Hideg (hideg@saintmarys.edu)
Date: Tue Sep 12 2000 - 12:31:41 CDT
The original subroutine check_input looks like this:
#----------------------------------------------------------------------------\
sub check_input {
@IP = split /\./,$IP;
@ALLOW_DOMAIN = split /\.|\*/,$ALLOW_DOMAIN;
while (@ALLOW_DOMAIN) {
if (shift(@ALLOW_DOMAIN) ne shift(@IP)) {
error("Permission DeniedYou are not in my allowable domain"); }
}
if ((!$FORM{'user'}) || (!$FORM{'pass'})) {
error("Invalid Login");
}
}
#----------------------------------------------------------------------------/
I would add a line before the last closing brace to make it look like this:
#----------------------------------------------------------------------------\
sub check_input {
@IP = split /\./,$IP;
@ALLOW_DOMAIN = split /\.|\*/,$ALLOW_DOMAIN;
while (@ALLOW_DOMAIN) {
if (shift(@ALLOW_DOMAIN) ne shift(@IP)) {
error("Permission DeniedYou are not in my allowable domain"); }
}
if ((!$FORM{'user'}) || (!$FORM{'pass'})) {
error("Invalid Login");
}
($FORM{'user'},$ignore) = split("@",$FORM{'user'});
}
#----------------------------------------------------------------------------/
At 12:17 PM -0700 9/12/00, Nick Ciesinski wrote:
>I got the one line of code but I am confused about where to place it into
>the script.
>
>
>At 12:07 PM 9/12/2000 -0500, you wrote:
>>($theHostname,$ignore) = split("@",$theHostname);
>>
>>
>>At 11:38 AM -0700 9/12/00, Nick Ciesinski wrote:
>>>I have installed Netreg and it is working great except for one small
>>>problem. The problem is that students are typing there full e-mail address
>>>as there username and the system validates them just fine. So the perl
>>>scripts then write the e-mail name as the host and because the e-mail
>>>address has a @ in it the dhcp server will not start up because of the @
>>>symbol in the dhcpd.conf file.
>>>
>>>I am wondering if anyone has made a addition to the perl scripts to catch a
>>>student who puts there full e-mail address in and in turn gives them a
>>>error message. If so it would be greatly appreciated if you could pass
>>>along your code. I have tried to do it myself but because I don't know perl
>>>that well I can't seem to get it to work.
>>>
>>>Thanks!
>>>
>>>Nick Ciesinski
>>>University Wisconsin Whitewater
>>>Residence Life ComputingNetwork Administrator Assistant III
>>
>>
>>
>>_________________________________________________________________________
>>Steve Hideg
>>Technical Support Specialist, Saint Mary's College, Notre Dame IN
>><hideg@saintmarys.edu>
>>_________________________________________________________________________
>> "The problem with doing nothing is not knowing when you're finished."
>> -Nelson DeMille
**********************************************************************
To unsubscribe from this list, send an e-mail message to
majordomo@southwestern.edu containing a single line with the words:
unsubscribe netreg
Send requests for assistance to: owner-netreg@southwestern.edu
**********************************************************************
This archive was generated by hypermail 2.1.4 : Thu Aug 12 2004 - 12:01:34 CDT