File:  [Research Unix] / researchv10no / ipc / mgrs / oauthmgr / passwd.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

#include "authmgr.h"
#include <pwd.h>

char*
passwdchal(kp)
	struct keyinfo *kp;
{
	return 0;
}

int
passwdcomp(kp, s)
	struct keyinfo *kp;
	char *s;
{
	struct passwd* pw;

	if(strcmp(kp->logname, "none")==0)
		return 0;
	if(strlen(kp->key) > 0) {
		if(strcmp(s, crypt(s, kp->key)) == 0)
			return 0;
	} else {
		pw = getpwnam(kp->logname);
		if(pw != 0 && strlen(pw->pw_passwd) >= 2 &&
			strcmp(pw->pw_passwd, crypt(s, pw->pw_passwd)) == 0)
			return 0;
	}

	return 1;
}


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.