projects
/
debian
/
amanda
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 3.3.0
[debian/amanda]
/
common-src
/
security-util.c
diff --git
a/common-src/security-util.c
b/common-src/security-util.c
index bc108cdd0fbfcd4747579ce02ce4f933bdd728c9..3a2e0564bb0aa6c037d429bc470bae9b4a3d1501 100644
(file)
--- a/
common-src/security-util.c
+++ b/
common-src/security-util.c
@@
-2661,9
+2661,16
@@
find_port_for_service(
}
char *
}
char *
-sec_get_authenticated_peer_name_
localhost
(
+sec_get_authenticated_peer_name_
gethostname
(
security_handle_t *hdl G_GNUC_UNUSED)
{
security_handle_t *hdl G_GNUC_UNUSED)
{
+ char *server_hostname;
+ server_hostname = malloc(1024);
+ if (gethostname(server_hostname, 1024) == 0) {
+ server_hostname[1023] = '\0';
+ return server_hostname;
+ }
+ amfree(server_hostname);
return "localhost";
}
return "localhost";
}