| 739 | | inet_ntop(af,context->hostip,inet_str,sizeof(inet_str)); |
|---|
| 740 | | h = gethostbyaddr((char*)&context->hostip,sizeof(context->hostip),af); |
|---|
| 741 | | if (h==NULL) |
|---|
| 742 | | remote_host = inet_str; |
|---|
| 743 | | else |
|---|
| 744 | | remote_host = h->h_name; |
|---|
| 745 | | log_message( (ret)?"LOGIN_FAILED":"LOGIN" ,"%s (%s) \"%s\" \"%s\" \"%s\"", |
|---|
| 746 | | (remote_host)?remote_host:"no host!", |
|---|
| 747 | | inet_str, |
|---|
| 748 | | user ? user->username : "unknown", |
|---|
| 749 | | (groupname)?groupname:"No Group", |
|---|
| 750 | | user ? user->tagline : "unknown" |
|---|
| | 740 | inet_ntop(af, context->hostip, inet_str, sizeof(inet_str)); |
|---|
| | 741 | h = gethostbyaddr((char*)&context->hostip, sizeof(context->hostip), af); |
|---|
| | 742 | log_message(ret ? "LOGIN_FAILED" : "LOGIN", |
|---|
| | 743 | "%s (%s) \"%s\" \"%s\" \"%s\"", |
|---|
| | 744 | h && h->h_name ? h->h_name : "No hostname", |
|---|
| | 745 | *inet_str ? inet_str : "No IP address", |
|---|
| | 746 | user && user->username ? user->username : "No username", |
|---|
| | 747 | group && group->groupname ? group->groupname : "No groupname", |
|---|
| | 748 | user && user->tagline ? user->tagline : "No tagline" |
|---|