Merge pull request #2 from seancorfield/patch-2
Ensure gecos string has at least two fields
This commit is contained in:
commit
e25d93bde9
|
@ -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"
|
||||||
|
@ -168,4 +168,4 @@
|
||||||
([]
|
([]
|
||||||
(get-real-name))
|
(get-real-name))
|
||||||
([username]
|
([username]
|
||||||
(get-real-name username)))
|
(get-real-name username)))
|
||||||
|
|
Loading…
Reference in a new issue