diff options
| author | Yaniv Kaul <ykaul@redhat.com> | 2020-07-16 12:58:55 +0300 | 
|---|---|---|
| committer | Ravishankar N <ravishankar@redhat.com> | 2020-07-23 04:19:43 +0000 | 
| commit | 4f89ec27fadea2ee1ab0f49c29f967e1602fafb9 (patch) | |
| tree | c35f3f475127bbe0399d70a87a64b4187c13b00d | |
| parent | 76017cf65433b7f42e6bfdc2eaddfc36685e2c61 (diff) | |
multiple xlators: wording - replace blacklist, whitelist
Replace the use of blacklist and whitelist within the code.
No functional changes.
Fixes: #1378
Change-Id: Iaa10e31c3d460f52bfd12da906789fccca5ba4d4
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
| -rw-r--r-- | xlators/nfs/server/src/nfs.c | 14 | ||||
| -rw-r--r-- | xlators/system/posix-acl/src/posix-acl.c | 10 | 
2 files changed, 12 insertions, 12 deletions
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c index cab57bbf3c9..39b73f88ac3 100644 --- a/xlators/nfs/server/src/nfs.c +++ b/xlators/nfs/server/src/nfs.c @@ -1157,7 +1157,7 @@ out:      return ret;  } -int +static int  nfs_reconfigure_state(xlator_t *this, dict_t *options)  {      int ret = 0; @@ -1167,8 +1167,8 @@ nfs_reconfigure_state(xlator_t *this, dict_t *options)      gf_boolean_t optbool;      uint32_t optuint32;      struct nfs_state *nfs = NULL; -    char *blacklist_keys[] = {"nfs.port", "nfs.transport-type", -                              "nfs.mem-factor", NULL}; +    static char *options_require_restart[] = {"nfs.port", "nfs.transport-type", +                                              "nfs.mem-factor", NULL};      GF_VALIDATE_OR_GOTO(GF_NFS, this, out);      GF_VALIDATE_OR_GOTO(GF_NFS, this->private, out); @@ -1176,14 +1176,14 @@ nfs_reconfigure_state(xlator_t *this, dict_t *options)      nfs = (struct nfs_state *)this->private; -    /* Black listed options can't be reconfigured, they need +    /* Some listed options can't be reconfigured, they need       * NFS to be restarted. There are two cases 1. SET 2. UNSET.       * 1. SET */ -    while (blacklist_keys[keyindx]) { -        if (dict_get(options, blacklist_keys[keyindx])) { +    while (options_require_restart[keyindx]) { +        if (dict_get(options, options_require_restart[keyindx])) {              gf_msg(GF_NFS, GF_LOG_ERROR, 0, NFS_MSG_RECONFIG_FAIL,                     "Reconfiguring %s needs NFS restart", -                   blacklist_keys[keyindx]); +                   options_require_restart[keyindx]);              goto out;          }          keyindx++; diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c index 77c8df5a54f..fc227364b31 100644 --- a/xlators/system/posix-acl/src/posix-acl.c +++ b/xlators/system/posix-acl/src/posix-acl.c @@ -50,8 +50,8 @@ r00t()      return conf->super_uid;  } -int -whitelisted_xattr(const char *key) +static int +allowed_xattr(const char *key)  {      if (!key)          return 0; @@ -2016,7 +2016,7 @@ int  posix_acl_getxattr(call_frame_t *frame, xlator_t *this, loc_t *loc,                     const char *name, dict_t *xdata)  { -    if (whitelisted_xattr(name)) +    if (allowed_xattr(name))          goto green;      if (acl_permits(frame, loc->inode, POSIX_ACL_READ)) @@ -2039,7 +2039,7 @@ int  posix_acl_fgetxattr(call_frame_t *frame, xlator_t *this, fd_t *fd,                      const char *name, dict_t *xdata)  { -    if (whitelisted_xattr(name)) +    if (allowed_xattr(name))          goto green;      if (acl_permits(frame, fd->inode, POSIX_ACL_READ)) @@ -2072,7 +2072,7 @@ posix_acl_removexattr(call_frame_t *frame, xlator_t *this, loc_t *loc,          goto red;      } -    if (whitelisted_xattr(name)) { +    if (allowed_xattr(name)) {          if (!frame_is_user(frame, ctx->uid)) {              op_errno = EPERM;              goto red;  | 
