]> git.decadent.org.uk Git - nfs-utils.git/commit - utils/statd/sm-notify.c
sm-notify: sm-notify doesn't handle localhost properly
authorChuck Lever <chuck.lever@oracle.com>
Mon, 29 Aug 2011 17:22:21 +0000 (13:22 -0400)
committerLuk Claes <luk@debian.org>
Sun, 2 Oct 2011 14:16:47 +0000 (16:16 +0200)
commitfe8d91dde4b646637756e5414f8fc9b211d9fe33
tree141cfd2c8204b5ec4fec9375e0042074b8140101
parentb52f41ccc1cb58bb3f3db928ebcc6f1cbce6d751
sm-notify: sm-notify doesn't handle localhost properly

It looks like the existing algorithm for verifying the passed-in bind
address is as broken as statd_matchhostname() used to be: for IP
addresses, AI_CANONNAME is useless.  We need to have getnameinfo(3) or
equivalent in there.

Clean up: extract the logic that verifies the command line bind
address into its own function, and make it handle canonical name
lookup correctly.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/statd/sm-notify.c