diff options
author | David Lamparter <equinox@diac24.net> | 2019-08-13 15:47:23 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2019-09-03 17:18:35 +0200 |
commit | 0cf6db21eca516d825431d4a747748a94c890aad (patch) | |
tree | 9cd6d2fa6df5f91024a4edc160d4c759bd93d942 /lib/privs.h | |
parent | tools: extend checkpatch.pl for frr_{with,each} (diff) | |
download | frr-0cf6db21eca516d825431d4a747748a94c890aad.tar.xz frr-0cf6db21eca516d825431d4a747748a94c890aad.zip |
*: frr_elevate_privs -> frr_with_privs
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/privs.h')
-rw-r--r-- | lib/privs.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/privs.h b/lib/privs.h index 2b0b44b3f..db5707d67 100644 --- a/lib/privs.h +++ b/lib/privs.h @@ -109,16 +109,16 @@ extern void zprivs_get_ids(struct zprivs_ids_t *); /* * Wrapper around zprivs, to be used as: - * frr_elevate_privs(&privs) { + * frr_with_privs(&privs) { * ... code ... * if (error) * break; -- break can be used to get out of the block * ... code ... * } * - * The argument to frr_elevate_privs() can be NULL to leave privileges as-is + * The argument to frr_with_privs() can be NULL to leave privileges as-is * (mostly useful for conditional privilege-raising, i.e.:) - * frr_elevate_privs(cond ? &privs : NULL) {} + * frr_with_privs(cond ? &privs : NULL) {} * * NB: The code block is always executed, regardless of whether privileges * could be raised or not, or whether NULL was given or not. This is fully @@ -138,7 +138,7 @@ extern struct zebra_privs_t *_zprivs_raise(struct zebra_privs_t *privs, const char *funcname); extern void _zprivs_lower(struct zebra_privs_t **privs); -#define frr_elevate_privs(privs) \ +#define frr_with_privs(privs) \ for (struct zebra_privs_t *_once = NULL, \ *_privs __attribute__( \ (unused, cleanup(_zprivs_lower))) = \ |