Cisco Cisco MediaSense Release 9.1(1) Licensing Information

Page of 6316
             Open Source Used In Cisco MediaSense 11.5(1)                                                                                                                                    981
- it can't catch everything. Just most things.
 
- it calls getpwuid(getuid()) to look up the user,
  this MAY affect poorly written programs
 
- using more than one pw_dict file, eg:
 
char *msg;
if (msg = FascistCheck(pw, "onepath") ||
    msg = FascistCheck(pw, "anotherpath"))
{
    printf("Bad Password: because %s\n", msg);
}
 
   ...works, but it's a kludge. AVOID IT IF POSSIBLE.
   Using just the one dictionary is more efficient, anyway.
 
- PWOpen() routines should cope with having more than 1
  dictionary open at a time.  I'll fix this RSN.
 
 
WORKED EXAMPLE
 
---- modified extract from BSD distribution - "local_passwd.c" ----
 
#ifndef CRACKLIB_DICTPATH /* if possible, get from the same Makefile as CrackLib */
#define CRACKLIB_DICTPATH "/usr/local/lib/pw_dict"
#endif/* see examples on how to import DICTPATH into CRACKLIB_DICTPATH */
...
...
...
for (buf[0] = '\0', tries = 0;;) {
p = getpass("New password:");
if (!*p) {
(void)printf("Password unchanged.\n");
pw_error(NULL, 0, 0);
}
 
#ifndef CRACKLIB_DICTPATH
if (strlen(p) <= 5 && (uid != 0 || ++tries < 2)) {
(void)printf("Please enter a longer password.\n");
continue;
}
for (t = p; *t && islower(*t); ++t);
if (!*t && (uid != 0 || ++tries < 2)) {
(void)printf("Please don't use an all-lower case password.\nUnusual capitalization, control characters or digits are
suggested.\n");
continue;