HOME


sh-3ll 1.0
DIR:/proc/self/root/proc/thread-self/root/usr/share/emacs/26.1/lisp/
Upload File :
Current File : //proc/self/root/proc/thread-self/root/usr/share/emacs/26.1/lisp/auth-source-pass.elc
;ELC
;;; Compiled
;;; in Emacs version 26.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\210\300\303!\207" [require seq auth-source url-parse] 2)
#@184 Given a property list SPEC, return search matches from the :backend.
See `auth-source-search' for details on SPEC.

(fn &rest SPEC &key BACKEND TYPE HOST USER PORT &allow-other-keys)
(defalias 'auth-source-pass-search #[128 "\300\301\"A@\300\302\"A@\300\303\"A@\300\304\"A@\300\305\"A@\203>\306\307\"=\204>\310\311\312?\306\n\307\"=D\313$\210<\203I\314\315\"\262\316#C\207" [plist-member :backend :type :host :user :port eieio-oref type cl--assertion-failed (or (null type) (eq type (oref backend type))) "Invalid password-store search: %s %s" nil seq-find identity auth-source-pass--build-result] 14 (#$ . 501)])
#@81 Build auth-source-pass entry matching HOST, PORT and USER.

(fn HOST PORT USER)
(defalias 'auth-source-pass--build-result #[771 "\300\"\211\2059\301\302\303\304\"\206\305\303\306\"\206\307\310\311\312\313\314\f!\315\"\316$\257\317\320\321\311\322#\"\210\211\262\207" [auth-source-pass--find-match :host :port auth-source-pass-get "port" :user "user" :secret make-byte-code 0 "\301\302\300\"\207" vconcat vector [auth-source-pass-get secret] 3 auth-source-pass--do-debug "return %s as final result (plus hidden password)" seq-subseq -2] 17 (#$ . 1144)])
#@36 Enable auth-source-password-store.
(defalias 'auth-source-pass-enable #[0 "\300\301\302\"\210\303 \207" [add-to-list auth-sources password-store auth-source-forget-all-cached] 3 (#$ . 1721)])
#@41 Auth-source backend for password-store.
(defvar auth-source-pass-backend (byte-code "\300\301\302!\303\304\305\306\307\310&\207" [auth-source-backend format "Password store" :source "." :type password-store :search-function auth-source-pass-search] 8) (#$ . 1919))
#@69 Create a password-store auth-source backend from ENTRY.

(fn ENTRY)
(defalias 'auth-source-pass-backend-parse #[257 "\211\301=\205\n\302\"\207" [auth-source-pass-backend password-store auth-source-backend-parse-parameters] 4 (#$ . 2191)])
(add-hook 'auth-source-backend-parser-functions 'auth-source-pass-backend-parse)
#@357 Return the value associated to KEY in the password-store entry ENTRY.

ENTRY is the name of a password-store entry.
The key used to retrieve the password is the symbol `secret'.

The convention used as the format for a password-store file is
the following (see http://www.passwordstore.org/#organization):

secret
key1: value1
key2: value2

(fn KEY ENTRY)
(defalias 'auth-source-pass-get #[514 "\300!\301\"A\206\302\230\205\301\303\"A\207" [auth-source-pass-parse-entry assoc "user" "username"] 6 (#$ . 2521)])
#@61 Return a string with the file content of ENTRY.

(fn ENTRY)
(defalias 'auth-source-pass--read-entry #[257 "\300\301!r\211q\210\302\303\304\305\306!\307\"\310$\216\311\312\313\314\"\315\"!\210\316ed\"*\207" [generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205	\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 insert-file-contents expand-file-name format "%s.gpg" "~/.password-store" buffer-substring-no-properties] 8 (#$ . 3047)])
#@110 Return an alist of the data associated with ENTRY.

ENTRY is the name of a password-store entry.

(fn ENTRY)
(defalias 'auth-source-pass-parse-entry #[257 "\3001\301!0\202
\210\302\211\205\303\304!B\305!B\207" [(error) auth-source-pass--read-entry nil secret auth-source-pass--parse-secret auth-source-pass--parse-data] 5 (#$ . 3506)])
#@134 Parse the password-store data in the string CONTENTS and return its secret.
The secret is the first line of CONTENTS.

(fn CONTENTS)
(defalias 'auth-source-pass--parse-secret #[257 "\300\301\302#@\207" [split-string "\\\n" t] 5 (#$ . 3857)])
#@151 Parse the password-store data in the string CONTENTS and return an alist.
CONTENTS is the contents of a password-store formatted file.

(fn CONTENTS)
(defalias 'auth-source-pass--parse-data #[257 "\300\301\302\303$\304\305\306\307A\"\"\207" [split-string "\\\n" t "\\ " seq-remove null mapcar #[257 "\300\301\302\303\"\"\211G\304V\205\211@\305\306A\303#B\207" [mapcar #[257 "\211\300\211\301\302\206\f\303\304Q\"\203\305\306\307\211$\202\266\202\301\310\206'\303\311Q\"\2037\305\306\307\211$\2028\266\202\207" [nil string-match "\\(?:" "[ 	\n
]+" "\\)\\'" replace-match "" t "\\`\\(?:" "\\)"] 11 "\n\n(fn S)"] split-string ":" 1 mapconcat identity] 7 "\n\n(fn LINE)"]] 7 (#$ . 4107)])
#@52 Return true iff ENTRY match USER.

(fn ENTRY USER)
(defalias 'auth-source-pass--user-match-p #[514 "\211?\206\211\300\301\"\230\207" [auth-source-pass-get "user"] 6 (#$ . 4823)])
#@40 Extract hostname from HOST.

(fn HOST)
(defalias 'auth-source-pass--hostname #[257 "\301!\302!>\204\303\304\305D\"\210\211\306H\206\207" [cl-struct-url-tags url-generic-parse-url type-of signal wrong-type-argument url 4] 6 (#$ . 5011)])
#@49 Extract hostname and user from HOST.

(fn HOST)
(defalias 'auth-source-pass--hostname-with-user #[257 "\301!\302!>\204\303\304\305D\"\210\211\306H\302!>\204$\303\304\305D\"\210\307H\2037\211\2037\310\311#\202@\211\203?\211\202@\207" [cl-struct-url-tags url-generic-parse-url type-of signal wrong-type-argument url 2 4 format "%s@%s"] 8 (#$ . 5263)])
#@68 Call `auth-source-do-debug` with MSG and a prefix.

(fn &rest MSG)
(defalias 'auth-source-pass--do-debug #[128 "\300\301\302@PAB\"\207" [apply auth-source-do-debug "auth-source-password-store: "] 5 (#$ . 5639)])
#@90 Select one entry from ENTRIES by searching for a field matching USER.

(fn ENTRIES USER)
(defalias 'auth-source-pass--select-one-entry #[514 "G\205\300\301\302\303\304\305!\306\"\307\310%\"\311\312\313\314\315##\210\211\203.\311\316\"\210\211\2026\311\317@\"\210@\207" [seq-find make-byte-code 257 "\301\302\"\300\230\207" vconcat vector [auth-source-pass-get "user"] 4 "\n\n(fn ENTRY)" auth-source-pass--do-debug "found %s matches: %s" mapconcat identity ", " "return %s as it contains matching user field" "return %s as it is the first one"] 11 (#$ . 5859)])
#@128 Return t iff ENTRY can be opened.
Also displays a warning if not.  This function is slow, don't call it too
often.

(fn ENTRY)
(defalias 'auth-source-pass--entry-valid-p #[257 "\300!\203\301\207\302\303\"\210\304\207" [auth-source-pass-parse-entry t auth-source-pass--do-debug "entry '%s' is not valid" nil] 4 (#$ . 6443)])
#@46 Return a list of all password store entries.
(defalias 'auth-source-pass-entries #[0 "\300\301!\302\303\304\305\306\307!\310\"\311\312%\313\314\"\"\207" [expand-file-name "~/.password-store/" mapcar make-byte-code 257 "\301\302\300\"!\207" vconcat vector [file-name-sans-extension file-relative-name] 5 "\n\n(fn FILE)" directory-files-recursively ".gpg$"] 8 (#$ . 6777)])
#@167 Search the store for all entries either matching ENTRYNAME/USER or ENTRYNAME.
Only return valid entries as of `auth-source-pass--entry-valid-p'.

(fn ENTRYNAME USER)
(defalias 'auth-source-pass--find-all-by-entry-name #[514 "\300\301\302\303\304\305\"\306\"\307\310%\311 \"\207" [seq-filter make-byte-code 257 "\300\302\303\"\235\211G\304U\205\301A@\230\262\204\300\305!\230\205\"\306!\207" vconcat vector [split-string "/" 2 file-name-nondirectory auth-source-pass--entry-valid-p] 5 "\n\n(fn ENTRY)" auth-source-pass-entries] 10 (#$ . 7160)])
#@158 Search the store for an entry matching ENTRYNAME.
If USER is non nil, give precedence to entries containing a user field
matching USER.

(fn ENTRYNAME USER)
(defalias 'auth-source-pass--find-one-by-entry-name #[514 "\300\301#\210\302\"\211G\211\303\267\202%\300\304!\210\305\202)\300\306@\"\210@\202)\307\"\262\207" [auth-source-pass--do-debug "searching for '%s' in entry names (user: %s)" auth-source-pass--find-all-by-entry-name #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (0 18 1 26)) "no match found" nil "found 1 match: %s" auth-source-pass--select-one-entry] 7 (#$ . 7725)])
#@160 Return a password-store entry name matching HOST and USER.
If many matches are found, return the first one.  If no match is
found, return nil.

(fn HOST USER)
(defalias 'auth-source-pass--find-match #[514 "\301!\302!>\204\303\304\305D\"\210\211\306H\262\203#\307\310!\"\2021\211;\2034\307\311\312!Q\"\206S\307\312!\"\206S\313\314\"\211G\315U\205Q\316\317\320A\321#\"\262\207" [cl-struct-url-tags url-generic-parse-url type-of signal wrong-type-argument url 2 auth-source-pass--find-one-by-entry-name auth-source-pass--hostname-with-user "@" auth-source-pass--hostname split-string "\\." 3 auth-source-pass--find-match mapconcat identity "."] 8 (#$ . 8367)])
(provide 'auth-source-pass)