GNU bug report logs -
#15603
[PATCH] Add NTLM2 session support to ntlm.el
Previous Next
Reported by: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
Date: Sun, 13 Oct 2013 17:23:01 UTC
Severity: normal
Tags: patch
Fixed in version 25.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15603 in the body.
You can then email your comments to 15603 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15603
; Package
emacs
.
(Sun, 13 Oct 2013 17:23:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 13 Oct 2013 17:23:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
ntlm.el does not support the NTLM2 Session protocol [1]; web services
that require an NTLM2 Session response for HTTP authentication reject
connections from Emacs (via [2]). The attached patch adds support for
this variant of the protocol.
Thomas
1. http://en.wikipedia.org/wiki/NTLM#NTLM2_Session
2. http://code.google.com/p/url-http-ntlm/
2013-10-13 Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
* net/ntlm.el (ntlm-build-auth-response): Add NTLM2 Session
support.
[emacs-ntlm2-session-response-support.patch (text/plain, inline)]
=== modified file 'lisp/net/ntlm.el'
*** lisp/net/ntlm.el 2013-01-01 09:11:05 +0000
--- lisp/net/ntlm.el 2013-10-13 12:51:34 +0000
*************** is not given."
*** 80,87 ****
(request-msgType (concat (make-string 1 1) (make-string 3 0)))
;0x01 0x00 0x00 0x00
(request-flags (concat (make-string 1 7) (make-string 1 178)
! (make-string 2 0)))
! ;0x07 0xb2 0x00 0x00
lu ld off-d off-u)
(when (string-match "@" user)
(unless domain
--- 80,87 ----
(request-msgType (concat (make-string 1 1) (make-string 3 0)))
;0x01 0x00 0x00 0x00
(request-flags (concat (make-string 1 7) (make-string 1 178)
! (make-string 1 8) (make-string 1 0)))
! ;0x07 0xb2 0x08 0x00
lu ld off-d off-u)
(when (string-match "@" user)
(unless domain
*************** by PASSWORD-HASHES. PASSWORD-HASHES sho
*** 144,154 ****
(setq domain (substring user (1+ (match-beginning 0))))
(setq user (substring user 0 (match-beginning 0))))
! ;; generate response data
! (setq lmRespData
! (ntlm-smb-owf-encrypt (car password-hashes) challengeData))
! (setq ntRespData
! (ntlm-smb-owf-encrypt (cadr password-hashes) challengeData))
;; get offsets to fields to pack the response struct in a string
(setq lu (length user))
--- 144,178 ----
(setq domain (substring user (1+ (match-beginning 0))))
(setq user (substring user 0 (match-beginning 0))))
! ;; check if "negotiate NTLM2 key" flag is set in type 2 message
! (if (not (zerop (logand (aref flags 2) 8)))
! (let (randomString
! sessionHash)
! ;; generate NTLM2 session response data
! (setq randomString (string-make-unibyte
! (concat
! (make-string 1 (random 256))
! (make-string 1 (random 256))
! (make-string 1 (random 256))
! (make-string 1 (random 256))
! (make-string 1 (random 256))
! (make-string 1 (random 256))
! (make-string 1 (random 256))
! (make-string 1 (random 256)))))
! (setq sessionHash (secure-hash 'md5
! (concat challengeData randomString)
! nil nil t))
! (setq sessionHash (substring sessionHash 0 8))
!
! (setq lmRespData (concat randomString (make-string 16 0)))
! (setq ntRespData (ntlm-smb-owf-encrypt
! (cadr password-hashes) sessionHash)))
! (progn
! ;; generate response data
! (setq lmRespData
! (ntlm-smb-owf-encrypt (car password-hashes) challengeData))
! (setq ntRespData
! (ntlm-smb-owf-encrypt (cadr password-hashes) challengeData))))
;; get offsets to fields to pack the response struct in a string
(setq lu (length user))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15603
; Package
emacs
.
(Sat, 21 Jun 2014 14:11:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 15603 <at> debbugs.gnu.org (full text, mbox):
Hi,
I just confirmed that this patch still applies to trunk. In December
2013 Chong Yidong requested that I make a copyright assignment for it,
and that's in place now. Can this go into trunk?
Thanks,
Thomas
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Sat, 04 Oct 2014 19:25:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
:
bug acknowledged by developer.
(Sat, 04 Oct 2014 19:25:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 15603-done <at> debbugs.gnu.org (full text, mbox):
Version: 25.1
Thanks; applied (mindlessly, since I have no idea what this is).
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 02 Nov 2014 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 198 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.