From 0008d9e1c5151fe841b11651e7bb62c1feb93769 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 8 Mar 2013 19:41:07 +0100 Subject: libsmbclient: Slightly simplify cli_session_setup_spnego Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/libsmb/cliconnect.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 742921d964..253cc70154 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1919,7 +1919,7 @@ static ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, char *OIDs[ASN1_MAX_OIDS]; int i; const DATA_BLOB *server_blob; - const char *p = NULL; + char *p; char *account = NULL; NTSTATUS status; @@ -2020,8 +2020,8 @@ ntlmssp: /* when falling back to ntlmssp while authenticating with a machine * account strip off the realm - gd */ - if ((p = strchr_m(user, '@')) != NULL) { - account[PTR_DIFF(p,user)] = '\0'; + if ((p = strchr_m(account, '@')) != NULL) { + *p = '\0'; } status = cli_session_setup_ntlmssp(cli, account, pass, user_domain); -- cgit