diff options
author | Jeremy Allison <jra@samba.org> | 2007-11-15 18:27:26 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-11-15 18:27:26 -0800 |
commit | acb829ecc3b9af3f141425ecac032a7c722a1815 (patch) | |
tree | b5f4f9d8d89096859509b419894ac68c6b62f029 /source3/lib | |
parent | c261545449f71d9b347a37518dab0d5ae4116f8b (diff) | |
download | samba-acb829ecc3b9af3f141425ecac032a7c722a1815.tar.gz samba-acb829ecc3b9af3f141425ecac032a7c722a1815.tar.bz2 samba-acb829ecc3b9af3f141425ecac032a7c722a1815.zip |
Add MAX_DNS_NAME_LENGTH, remove more pstrings.
Jeremy.
(This used to be commit a1725f4ff7ed375808c78ac661b539557748d0a5)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/replace/replace.h | 4 | ||||
-rw-r--r-- | source3/lib/util_sock.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source3/lib/replace/replace.h b/source3/lib/replace/replace.h index 36a355f0a9..1d1cbc2cd2 100644 --- a/source3/lib/replace/replace.h +++ b/source3/lib/replace/replace.h @@ -540,4 +540,8 @@ typedef int bool; #define PATH_MAX 1024 #endif +#ifndef MAX_DNS_NAME_LENGTH +#define MAX_DNS_NAME_LENGTH 256 /* Actually 255 but +1 for terminating null. */ +#endif + #endif /* _LIBREPLACE_REPLACE_H */ diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index 28154067d3..a59b1d5ef2 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -1802,8 +1802,8 @@ const char *get_peer_name(int fd, socklen_t length = sizeof(ss); const char *p; int ret; - char name_buf[HOST_NAME_MAX]; - char tmp_name[HOST_NAME_MAX]; + char name_buf[MAX_DNS_NAME_LENGTH]; + char tmp_name[MAX_DNS_NAME_LENGTH]; /* reverse lookups can be *very* expensive, and in many situations won't work because many networks don't link dhcp |