/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved
*
* $Header$
*/
/*
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
*
* Openvision retains the copyright to derivative works of
* this source code. Do *NOT* create a derivative of this
* source code before consulting with your legal department.
* Do *NOT* integrate *ANY* of this source code into another
* product before consulting with your legal department.
*
* For further information, read the top-level Openvision
* copyright which is contained in the top-level MIT Kerberos
* copyright.
*
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
*
*/
#if !defined(lint) && !defined(__CODECENTER__)
#endif
#include "k5-int.h"
#include <kdb.h>
#include <ctype.h>
#include <pwd.h>
/* for strcasecmp */
#include <string.h>
#include "server_internal.h"
{
/* now policy is initialized as part of database. No separate call needed */
/* Solaris Kerberos: krb5_db_inited returns 0 when db has been inited */
return KADM5_OK;
}
{
/* will be taken care by database close */
return KADM5_OK;
}
#ifdef HESIOD
/* stolen from v4sever/kadm_funcs.c */
static char *
char *str;
{
char *p, *q;
int i;
if (i >= sizeof(newstr))
i = sizeof(newstr)-1;
p = str+i-1;
q = newstr;
q[i]='\0';
for(; i > 0; i--)
*q++ = *p--;
return(newstr);
}
#endif /* HESIOD */
#if 0
static int
char *str;
{
register char *cp;
int effect=0;
effect++;
}
}
return(effect);
}
#endif
#ifdef HESIOD
static int
char *gecos;
char *pwstr;
{
/* Skip past punctuation */
break;
/* Skip to the end of the word */
break;
/* Delimit end of word */
if (*ncp)
*ncp++ = '\0';
/* Check word to see if it's the password */
if (*cp) {
return 1;
return 1;
} else
break;
}
return 0;
}
#endif /* HESIOD */
/* some of this is stolen from gatekeeper ... */
{
int nupper = 0,
nlower = 0,
ndigit = 0,
npunct = 0,
nspec = 0;
char c, *s, *cp;
#ifdef HESIOD
extern struct passwd *hes_getpwnam();
#endif
if(use_policy) {
return KADM5_PASS_Q_TOOSHORT;
s = password;
while ((c = *s++)) {
if (islower((unsigned char) c)) {
nlower = 1;
continue;
}
else if (isupper((unsigned char) c)) {
nupper = 1;
continue;
} else if (isdigit((unsigned char) c)) {
ndigit = 1;
continue;
} else if (ispunct((unsigned char) c)) {
npunct = 1;
continue;
} else {
nspec = 1;
continue;
}
}
return KADM5_PASS_Q_CLASS;
return KADM5_PASS_Q_DICT;
else {
return KADM5_PASS_Q_DICT;
for (i = 0; i < n ; i++) {
return KADM5_PASS_Q_DICT;
#ifdef HESIOD
return KADM5_PASS_Q_DICT; /* XXX new error code? */
#endif
}
return KADM5_OK;
}
} else {
return KADM5_PASS_Q_TOOSHORT;
}
return KADM5_OK;
}
/* Solaris Kerberos */
void
{
}