Skip to content

Commit

Permalink
Merge pull request #27 from ralt/patch-1
Browse files Browse the repository at this point in the history
Use UID instead of username for external authentication
  • Loading branch information
death committed Jun 3, 2020
2 parents 24b452d + 0c211f8 commit f4d1a99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion auth-dbus-external.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

(defpackage #:dbus/auth-dbus-external
(:use #:cl #:dbus/utils #:dbus/protocols #:dbus/authentication-mechanisms)
(:import-from #:iolib.syscalls #:getuid)
(:export
#:dbus-external-authentication-mechanism))

Expand All @@ -22,5 +23,5 @@

(defmethod feed-authentication-mechanism ((mechanism dbus-external-authentication-mechanism) challenge)
(if (eq challenge :initial-response)
(values :continue (encode-hex-string (current-username)))
(values :continue (encode-hex-string (write-to-string (getuid))))
(error "More than one response requested for EXTERNAL authentication.")))

0 comments on commit f4d1a99

Please sign in to comment.