diff options
author | Volker Lendecke <vl@samba.org> | 2013-03-08 19:41:07 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-04-11 14:24:20 -0700 |
commit | 0008d9e1c5151fe841b11651e7bb62c1feb93769 (patch) | |
tree | c5388d5c8f7069314c404df15fbfeccdf80870f3 /source3/libsmb | |
parent | 4627699e4f03f771e15657be90944a082fb8d740 (diff) | |
download | samba-0008d9e1c5151fe841b11651e7bb62c1feb93769.tar.gz samba-0008d9e1c5151fe841b11651e7bb62c1feb93769.tar.bz2 samba-0008d9e1c5151fe841b11651e7bb62c1feb93769.zip |
libsmbclient: Slightly simplify cli_session_setup_spnego
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cliconnect.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |