]>
git.saurik.com Git - apple/security.git/blob - Security/libsecurity_checkpw/test/test-checkpw.c
3 #include <security/checkpw.h>
9 const char *prompt
= "checkpw test prompt:";
12 main(int argv
, char *argc
[])
16 struct passwd
*pw
= NULL
;
18 uname
= (char*)getenv("USER");
22 struct passwd
*pw
= getpwuid(uid
);
26 retval
= checkpw(uname
, getpass(prompt
));
29 printf("Password is okay.\n");
31 printf("Incorrect password.\n");