]> git.cameronkatri.com Git - pw-darwin.git/blobdiff - libutil/login_crypt.c
o Slap some "_"'s in front of variable names relating to extattr functions,
[pw-darwin.git] / libutil / login_crypt.c
index fd21c9be99c1a22340628fac7629b41a158e0c99..e080ba9f28e2d09bbb367772794938aec0c7f84f 100644 (file)
 #include <sys/types.h>
 
 #include <login_cap.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include <unistd.h>
 
 const char *
 login_setcryptfmt(login_cap_t *lc, const char *def, const char *error) {
        const char *cipher;
 
-       cipher = login_getcapstr(lc, "passwd_format", def, NULL);
+       cipher = login_getcapstr(lc, "passwd_format", (char *)def, NULL);
+       if (getenv("CRYPT_DEBUG") != NULL)
+               fprintf(stderr, "login_setcryptfmt: "
+                   "passwd_format = %s\n", cipher);
        if (cipher == NULL)
                return (error);
        if (!crypt_set_format(cipher))