Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / lib / pam / pam_modules / dce / xfn_mapping.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: xfn_mapping.h /main/4 1996/05/09 04:28:15 drk $ */
24
25 /*
26  * Copyright (c) 1992-1995, by Sun Microsystems, Inc.
27  * All rights reserved.
28  */
29
30 #ifndef _XFN_MAPPING_H
31 #define _XFN_MAPPING_H
32
33 #ident  "@(#)xfn_mapping.h 1.6     95/09/19 SMI"
34
35 #ifdef  __cplusplus
36 extern "C" {
37 #endif
38
39 #define MAP_PASSLEN     32              /* XXX max mapped passwd length */
40 #define MAP_HEXLEN      (2*MAP_PASSLEN) /* XXX max passwd length in hex */
41 #define DCE_XFN_PASS_ATTR       "onc_dce_passwd"
42
43 #define XFN_MAP_DEBUG   0x1     /* enable debugging */
44
45 int
46 xfn_get_mapped_password(
47         int flags,              /* XFN_MAP_DEBUG, etc */
48         char *user,             /* xfn user */
49         char *xfn_attr,         /* xfn attribute that holds the target pass */
50         char *key,              /* key (password) encrypting target password */
51         char *out,              /* un-encrypted target password */
52         int max_out_len         /* buffer size of out */
53 );
54
55 int
56 xfn_update_mapped_password(
57         int flags,              /* XFN_MAP_DEBUG, etc */
58         char *user,             /* xfn user */
59         char *xfn_attr,         /* xfn attribute that holds the target pass */
60         char *key,              /* key (password) encrypting target password */
61         char *password          /* un-encrypted target password */
62 );
63
64 #endif
65
66 #ifdef  __cplusplus
67 }
68 #endif