Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Computation  at acl-backend-vfile.c:804

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

acl_backend_vfile_object_refresh_cache

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/plugins/acl/acl-backend-vfile.c)expand/collapse
Show more  
 787  static int acl_backend_vfile_object_refresh_cache(struct acl_object *_aclobj)
 788  {
 789          struct acl_object_vfile *aclobj = (struct acl_object_vfile *)_aclobj;
 790          struct acl_backend_vfile *backend =
 791                  (struct acl_backend_vfile *)_aclobj->backend;
 792          struct acl_backend_vfile_validity *old_validity;
 793          struct acl_backend_vfile_validity validity;
 794          time_t mtime;
 795          int ret;
 796   
 797          old_validity = acl_cache_get_validity(_aclobj->backend->cache,
 798                                                _aclobj->name);
 799          ret = acl_backend_vfile_refresh(_aclobj, aclobj->global_path,
 800                                          old_validity == NULL ? NULL :
 801                                          &old_validity->global_validity);
 802          if (ret == 0) {
 803                  ret = acl_backend_vfile_refresh(_aclobj, aclobj->local_path,
 804                                                  old_validity == NULL ? NULL :
 805                                                  &old_validity->local_validity);
 806          }
 807          if (ret <= 0)
 808                  return ret;
 809   
 810          /* either global or local ACLs changed, need to re-read both */
 811          if (!array_is_created(&aclobj->rights)) {
 812                  aclobj->rights_pool =
 813                          pool_alloconly_create("acl rights", 256);
 814                  i_array_init(&aclobj->rights, 16);
 815          } else {
 816                  array_clear(&aclobj->rights);
 817                  p_clear(aclobj->rights_pool);
 818          }
 819   
 820          memset(&validity, 0, sizeof(validity));
 821          if (acl_backend_vfile_read_with_retry(aclobj, TRUE, aclobj->global_path,
 822                                                &validity.global_validity) < 0)
 823                  return -1;
 824          if (acl_backend_vfile_read_with_retry(aclobj, FALSE, aclobj->local_path,
 825                                                &validity.local_validity) < 0)
 826                  return -1;
 827   
 828          acl_backend_vfile_rights_sort(aclobj);
 829          /* update cache only after we've successfully read everything */
 830          acl_backend_vfile_cache_rebuild(aclobj);
 831          acl_cache_set_validity(_aclobj->backend->cache,
 832                                 _aclobj->name, &validity);
 833   
 834          if (acl_backend_vfile_object_get_mtime(_aclobj, &mtime) == 0)
 835                  acl_backend_vfile_acllist_verify(backend, _aclobj->name, mtime);
 836          return 0;
 837  }
Show more  




Change Warning 8048.25492 : Unreachable Computation

Priority:
State:
Finding:
Owner:
Note: