summaryrefslogtreecommitdiff
path: root/source4/auth/ntlmssp/ntlmssp_server.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-09-30 22:08:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:15 -0500
commit819eeaef328fcc330700b2626d17c5447ffd3589 (patch)
tree12a799adee76d776312d199d2dc70b7dbec70233 /source4/auth/ntlmssp/ntlmssp_server.c
parente3b8d856aae403f8b540d6c983303226ca20b4a8 (diff)
downloadsamba-819eeaef328fcc330700b2626d17c5447ffd3589.tar.gz
samba-819eeaef328fcc330700b2626d17c5447ffd3589.tar.bz2
samba-819eeaef328fcc330700b2626d17c5447ffd3589.zip
r10663: Eliminate use of pstring
(This used to be commit 57cfbe51e61e27098fad3f9b1113c6f8f69f9a55)
Diffstat (limited to 'source4/auth/ntlmssp/ntlmssp_server.c')
-rw-r--r--source4/auth/ntlmssp/ntlmssp_server.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source4/auth/ntlmssp/ntlmssp_server.c b/source4/auth/ntlmssp/ntlmssp_server.c
index 9f106da37c..c448402a55 100644
--- a/source4/auth/ntlmssp/ntlmssp_server.c
+++ b/source4/auth/ntlmssp/ntlmssp_server.c
@@ -26,7 +26,6 @@
#include "auth/auth.h"
#include "auth/ntlmssp/ntlmssp.h"
#include "lib/crypto/crypto.h"
-#include "pstring.h"
#include "system/filesys.h"
/**
@@ -107,7 +106,7 @@ static const char *ntlmssp_target_name(struct gensec_ntlmssp_state *gensec_ntlms
*/
static BOOL get_myfullname(char *my_name)
{
- pstring hostname;
+ char hostname[HOST_NAME_MAX];
*hostname = 0;
@@ -121,13 +120,13 @@ static BOOL get_myfullname(char *my_name)
hostname[sizeof(hostname)-1] = '\0';
if (my_name)
- fstrcpy(my_name, hostname);
+ strncpy(my_name, hostname, sizeof(hostname));
return True;
}
static BOOL get_mydomname(char *my_domname)
{
- pstring hostname;
+ char hostname[HOST_NAME_MAX];
char *p;
/* arrgh! relies on full name in system */
@@ -150,7 +149,7 @@ static BOOL get_mydomname(char *my_domname)
p++;
if (my_domname)
- fstrcpy(my_domname, p);
+ strncpy(my_domname, p, sizeof(hostname));
return True;
}
@@ -173,7 +172,7 @@ NTSTATUS ntlmssp_server_negotiate(struct gensec_security *gensec_security,
{
struct gensec_ntlmssp_state *gensec_ntlmssp_state = gensec_security->private_data;
DATA_BLOB struct_blob;
- fstring dnsname, dnsdomname;
+ char dnsname[HOST_NAME_MAX], dnsdomname[HOST_NAME_MAX];
uint32_t neg_flags = 0;
uint32_t ntlmssp_command, chal_flags;
char *cliname=NULL, *domname=NULL;