comparison libpam-sys/libpam-sys-impls/src/lib.rs @ 118:39760dfc9b3b

Detect PAM library based only on system lib; rename minimal lib to XSso. Also formats and assorted other cleanup.
author Paul Fisher <paul@pfish.zone>
date Sun, 29 Jun 2025 20:13:03 -0400
parents 178310336596
children 0f913ec120ac
comparison
equal deleted inserted replaced
117:20f7712a6857 118:39760dfc9b3b
251 } 251 }
252 let matching = cases![ 252 let matching = cases![
253 ("Sun", (any("Sun", "OpenPam"))), 253 ("Sun", (any("Sun", "OpenPam"))),
254 ("OpenPam", (any("Sun", "OpenPam"))), 254 ("OpenPam", (any("Sun", "OpenPam"))),
255 ("LinuxPam", (not("OpenPam"))), 255 ("LinuxPam", (not("OpenPam"))),
256 ("MinimalOpenPam", (not("OpenPam"))), 256 ("XSso", (not("OpenPam"))),
257 ("Other", (not(any("This", "That")))), 257 ("Other", (not(any("This", "That")))),
258 ("OpenPam", (not(not("OpenPam")))), 258 ("OpenPam", (not(not("OpenPam")))),
259 ("Anything", (not(any()))), 259 ("Anything", (not(any()))),
260 ]; 260 ];
261 for (good, tree) in matching { 261 for (good, tree) in matching {
267 ("LinuxPam", (not("LinuxPam"))), 267 ("LinuxPam", (not("LinuxPam"))),
268 ("Sun", ("LinuxPam")), 268 ("Sun", ("LinuxPam")),
269 ("OpenPam", (any("LinuxPam", "Sun"))), 269 ("OpenPam", (any("LinuxPam", "Sun"))),
270 ("One", (not(any("One", "Another")))), 270 ("One", (not(any("One", "Another")))),
271 ("Negatory", (not(not("Affirmative")))), 271 ("Negatory", (not(not("Affirmative")))),
272 ("MinimalOpenPam", ("OpenPam")), 272 ("XSso", ("OpenPam")),
273 ("OpenPam", ("MinimalOpenPam")), 273 ("OpenPam", ("XSso")),
274 ]; 274 ];
275 for (bad, tree) in nonmatching { 275 for (bad, tree) in nonmatching {
276 let pred = parse(tree); 276 let pred = parse(tree);
277 assert!(!pred.matches(bad)) 277 assert!(!pred.matches(bad))
278 } 278 }