tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: How to check password with C2 Security.
@ 1999-04-15 14:25 Michael H. Martel
  0 siblings, 0 replies; only message in thread
From: Michael H. Martel @ 1999-04-15 14:25 UTC (permalink / raw)
  To: tru64-unix-managers

Thanks for all the quick responses!

The solution is to use set_auth_parameters,getprpwnam, and bigcrypt.  If
anyone wants to use the Cyrus IMSPD under DU with Enhanced security these
are the changes you need to make.

Thanks!

-- In main.c --

	    set_auth_parameters( argc,argv );


-- login_unix_shadow.c --

#include <stdio.h>
#include <stdlib.h>
#include <sys/security.h>
#include <sys/types.h>
#include </usr/include/prot.h>

/*
        #include <sysexits.h>
        #include <acte.h>
*/

/*
 * Unix passwd-authenticated login
 */

int
login_plaintext(user, pass, reply)
char *user;
char *pass;
char **reply;
{
        struct pr_passwd *pwd;

        pwd = getprpwnam( user );

        if( pwd == NULL ){
                *reply = "unable to obtain password";
                return 1;
        }

        if(strcmp(pwd->ufld.fd_encrypt,bigcrypt(pass,pwd->ufld.fd_encrypt))
!=0)
{
                *reply = "wrong password";
                return(1);
        }

        return 0;
}
  
int
login_authenticate(authtype, mech, authproc)
char *authtype;
struct acte_server **mech;
int (**authproc)();
{
    return 1;
}


Michael

-- 

  -------------------------------o--------------------------------
  Michael H. Martel              | Vermont State Colleges        
  mailto:martelm@quark.vsc.edu   | Technical Support Specialist
  http://probe.vsc.edu/~michael  | PH:802-241-2535 FX:802-241-3363

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-04-15 14:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-04-15 14:25 SUMMARY: How to check password with C2 Security Michael H. Martel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox