artginzburg / sudo-touchid

 Permanent TouchID support 👆 for `sudo`.
https://git.io/sudotouchid
Eclipse Public License 2.0
512 stars 13 forks source link

Fix issue with inserting char "n" instead \n #7

Closed berejant closed 2 years ago

berejant commented 2 years ago

Without this fix I got next content in sudo file:

# sudo: auth account password sessionnnauth       sufficient     pam_tid.so
auth       sufficient     pam_smartcard.so
auth       required       pam_opendirectory.so
account    required       pam_permit.so
password   required       pam_deny.so
session    required       pam_permit.so

first line is wrong

fix based on advice https://stackoverflow.com/a/7567839/1149273