]> git.decadent.org.uk Git - nfs-utils.git/blob - support/include/rpcsec.h
2001-04-01 Chip Salzenberg <chip@valinux.com>
[nfs-utils.git] / support / include / rpcsec.h
1 /*
2  *  Declarations needed for the authdes library. Some of the functions
3  *  mentioned herein have been omitted from the Linux libc header files
4  */
5
6 #ifndef RPCSEC_H
7 #define RPCSEC_H
8
9 int     netname2user(char *netname, int *uidp, int *gidp,
10                                         int *gidlenp, int *gidlist);
11 int     netname2host(char *netname, char *hostname, int hostlen);
12 int     getnetname(char *name);
13 int     user2netname(char *netname, int uid, char *domain);
14 int     host2netname(char *netname, char *hostname, char *domain);
15 void    passwd2des(char *pw, char *key);
16 int     getsecretkey(char *netname, char *secretkey, char *passwd);
17 int     getpublickey(char *hostname, char *publickey);
18 int     yp_update(char *domain, char *map, unsigned int ypop,
19                         char *key, int keylen, char *data, int datalen);
20 int     key_setsecret(char *secret);
21 int     xencrypt(char *secret, char *passwd);
22 int     xdecrypt(char *secret, char *passwd);
23
24
25 #define PUBLICKEY_MAP   "publickey.byname"
26 #define NETID_MAP       "netid.byname"
27
28 #ifndef DEBUG
29 #define RPCSEC_BASE     "/etc/"
30 #else
31 #define RPCSEC_BASE     "/tmp/"
32 #endif
33
34 #define PUBLICKEY_FILE  RPCSEC_BASE "publickey"
35 #define PUBLICKEY_LOCK  RPCSEC_BASE "publickey.lock"
36 #define ROOTKEY_FILE    RPCSEC_BASE ".rootkey"
37 #define KEYSTORE_FILE   RPCSEC_BASE "keystore"
38
39 #endif /* RPCSEC_H */