Annotation of researchv10no/ipc/mgrs/oauthmgr/passwd.c, revision 1.1.1.1

1.1       root        1: #include "authmgr.h"
                      2: #include <pwd.h>
                      3: 
                      4: char*
                      5: passwdchal(kp)
                      6:        struct keyinfo *kp;
                      7: {
                      8:        return 0;
                      9: }
                     10: 
                     11: int
                     12: passwdcomp(kp, s)
                     13:        struct keyinfo *kp;
                     14:        char *s;
                     15: {
                     16:        struct passwd* pw;
                     17: 
                     18:        if(strcmp(kp->logname, "none")==0)
                     19:                return 0;
                     20:        if(strlen(kp->key) > 0) {
                     21:                if(strcmp(s, crypt(s, kp->key)) == 0)
                     22:                        return 0;
                     23:        } else {
                     24:                pw = getpwnam(kp->logname);
                     25:                if(pw != 0 && strlen(pw->pw_passwd) >= 2 &&
                     26:                        strcmp(pw->pw_passwd, crypt(s, pw->pw_passwd)) == 0)
                     27:                        return 0;
                     28:        }
                     29: 
                     30:        return 1;
                     31: }
                     32: 

unix.superglobalmegacorp.com

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