*/
/*
- Copyright (C) 2004 Kern Sibbald and John Walker
+ Copyright (C) 2004-2005 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
}
+/* This version expects the length of the item which we must check. */
bool acl_access_ok(UAContext *ua, int acl, char *item, int len)
{
/* If no console resource => default console and all is permitted */
if (!ua->cons) {
- Dmsg0(400, "Root cons access OK.\n");
+ Dmsg0(1400, "Root cons access OK.\n");
return true; /* No cons resource -> root console OK for everything */
}
/* Search list for item */
for (int i=0; i<list->size(); i++) {
- if (strncasecmp(item, (char *)list->get(i), len) == 0) {
- Dmsg3(400, "Found %s in %d %s\n", item, acl, (char *)list->get(i));
+ if (strcasecmp(item, (char *)list->get(i)) == 0) {
+ Dmsg3(1400, "ACL found %s in %d %s\n", item, acl, (char *)list->get(i));
return true;
}
}