Deleted Added
full compact
login_cap.c (60746) login_cap.c (64918)
1/*-
2 * Copyright (c) 1996 by
3 * Sean Eric Fagan <sef@kithrup.com>
4 * David Nugent <davidn@blaze.net.au>
5 * All rights reserved.
6 *
7 * Portions copyright (c) 1995,1997
8 * Berkeley Software Design, Inc.

--- 11 unchanged lines hidden (view full) ---

20 * 3. This work was done expressly for inclusion into FreeBSD. Other use
21 * is permitted provided this notation is included.
22 * 4. Absolutely no warranty of function or purpose is made by the authors.
23 * 5. Modifications may be freely made to this file providing the above
24 * conditions are met.
25 *
26 * Low-level routines relating to the user capabilities database
27 *
1/*-
2 * Copyright (c) 1996 by
3 * Sean Eric Fagan <sef@kithrup.com>
4 * David Nugent <davidn@blaze.net.au>
5 * All rights reserved.
6 *
7 * Portions copyright (c) 1995,1997
8 * Berkeley Software Design, Inc.

--- 11 unchanged lines hidden (view full) ---

20 * 3. This work was done expressly for inclusion into FreeBSD. Other use
21 * is permitted provided this notation is included.
22 * 4. Absolutely no warranty of function or purpose is made by the authors.
23 * 5. Modifications may be freely made to this file providing the above
24 * conditions are met.
25 *
26 * Low-level routines relating to the user capabilities database
27 *
28 * $FreeBSD: head/lib/libutil/login_cap.c 60746 2000-05-21 02:50:36Z hoek $
28 * $FreeBSD: head/lib/libutil/login_cap.c 64918 2000-08-22 02:15:54Z green $
29 */
30
31#include <stdio.h>
32#include <stdlib.h>
33#include <string.h>
34#include <errno.h>
35#include <fcntl.h>
36#include <unistd.h>

--- 756 unchanged lines hidden (view full) ---

793 if (authtypes[i] != NULL && (auths = strdup(authtypes[i])) != NULL)
794 lc->lc_style = auths;
795
796 if (lc->lc_style != NULL)
797 lc->lc_style = strdup(lc->lc_style);
798
799 return lc->lc_style;
800}
29 */
30
31#include <stdio.h>
32#include <stdlib.h>
33#include <string.h>
34#include <errno.h>
35#include <fcntl.h>
36#include <unistd.h>

--- 756 unchanged lines hidden (view full) ---

793 if (authtypes[i] != NULL && (auths = strdup(authtypes[i])) != NULL)
794 lc->lc_style = auths;
795
796 if (lc->lc_style != NULL)
797 lc->lc_style = strdup(lc->lc_style);
798
799 return lc->lc_style;
800}
801
802const char *
803login_setcryptfmt(login_cap_t *lc, const char *def, const char *error)
804{
805 const char *cipher;
806
807 cipher = login_getcapstr(lc, "passwd_format", def, NULL);
808 if (cipher == NULL)
809 return (error);
810 if (!crypt_set_format(cipher))
811 return (error);
812 return (cipher);
813}