[CentOS] sudo doing DNS lookup

Fri Dec 10 14:01:03 UTC 2010
Steve Clark <sclark at netwolves.com>

On 12/10/2010 08:46 AM, Baird, Josh wrote:
>
> Maybe I am missing something here.. but what does 'sudo' have to do 
> with DNS resolution?
>
> *From:* centos-bounces at centos.org [mailto:centos-bounces at centos.org] 
> *On Behalf Of *Steve Clark
> *Sent:* Friday, December 10, 2010 7:44 AM
> *To:* CentOS mailing list
> *Subject:* [CentOS] sudo doing DNS lookup
>
> Hi,
>
> I have a confusing problem. I have two centos 5,5 boxes. Both have
> sudo.i386                                1.7.2p1-9.el5_5               
> installed
>
> I am using the same sudoers file, but the one on box A keeps trying to 
> do DNS lookups
> while the one on box B does not. How do I disable this DNS lookup?
>
> Thanks for any info.
>
>

That is a very good question.

But here is part of an strace of
sudo cat /etc/hosts


socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(53), 
sin_addr=inet_addr("198.6.1.4")}, 28) = 0
fcntl64(4, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
gettimeofday({1291986809, 169934}, NULL) = 0
poll([{fd=4, events=POLLOUT}], 1, 0)    = 1 ([{fd=4, revents=POLLOUT}])
send(4, "\1\231\1\0\0\1\0\0\0\0\0\0\5Z7070\tnetwolves\3com"..., 51, 
MSG_NOSIGNAL) = 51
poll([{fd=4, events=POLLIN}], 1, 5000)  = 1 ([{fd=4, revents=POLLIN}])
ioctl(4, FIONREAD, [113])               = 0
recvfrom(4, "\1\231\201\203\0\1\0\0\0\1\0\0\5Z7070\tnetwolves\3com"..., 
1024, 0, {sa_family=AF_INET, sin_port=htons(53), 
sin_addr=inet_addr("198.6.1.4")}, [16]) = 113
close(4)


-- 
Stephen Clark
*NetWolves*
Sr. Software Engineer III
Phone: 813-579-3200
Fax: 813-882-0209
Email: steve.clark at netwolves.com
http://www.netwolves.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20101210/b640705c/attachment-0005.html>