## range of s is servers
## retrieve (name = s.#name, type = s.acl_type, id1 = s.acl_id) {
strtrim(type);
- if (!strcmp(type, "USER") && !hash_lookup(users, id1))
- printf("Service %s has acl non-existant user %d\n", name, id1);
- else if (!strcmp(type, "LIST") && !hash_lookup(lists, id1))
- printf("Service %s has acl non-existant list %d\n", name, id1);
+ if (!strcmp(type, "USER") && !hash_lookup(users, id1)) {
+ printf("Service %s has acl non-existant user %d\n", name, id1);
+ printf("Not fixing this error\n");
+ } else if (!strcmp(type, "LIST") && !hash_lookup(lists, id1)) {
+ printf("Service %s has acl non-existant list %d\n", name, id1);
+ printf("Not fixing this error\n");
+ }
## }
dprintf("Checking servershosts...\n");
## range of h is hostaccess
## retrieve (id1 = h.mach_id, type = h.acl_type, id2 = h.acl_id) {
strtrim(type);
- if (!hash_lookup(machines, id1))
- printf("Hostaccess for non-existant host %d\n", id1);
- if (!strcmp(type, "USER") && !hash_lookup(users, id2))
- printf("Hostaccess for %d is non-existant user %d\n", id1, id2);
- else if (!strcmp(type, "LIST") && !hash_lookup(lists, id2))
- printf("Hostaccess for %d is non-existant list %d\n", id1, id2);
+ if (!hash_lookup(machines, id1)) {
+ printf("Hostaccess for non-existant host %d\n", id1);
+ printf("Not fixing this error\n");
+ }
+ if (!strcmp(type, "USER") && !hash_lookup(users, id2)) {
+ printf("Hostaccess for %d is non-existant user %d\n", id1, id2);
+ printf("Not fixing this error\n");
+ } else if (!strcmp(type, "LIST") && !hash_lookup(lists, id2)) {
+ printf("Hostaccess for %d is non-existant list %d\n", id1, id2);
+ printf("Not fixing this error\n");
+ }
## }
dprintf("Checking capacls...\n");
## retrieve (id1 = capacls.list_id, name = capacls.tag) {
- if (!hash_lookup(lists, id1))
- printf("Capacl for %s is non-existant list %d\n", name, id1);
+ if (!hash_lookup(lists, id1)) {
+ printf("Capacl for %s is non-existant list %d\n", name, id1);
+ printf("Not fixing this error\n");
+ }
## }
##}
##{
printf("Phase 3 - Finding unused objects\n");
- dprintf("Checking machines...\n");
- hash_step(machines, noclu_mach_check, NULL);
+ if (warn) {
+ dprintf("Checking machines...\n");
+ hash_step(machines, noclu_mach_check, NULL);
- dprintf("Checking lists...\n");
- hash_step(lists, empty_list_check, NULL);
+ dprintf("Checking lists...\n");
+ hash_step(lists, empty_list_check, NULL);
+ }
dprintf("Checking strings...\n");
hash_step(strings, unref_string_check, NULL);