Created
May 5, 2017 12:46
-
-
Save domcleal/e9b24a40883c019822a710bde949813d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Nslcd = | |
let eol = Util.eol | |
let map_names = /passwd/ | |
let key_name = /[^ #\n\t\/][^ #\n\t\/]+/ | |
let spc = del /[ \t]+/ " " | |
let map_entry = | |
[ key /map/ . spc . [ key map_names . spc . [ key key_name . spc . store Rx.no_spaces] ] .eol ]+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Test_Nslcd = | |
test Nslcd.map_entry get "map passwd loginShell ab\nmap passwd homeDirectory bc\n" = ? | |
test Nslcd.map_entry put "map passwd loginShell ab\n" after | |
set "/map[2]/passwd/homeDirectory" "bc" = | |
"map passwd loginShell ab\nmap passwd homeDirectory bc\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment