diff options
Diffstat (limited to 'lib/libutil/login_cap.c')
-rw-r--r-- | lib/libutil/login_cap.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libutil/login_cap.c b/lib/libutil/login_cap.c index b7528b9..7410380 100644 --- a/lib/libutil/login_cap.c +++ b/lib/libutil/login_cap.c @@ -798,3 +798,16 @@ login_getstyle(login_cap_t *lc, char *style, const char *auth) return lc->lc_style; } + +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); + if (cipher == NULL) + return (error); + if (!crypt_set_format(cipher)) + return (error); + return (cipher); +} |