> -----Original Message----- > From: Doug Monroe [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 03, 2004 5:13 PM > To: [EMAIL PROTECTED] > Subject: Re: [Qmail-scanner-general]hostname call > > > Dallas L. Engelken wrote: > > > > you call open() expensive! > > I said -relatively- expensive, relative to hard coded. > Just my 2 cents of input anyway, no need to get testy. >
agreed.. i just didnt want people to think it would make or break them if the way the hostname was grabbed. why not give people a choice? then you dont have complaints. my $hostname_method = 0; # 0-hardcode, 1-dynamic my $hostname='localhost'; if ($hostname_method) { # HOSTNAME GRABBED DYNAMICALLY open(ME,"/var/qmail/control/me"); flock(ME,2); my $temphost=<ME>; close(ME); $temphost =~ s/[^A-Za-z0-9\-\.]//g; # strip invalid chars $temphost =~ m/(.*)/; # gotta do it to make it taint safe.. blah $hostname = $1; } ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Qmail-scanner-general mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general