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

Hello!

I'm trying to modify the IMSPD package from CMU to work under DU 4.0D with
Enhanced Security.  The problem is that imspd isn't getting the password
from the system properly.  The section of code looks somewhat like this
(this is my modified version for testing) :

#include <stdio.h>
#include <stdlib.h>
#include <pwd.h>

int main( int argc, char **argv ){
        struct passwd *pwd;
        int res;

        pwd = getpwnam( argv[1]);
        if (!pwd) return 1;

        if( strcmp(pwd->pw_passwd, crypt(argv[2],pwd->pw_passwd)) != 0){
                printf("Wrong Password!\n");
                return(1);
        }
	return 0;
}

This appears to work, but returns * which is what is stored in etc/passwd.
I think I need to use sia to do this.  Has anybody done this before or can
point me at a good reference ?  I'll summarize for all interested.

Thanks!



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-14 17:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-04-14 17:44 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