summaryrefslogtreecommitdiff
path: root/package/libtirpc/patches/patch-tirpc_rpc_auth_h
blob: b000f85f7a1fcd41fc39c4207161c56593e9d945 (plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
--- libtirpc-0.2.3.orig/tirpc/rpc/auth.h	2013-02-13 16:13:59.000000000 +0100
+++ libtirpc-0.2.3/tirpc/rpc/auth.h	2014-03-22 13:20:52.000000000 +0100
@@ -48,7 +48,6 @@
 
 #include <rpc/xdr.h>
 #include <rpc/clnt_stat.h>
-#include <sys/cdefs.h>
 #include <sys/socket.h>
 #include <sys/types.h>
 #include <stdio.h>
@@ -165,9 +164,13 @@ union des_block {
 	char c[8];
 };
 typedef union des_block des_block;
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern bool_t xdr_des_block(XDR *, des_block *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Authentication info.  Opaque to client.
@@ -288,9 +291,13 @@ auth_put(AUTH *auth)
 		xfunc, xwhere))
 
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern struct opaque_auth _null_auth;
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Any style authentication.  These routines can be used by any
@@ -311,11 +318,15 @@ int authany_wrap(void), authany_unwrap(v
  *	int len;
  *	int *aup_gids;
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern AUTH *authunix_create(char *, uid_t, uid_t, int, uid_t *);
 extern AUTH *authunix_create_default(void);	/* takes no parameters */
 extern AUTH *authnone_create(void);		/* takes no parameters */
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 /*
  * DES style authentication
  * AUTH *authsecdes_create(servername, window, timehost, ckey)
@@ -324,15 +335,23 @@ __END_DECLS
  * 	const char *timehost;			- optional hostname to sync with
  * 	des_block *ckey;		- optional conversation key to use
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern AUTH *authdes_create (char *, u_int, struct sockaddr *, des_block *);
 extern AUTH *authdes_seccreate (const char *, const u_int, const  char *,
     const  des_block *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern bool_t xdr_opaque_auth		(XDR *, struct opaque_auth *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #define authsys_create(c,i1,i2,i3,ip) authunix_create((c),(i1),(i2),(i3),(ip))
 #define authsys_create_default() authunix_create_default()
@@ -340,36 +359,48 @@ __END_DECLS
 /*
  * Netname manipulation routines.
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern int getnetname(char *);
 extern int host2netname(char *, const char *, const char *);
 extern int user2netname(char *, const uid_t, const char *);
 extern int netname2user(char *, uid_t *, gid_t *, int *, gid_t *);
 extern int netname2host(char *, char *, const int);
 extern void passwd2des ( char *, char * );
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  *
  * These routines interface to the keyserv daemon
  *
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern int key_decryptsession(const char *, des_block *);
 extern int key_encryptsession(const char *, des_block *);
 extern int key_gendes(des_block *);
 extern int key_setsecret(const char *);
 extern int key_secretkey_is_set(void);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Publickey routines.
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern int getpublickey (const char *, char *);
 extern int getpublicandprivatekey (char *, char *);
 extern int getsecretkey (char *, char *, char *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #ifdef KERBEROS
 /*
@@ -382,10 +413,14 @@ __END_DECLS
  *	const char *timehost;			- optional hostname to sync with
  *	int *status;				- kerberos status returned
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern AUTH	*authkerb_seccreate(const char *, const char *, const  char *,
 		    const u_int, const char *, int *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Map a kerberos credential into a unix cred.
@@ -398,19 +433,27 @@ __END_DECLS
  *	int *groups;
  *
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern int	authkerb_getucred(/* struct svc_req *, uid_t *, gid_t *,
 		    short *, int * */);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 #endif /* KERBEROS */
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 struct svc_req;
 struct rpc_msg;
 enum auth_stat _svcauth_none (struct svc_req *, struct rpc_msg *);
 enum auth_stat _svcauth_short (struct svc_req *, struct rpc_msg *);
 enum auth_stat _svcauth_unix (struct svc_req *, struct rpc_msg *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #define AUTH_NONE	0		/* no authentication */
 #define	AUTH_NULL	0		/* backward compatibility */