From: Todd C. Miller Date: Tue, 5 Dec 1995 23:58:21 +0000 (+0000) Subject: fixes from Jeff Earickson X-Git-Tag: SUDO_1_4_0~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c8b4baceeab0bb9a000d6aa0f2353e210b846d53;p=sudo fixes from Jeff Earickson , --- diff --git a/dce_pwent.c b/dce_pwent.c index 72acd194e..d2d4e6236 100644 --- a/dce_pwent.c +++ b/dce_pwent.c @@ -4,14 +4,17 @@ * The code below basically comes from the examples supplied on * the OSF DCE 1.0.3 manpages for the sec_login routines, with * enough additional polishing to make the routine work with the - * reset of sudo. + * rest of sudo. * This code is known to work on HP 700 and 800 series systems - * running HP-UX 10.0, with HP's version 1.2.1 of DCE. + * running HP-UX 9.X and 10.X, with either HP's version 1.2.1 of DCE. + * (aka, OSF DCE 1.0.3) or with HP's version 1.4 of DCE (aka, OSF + * DCE 1.1). * * Use at your own risk!!! (But I would like to hear about bugs.) */ #include "config.h" +#include "compat.h" #ifdef HAVE_DCE @@ -56,6 +59,8 @@ int dce_pwent(username, plain_pw) password_rec.key.key_type = sec_passwd_plain; password_rec.key.tagged_union.plain = (idl_char *) plain_pw; + password_rec.pepper = NULL; + password_rec.version_number = sec_passwd_c_version_none; if(sec_login_validate_identity(login_context, &password_rec, &reset_passwd, &auth_src, &status)) { @@ -89,9 +94,9 @@ int dce_pwent(username, plain_pw) nbytes = sizeof(struct passwd); if ((pwd = (struct passwd *) malloc(nbytes)) == NULL) { (void) fprintf(stderr, "malloc for passwd struct failed\n"); - return(0);; + return(0); } - (void) sec_login_get_pwent(login_context, &pwd, &status); + (void) sec_login_get_pwent(login_context, (sec_login_passwd_t) pwd, &status); (void) free(pwd); if (check_dce_status(status, "sec_login_get_pwent:"))