File: rpcsec.h

package info (click to toggle)
nfs-utils 1%3A1.0.6-3.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,532 kB
  • ctags: 1,845
  • sloc: ansic: 16,107; sh: 3,129; makefile: 272
file content (39 lines) | stat: -rw-r--r-- 1,235 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 *  Declarations needed for the authdes library. Some of the functions
 *  mentioned herein have been omitted from the Linux libc header files
 */

#ifndef RPCSEC_H
#define RPCSEC_H

int	netname2user(char *netname, int *uidp, int *gidp,
					int *gidlenp, int *gidlist);
int	netname2host(char *netname, char *hostname, int hostlen);
int	getnetname(char *name);
int	user2netname(char *netname, int uid, char *domain);
int	host2netname(char *netname, char *hostname, char *domain);
void	passwd2des(char *pw, char *key);
int	getsecretkey(char *netname, char *secretkey, char *passwd);
int	getpublickey(char *hostname, char *publickey);
int	yp_update(char *domain, char *map, unsigned int ypop,
			char *key, int keylen, char *data, int datalen);
int	key_setsecret(char *secret);
int	xencrypt(char *secret, char *passwd);
int	xdecrypt(char *secret, char *passwd);


#define PUBLICKEY_MAP	"publickey.byname"
#define NETID_MAP	"netid.byname"

#ifndef DEBUG
#define RPCSEC_BASE	"/etc/"
#else
#define RPCSEC_BASE	"/tmp/"
#endif

#define PUBLICKEY_FILE	RPCSEC_BASE "publickey"
#define PUBLICKEY_LOCK	RPCSEC_BASE "publickey.lock"
#define ROOTKEY_FILE	RPCSEC_BASE ".rootkey"
#define KEYSTORE_FILE	RPCSEC_BASE "keystore"

#endif /* RPCSEC_H */