glusterfs  8.2
About: GlusterFS is a network/cluster filesystem. The storage server (or each in a cluster) runs glusterfsd and the clients use mount command or glusterfs client to mount the exported filesystem. Release series 8.x (latest version).
  Fossies Dox: glusterfs-8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

rpcsvc-auth.c
Go to the documentation of this file.
1 /*
2  Copyright (c) 2008-2012 Red Hat, Inc. <http://www.redhat.com>
3  This file is part of GlusterFS.
4 
5  This file is licensed to you under your choice of the GNU Lesser
6  General Public License, version 3 or any later version (LGPLv3 or
7  later), or the GNU General Public License, version 2 (GPLv2), in all
8  cases as published by the Free Software Foundation.
9 */
10 
11 #include "rpcsvc.h"
12 #include <glusterfs/dict.h>
13 
14 extern rpcsvc_auth_t *
16 
17 extern rpcsvc_auth_t *
19 
20 extern rpcsvc_auth_t *
22 extern rpcsvc_auth_t *
24 extern rpcsvc_auth_t *
26 
27 int
28 rpcsvc_auth_add_initer(struct list_head *list, char *idfier,
30 {
31  struct rpcsvc_auth_list *new = NULL;
32 
33  if ((!list) || (!init) || (!idfier))
34  return -1;
35 
36  new = GF_CALLOC(1, sizeof(*new), gf_common_mt_rpcsvc_auth_list);
37  if (!new) {
38  return -1;
39  }
40 
41  new->init = init;
42  strncpy(new->name, idfier, sizeof(new->name) - 1);
43  INIT_LIST_HEAD(&new->authlist);
44  list_add_tail(&new->authlist, list);
45  return 0;
46 }
47 
48 int
50 {
51  int ret = -1;
52 
54  &svc->authschemes, "auth-glusterfs",
56  if (ret == -1) {
57  gf_log(GF_RPCSVC, GF_LOG_ERROR, "Failed to add AUTH_GLUSTERFS");
58  goto err;
59  }
60 
62  &svc->authschemes, "auth-glusterfs-v2",
64  if (ret == -1) {
65  gf_log(GF_RPCSVC, GF_LOG_ERROR, "Failed to add AUTH_GLUSTERFS-v2");
66  goto err;
67  }
68 
70  &svc->authschemes, "auth-glusterfs-v3",
72  if (ret == -1) {
73  gf_log(GF_RPCSVC, GF_LOG_ERROR, "Failed to add AUTH_GLUSTERFS-v3");
74  goto err;
75  }
76 
77  ret = rpcsvc_auth_add_initer(&svc->authschemes, "auth-unix",
79  if (ret == -1) {
80  gf_log(GF_RPCSVC, GF_LOG_ERROR, "Failed to add AUTH_UNIX");
81  goto err;
82  }
83 
84  ret = rpcsvc_auth_add_initer(&svc->authschemes, "auth-null",
86  if (ret == -1) {
87  gf_log(GF_RPCSVC, GF_LOG_ERROR, "Failed to add AUTH_NULL");
88  goto err;
89  }
90 
91  ret = 0;
92 err:
93  return ret;
94 }
95 
96 int
98  struct rpcsvc_auth_list *authitem)
99 {
100  int ret = -1;
101 
102  if ((!svc) || (!options) || (!authitem))
103  return -1;
104 
105  if (!authitem->init) {
106  gf_log(GF_RPCSVC, GF_LOG_ERROR, "No init function defined");
107  ret = -1;
108  goto err;
109  }
110 
111  authitem->auth = authitem->init(svc, options);
112  if (!authitem->auth) {
114  "Registration of auth failed:"
115  " %s",
116  authitem->name);
117  ret = -1;
118  goto err;
119  }
120 
121  authitem->enable = 1;
122  gf_log(GF_RPCSVC, GF_LOG_TRACE, "Authentication enabled: %s",
123  authitem->auth->authname);
124 
125  ret = 0;
126 err:
127  return ret;
128 }
129 
130 int
132 {
133  int ret = -1;
134  struct rpcsvc_auth_list *auth = NULL;
135  struct rpcsvc_auth_list *tmp = NULL;
136 
137  if (!svc)
138  return -1;
139 
140  if (list_empty(&svc->authschemes)) {
141  gf_log(GF_RPCSVC, GF_LOG_WARNING, "No authentication!");
142  ret = 0;
143  goto err;
144  }
145 
146  /* If auth null and sys are not disabled by the user, we must enable
147  * it by default. This is a globally default rule, the user is still
148  * allowed to disable the two for particular subvolumes.
149  */
150  if (!dict_get(options, "rpc-auth.auth-null")) {
151  ret = dict_set_str(options, "rpc-auth.auth-null", "on");
152  if (ret)
153  gf_log("rpc-auth", GF_LOG_DEBUG, "dict_set failed for 'auth-nill'");
154  }
155 
156  if (!dict_get(options, "rpc-auth.auth-unix")) {
157  ret = dict_set_str(options, "rpc-auth.auth-unix", "on");
158  if (ret)
159  gf_log("rpc-auth", GF_LOG_DEBUG, "dict_set failed for 'auth-unix'");
160  }
161 
162  if (!dict_get(options, "rpc-auth.auth-glusterfs")) {
163  ret = dict_set_str(options, "rpc-auth.auth-glusterfs", "on");
164  if (ret)
165  gf_log("rpc-auth", GF_LOG_DEBUG, "dict_set failed for 'auth-unix'");
166  }
167 
169  {
170  ret = rpcsvc_auth_init_auth(svc, options, auth);
171  if (ret == -1)
172  goto err;
173  }
174 
175  ret = 0;
176 err:
177  return ret;
178 }
179 
180 int
182 {
183  int ret;
184  static char *addrlookup_key = "rpc-auth.addr.namelookup";
185 
186  if (!svc || !options)
187  return (-1);
188 
189  /* By default it's disabled */
190  ret = dict_get_str_boolean(options, addrlookup_key, _gf_false);
191  if (ret < 0) {
192  svc->addr_namelookup = _gf_false;
193  } else {
194  svc->addr_namelookup = ret;
195  }
196 
197  if (svc->addr_namelookup)
198  gf_log(GF_RPCSVC, GF_LOG_DEBUG, "Addr-Name lookup enabled");
199 
200  return (0);
201 }
202 
203 int
205 {
206  int ret = -1;
207  char *allow_insecure_str = NULL;
208  gf_boolean_t is_allow_insecure = _gf_false;
209 
210  GF_ASSERT(svc);
212 
213  ret = dict_get_str(options, "rpc-auth-allow-insecure", &allow_insecure_str);
214  if (0 == ret) {
215  ret = gf_string2boolean(allow_insecure_str, &is_allow_insecure);
216  if (0 == ret) {
217  if (_gf_true == is_allow_insecure)
218  svc->allow_insecure = 1;
219  else
220  svc->allow_insecure = 0;
221  }
222  } else {
223  /* By default set allow-insecure to true */
224  svc->allow_insecure = 1;
225 
226  /* setting in options for the sake of functions that look
227  * configuration params for allow insecure, eg: gf_auth
228  */
229  ret = dict_set_str(options, "rpc-auth-allow-insecure", "on");
230  if (ret < 0)
231  gf_log("rpc-auth", GF_LOG_DEBUG,
232  "dict_set failed for 'allow-insecure'");
233  }
234 
235  return ret;
236 }
237 
238 int
240 {
241  int ret = -1;
242  uid_t anonuid = -1;
243  gid_t anongid = -1;
244 
245  GF_ASSERT(svc);
247 
248  ret = dict_get_str_boolean(options, "root-squash", 0);
249  if (ret != -1)
250  svc->root_squash = ret;
251  else
252  svc->root_squash = _gf_false;
253 
254  ret = dict_get_uint32(options, "anonuid", &anonuid);
255  if (!ret)
256  svc->anonuid = anonuid;
257  else
258  svc->anonuid = RPC_NOBODY_UID;
259 
260  ret = dict_get_uint32(options, "anongid", &anongid);
261  if (!ret)
262  svc->anongid = anongid;
263  else
264  svc->anongid = RPC_NOBODY_GID;
265 
266  if (svc->root_squash)
268  "root squashing enabled "
269  "(uid=%d, gid=%d)",
270  svc->anonuid, svc->anongid);
271 
272  return 0;
273 }
274 
275 int
277 {
278  int ret = -1;
279 
280  uid_t anonuid = -1;
281  gid_t anongid = -1;
282 
283  GF_ASSERT(svc);
285 
286  ret = dict_get_str_boolean(options, "all-squash", 0);
287  if (ret != -1)
288  svc->all_squash = ret;
289  else
290  svc->all_squash = _gf_false;
291 
292  ret = dict_get_uint32(options, "anonuid", &anonuid);
293  if (!ret)
294  svc->anonuid = anonuid;
295  else
296  svc->anonuid = RPC_NOBODY_UID;
297 
298  ret = dict_get_uint32(options, "anongid", &anongid);
299  if (!ret)
300  svc->anongid = anongid;
301  else
302  svc->anongid = RPC_NOBODY_GID;
303 
304  if (svc->all_squash)
306  "all squashing enabled "
307  "(uid=%d, gid=%d)",
308  svc->anonuid, svc->anongid);
309 
310  return 0;
311 }
312 
313 int
315 {
316  int ret = -1;
317 
318  if ((!svc) || (!options))
319  return -1;
320 
322  (void)rpcsvc_set_root_squash(svc, options);
323  (void)rpcsvc_set_all_squash(svc, options);
325  ret = rpcsvc_auth_add_initers(svc);
326  if (ret == -1) {
327  gf_log(GF_RPCSVC, GF_LOG_ERROR, "Failed to add initers");
328  goto out;
329  }
330 
331  ret = rpcsvc_auth_init_auths(svc, options);
332  if (ret == -1) {
333  gf_log(GF_RPCSVC, GF_LOG_ERROR, "Failed to init auth schemes");
334  goto out;
335  }
336 
337 out:
338  return ret;
339 }
340 
341 int
343 {
344  int ret = 0;
345 
346  if ((!svc) || (!options))
347  return (-1);
348 
350  if (ret)
351  return (-1);
352 
353  ret = rpcsvc_set_root_squash(svc, options);
354  if (ret)
355  return (-1);
356 
357  ret = rpcsvc_set_all_squash(svc, options);
358  if (ret)
359  return (-1);
360 
361  return rpcsvc_set_addr_namelookup(svc, options);
362 }
363 
366 {
367  struct rpcsvc_auth_list *auth = NULL;
368  struct rpcsvc_auth_list *tmp = NULL;
369  rpcsvc_t *svc = NULL;
370 
371  if (!req)
372  return NULL;
373 
374  svc = req->svc;
375  if (!svc) {
376  gf_log(GF_RPCSVC, GF_LOG_ERROR, "!svc");
377  goto err;
378  }
379 
380  if (list_empty(&svc->authschemes)) {
381  gf_log(GF_RPCSVC, GF_LOG_WARNING, "No authentication!");
382  goto err;
383  }
384 
386  {
387  if (!auth->enable)
388  continue;
389  if (auth->auth->authnum == req->cred.flavour)
390  goto err;
391  }
392 
393  auth = NULL;
394 err:
395  if (auth)
396  return auth->auth;
397  else
398  return NULL;
399 }
400 
403 {
404  rpcsvc_auth_t *auth = NULL;
405 
407  if (auth)
408  goto ret;
409 
410  gf_log(GF_RPCSVC, GF_LOG_TRACE, "No auth handler: %d", req->cred.flavour);
411 
412  /* The requested scheme was not available so fall back the to one
413  * scheme that will always be present.
414  */
415  req->cred.flavour = AUTH_NULL;
416  req->verf.flavour = AUTH_NULL;
418 ret:
419  return auth;
420 }
421 
422 int
423 rpcsvc_auth_request_init(rpcsvc_request_t *req, struct rpc_msg *callmsg)
424 {
425  int32_t ret = 0;
426  rpcsvc_auth_t *auth = NULL;
427 
428  if (!req || !callmsg) {
429  ret = -1;
430  goto err;
431  }
432 
433  req->cred.flavour = rpc_call_cred_flavour(callmsg);
434  req->cred.datalen = rpc_call_cred_len(callmsg);
435  req->verf.flavour = rpc_call_verf_flavour(callmsg);
436  req->verf.datalen = rpc_call_verf_len(callmsg);
437 
439  if (!auth) {
440  ret = -1;
441  goto err;
442  }
443 
444  gf_log(GF_RPCSVC, GF_LOG_TRACE, "Auth handler: %s", auth->authname);
445 
446  if (auth->authops->request_init)
447  ret = auth->authops->request_init(req, auth->authprivate);
448 
449  /* reset to auxgidlarge during
450  unsersialize if necessary */
451  req->auxgids = req->auxgidsmall;
452  req->auxgidlarge = NULL;
453 err:
454  return ret;
455 }
456 
457 int
459 {
460  int ret = RPCSVC_AUTH_REJECT;
461  rpcsvc_auth_t *auth = NULL;
462  int minauth = 0;
463 
464  if (!req)
465  return ret;
466 
467  /* FIXME use rpcsvc_request_prog_minauth() */
468  minauth = 0;
469  if (minauth > rpcsvc_request_cred_flavour(req)) {
470  gf_log(GF_RPCSVC, GF_LOG_WARNING, "Auth too weak");
471  rpcsvc_request_set_autherr(req, AUTH_TOOWEAK);
472  goto err;
473  }
474 
476  if (!auth) {
477  gf_log(GF_RPCSVC, GF_LOG_WARNING, "No auth handler found");
478  goto err;
479  }
480 
481  if (auth->authops->authenticate)
482  ret = auth->authops->authenticate(req, auth->authprivate);
483 
484 err:
485  return ret;
486 }
487 
488 int
489 rpcsvc_auth_array(rpcsvc_t *svc, char *volname, int *autharr, int arrlen)
490 {
491  int count = 0;
492  int result = RPCSVC_AUTH_REJECT;
493  char *srchstr = NULL;
494  int ret = 0;
495 
496  struct rpcsvc_auth_list *auth = NULL;
497  struct rpcsvc_auth_list *tmp = NULL;
498 
499  if ((!svc) || (!autharr) || (!volname))
500  return -1;
501 
502  memset(autharr, 0, arrlen * sizeof(int));
503  if (list_empty(&svc->authschemes)) {
504  gf_log(GF_RPCSVC, GF_LOG_ERROR, "No authentication!");
505  goto err;
506  }
507 
509  {
510  if (count >= arrlen)
511  break;
512 
513  result = gf_asprintf(&srchstr, "rpc-auth.%s.%s", auth->name, volname);
514  if (result == -1) {
515  count = -1;
516  goto err;
517  }
518 
519  ret = dict_get_str_boolean(svc->options, srchstr, 0xC00FFEE);
520  GF_FREE(srchstr);
521 
522  switch (ret) {
523  case _gf_true:
524  autharr[count] = auth->auth->authnum;
525  ++count;
526  break;
527 
528  default:
529  /* nothing to do */
530  break;
531  }
532  }
533 
534 err:
535  return count;
536 }
537 
538 gid_t *
540 {
541  if ((!req) || (!arrlen))
542  return NULL;
543 
544  /* In case of AUTH_NULL auxgids are not used */
545  switch (req->cred.flavour) {
546  case AUTH_UNIX:
547  case AUTH_GLUSTERFS:
548  case AUTH_GLUSTERFS_v2:
549  case AUTH_GLUSTERFS_v3:
550  break;
551  default:
552  gf_log("rpc", GF_LOG_DEBUG, "auth type not unix or glusterfs");
553  return NULL;
554  }
555 
556  *arrlen = req->auxgidcount;
557  if (*arrlen == 0)
558  return NULL;
559 
560  return &req->auxgids[0];
561 }
_gf_false
#define _gf_false
Definition: glusterfs.h:369
rpcsvc_auth_get_handler
rpcsvc_auth_t * rpcsvc_auth_get_handler(rpcsvc_request_t *req)
Definition: rpcsvc-auth.c:402
out
#define out(x...)
Definition: gcrawler.c:35
rpcsvc_auth_glusterfs_v2_init
rpcsvc_auth_t * rpcsvc_auth_glusterfs_v2_init(rpcsvc_t *svc, dict_t *options)
Definition: auth-glusterfs.c:249
list_add_tail
static void list_add_tail(struct list_head *new, struct list_head *head)
Definition: list.h:35
__rpcsvc_auth_get_handler
rpcsvc_auth_t * __rpcsvc_auth_get_handler(rpcsvc_request_t *req)
Definition: rpcsvc-auth.c:365
rpc_call_verf_flavour
#define rpc_call_verf_flavour(call)
Definition: xdr-rpc.h:74
rpcsvc_auth_unix_auxgids
gid_t * rpcsvc_auth_unix_auxgids(rpcsvc_request_t *req, int *arrlen)
Definition: rpcsvc-auth.c:539
rpcsvc_auth_init_auth
int rpcsvc_auth_init_auth(rpcsvc_t *svc, dict_t *options, struct rpcsvc_auth_list *authitem)
Definition: rpcsvc-auth.c:97
RPCSVC_AUTH_REJECT
#define RPCSVC_AUTH_REJECT
Definition: rpcsvc.h:549
rpcsvc_auth_ops::authenticate
auth_request_authenticate authenticate
Definition: rpcsvc.h:587
rpcsvc_request_cred_flavour
#define rpcsvc_request_cred_flavour(req)
Definition: rpcsvc.h:276
rpcsvc_auth_null_init
rpcsvc_auth_t * rpcsvc_auth_null_init(rpcsvc_t *svc, dict_t *options)
Definition: auth-null.c:37
rpcsvc_request::auxgidlarge
gid_t * auxgidlarge
Definition: rpcsvc.h:186
rpcsvc_request_set_autherr
#define rpcsvc_request_set_autherr(req, err)
Definition: rpcsvc.h:566
AUTH_GLUSTERFS_v2
@ AUTH_GLUSTERFS_v2
Definition: xdr-rpc.h:31
rpcsvc_auth_flavour_desc::authname
char authname[32]
Definition: rpcsvc.h:591
rpcsvc_state::addr_namelookup
bool addr_namelookup
Definition: rpcsvc-common.h:72
rpcsvc_auth_ops::request_init
auth_init_request request_init
Definition: rpcsvc.h:586
GF_LOG_TRACE
@ GF_LOG_TRACE
Definition: logging.h:78
GF_FREE
#define GF_FREE(free_ptr)
Definition: mem-pool.h:159
dict_get
data_t * dict_get(dict_t *this, char *key)
Definition: dict.c:544
rpcsvc_auth_unix_init
rpcsvc_auth_t * rpcsvc_auth_unix_init(rpcsvc_t *svc, dict_t *options)
Definition: auth-unix.c:63
rpcsvc_set_all_squash
int rpcsvc_set_all_squash(rpcsvc_t *svc, dict_t *options)
Definition: rpcsvc-auth.c:276
rpcsvc_set_allow_insecure
int rpcsvc_set_allow_insecure(rpcsvc_t *svc, dict_t *options)
Definition: rpcsvc-auth.c:204
rpcsvc_auth_init_auths
int rpcsvc_auth_init_auths(rpcsvc_t *svc, dict_t *options)
Definition: rpcsvc-auth.c:131
rpcsvc.h
rpcsvc_auth_list
Definition: rpcsvc.h:599
rpcsvc_request::cred
client_auth_data_t cred
Definition: rpcsvc.h:213
rpcsvc_auth_glusterfs_init
rpcsvc_auth_t * rpcsvc_auth_glusterfs_init(rpcsvc_t *svc, dict_t *options)
Definition: auth-glusterfs.c:122
gf_asprintf
int gf_asprintf(char **string_ptr, const char *format,...)
Definition: mem-pool.c:237
GF_LOG_WARNING
@ GF_LOG_WARNING
Definition: logging.h:74
INIT_LIST_HEAD
#define INIT_LIST_HEAD(head)
Definition: list.h:19
rpcsvc_authenticate
int rpcsvc_authenticate(rpcsvc_request_t *req)
Definition: rpcsvc-auth.c:458
gf_boolean_t
#define gf_boolean_t
Definition: glusterfs.h:368
rpcsvc_state::anonuid
uid_t anonuid
Definition: rpcsvc-common.h:48
GF_LOG_DEBUG
@ GF_LOG_DEBUG
Definition: logging.h:77
RPC_NOBODY_UID
#define RPC_NOBODY_UID
Definition: rpcsvc.h:59
rpcsvc_auth_flavour_desc::authnum
int authnum
Definition: rpcsvc.h:594
rpcsvc_state::allow_insecure
bool allow_insecure
Definition: rpcsvc-common.h:76
rpcsvc_state::root_squash
bool root_squash
Definition: rpcsvc-common.h:78
rpcsvc_auth_init
int rpcsvc_auth_init(rpcsvc_t *svc, dict_t *options)
Definition: rpcsvc-auth.c:314
gf_string2boolean
int gf_string2boolean(const char *str, bool *b)
Definition: common-utils.c:1922
list_head
Definition: list.h:14
rpcsvc_auth_add_initers
int rpcsvc_auth_add_initers(rpcsvc_t *svc)
Definition: rpcsvc-auth.c:49
rpcsvc_auth_initer_t
void *(* rpcsvc_auth_initer_t)(rpcsvc_t *svc, dict_t *options)
Definition: rpcsvc.h:597
rpcsvc_state::all_squash
bool all_squash
Definition: rpcsvc-common.h:79
client_auth_data::flavour
int flavour
Definition: client_t.h:24
dict_get_str
int dict_get_str(dict_t *this, char *key, char **str)
Definition: dict.c:2385
client_auth_data::datalen
int datalen
Definition: client_t.h:25
list_empty
static int list_empty(struct list_head *head)
Definition: list.h:104
rpcsvc_set_addr_namelookup
int rpcsvc_set_addr_namelookup(rpcsvc_t *svc, dict_t *options)
Definition: rpcsvc-auth.c:181
rpcsvc_auth_request_init
int rpcsvc_auth_request_init(rpcsvc_request_t *req, struct rpc_msg *callmsg)
Definition: rpcsvc-auth.c:423
rpcsvc_request
Definition: rpcsvc.h:155
rpcsvc_auth_reconf
int rpcsvc_auth_reconf(rpcsvc_t *svc, dict_t *options)
Definition: rpcsvc-auth.c:342
rpcsvc_state::authschemes
struct list_head authschemes
Definition: rpcsvc-common.h:43
RPC_NOBODY_GID
#define RPC_NOBODY_GID
Definition: rpcsvc.h:60
rpcsvc_state::options
dict_t * options
Definition: rpcsvc-common.h:46
rpcsvc_auth_flavour_desc::authprivate
void * authprivate
Definition: rpcsvc.h:593
gf_common_mt_rpcsvc_auth_list
@ gf_common_mt_rpcsvc_auth_list
Definition: mem-types.h:47
gf_log
#define gf_log(dom, level, fmt...)
Definition: logging.h:282
AUTH_GLUSTERFS
@ AUTH_GLUSTERFS
Definition: xdr-rpc.h:30
rpcsvc_request::auxgidcount
int auxgidcount
Definition: rpcsvc.h:187
rpc_call_cred_len
#define rpc_call_cred_len(call)
Definition: xdr-rpc.h:71
rpcsvc_request::auxgids
gid_t * auxgids
Definition: rpcsvc.h:184
rpcsvc_auth_list::name
char name[32]
Definition: rpcsvc.h:609
GF_LOG_ERROR
@ GF_LOG_ERROR
Definition: logging.h:73
rpcsvc_request::svc
rpcsvc_t * svc
Definition: rpcsvc.h:159
rpcsvc_auth_flavour_desc
Definition: rpcsvc.h:590
rpcsvc_set_root_squash
int rpcsvc_set_root_squash(rpcsvc_t *svc, dict_t *options)
Definition: rpcsvc-auth.c:239
GF_RPCSVC
#define GF_RPCSVC
Definition: rpcsvc.h:47
options
static struct argp_option options[]
Definition: glfs-bm.c:322
rpcsvc_auth_list::auth
rpcsvc_auth_t * auth
Definition: rpcsvc.h:610
rpcsvc_state::anongid
gid_t anongid
Definition: rpcsvc-common.h:49
dict.h
dict_set_str
int dict_set_str(dict_t *this, char *key, char *str)
Definition: dict.c:2410
rpcsvc_request::verf
client_auth_data_t verf
Definition: rpcsvc.h:220
rpcsvc_auth_list::init
rpcsvc_auth_initer_t init
Definition: rpcsvc.h:601
AUTH_GLUSTERFS_v3
@ AUTH_GLUSTERFS_v3
Definition: xdr-rpc.h:33
rpcsvc_request::auxgidsmall
gid_t auxgidsmall[128]
Definition: rpcsvc.h:185
rpcsvc_state
Definition: rpcsvc-common.h:35
list_for_each_entry_safe
#define list_for_each_entry_safe(pos, n, head, member)
Definition: list.h:240
_dict
Definition: dict.h:114
GF_CALLOC
#define GF_CALLOC(nmemb, size, type)
Definition: mem-pool.h:153
dict_get_str_boolean
int dict_get_str_boolean(dict_t *this, char *key, int default_val)
Definition: dict.c:2781
GF_ASSERT
#define GF_ASSERT(x)
Definition: common-utils.h:434
_gf_true
#define _gf_true
Definition: glusterfs.h:370
init
int init(xlator_t *this)
Definition: glfs-master.c:133
dict_get_uint32
int dict_get_uint32(dict_t *this, char *key, uint32_t *val)
Definition: dict.c:1946
err
#define err(x...)
Definition: gcrawler.c:34
rpc_call_cred_flavour
#define rpc_call_cred_flavour(call)
Definition: xdr-rpc.h:69
rpcsvc_auth_glusterfs_v3_init
rpcsvc_auth_t * rpcsvc_auth_glusterfs_v3_init(rpcsvc_t *svc, dict_t *options)
Definition: auth-glusterfs.c:383
rpcsvc_auth_list::enable
int enable
Definition: rpcsvc.h:611
rpcsvc_auth_add_initer
int rpcsvc_auth_add_initer(struct list_head *list, char *idfier, rpcsvc_auth_initer_t init)
Definition: rpcsvc-auth.c:28
rpcsvc_auth_flavour_desc::authops
rpcsvc_auth_ops_t * authops
Definition: rpcsvc.h:592
rpcsvc_auth_array
int rpcsvc_auth_array(rpcsvc_t *svc, char *volname, int *autharr, int arrlen)
Definition: rpcsvc-auth.c:489
rpc_call_verf_len
#define rpc_call_verf_len(call)
Definition: xdr-rpc.h:76
rpcsvc_auth_list::authlist
struct list_head authlist
Definition: rpcsvc.h:600