Merge pull request #2 from seancorfield/patch-2

Ensure gecos string has at least two fields
This commit is contained in:
Simon Brooke 2023-06-11 07:24:56 +01:00 committed by GitHub
commit e25d93bde9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,7 +33,7 @@
"Process this `gecos` field into a map of its sub-fields. See "Process this `gecos` field into a map of its sub-fields. See
https://en.wikipedia.org/wiki/Gecos_field" https://en.wikipedia.org/wiki/Gecos_field"
[gecos] [gecos]
(delimited-record->map gecos #"," [:real-name :address :work-phone :home-phone :other])) (delimited-record->map (str gecos ",?") #"," [:real-name :address :work-phone :home-phone :other]))
(defn process-passwd-line (defn process-passwd-line
"Process this `line` from a passwd file" "Process this `line` from a passwd file"