diff --git a/src/main/soh.c b/src/main/soh.c index 9ea5698..e57a714 100644 --- a/src/main/soh.c +++ b/src/main/soh.c @@ -499,21 +499,23 @@ int soh_verify(REQUEST *request, VALUE_PAIR *sohvp, const uint8_t *data, unsigne case 3: /* auto updates */ s = "auto-updates"; - switch (hcstatus) { + /* The first bit of the second octet indicates if the case is by-policy (e.g. Group Policy) or not. + We ignore this bit in the switch, and then deal with it if necessary in each case */ + switch (hcstatus & 0xfffffeff) { case 1: - snprintf(vp->vp_strvalue, sizeof(vp->vp_strvalue), "%s warn disabled", s); + snprintf(vp->vp_strvalue, sizeof(vp->vp_strvalue), "%s warn disabled by-policy=%i", s, hcstatus & 0x0100 ? 1 : 0); break; case 2: - snprintf(vp->vp_strvalue, sizeof(vp->vp_strvalue), "%s ok action=check-only", s); + snprintf(vp->vp_strvalue, sizeof(vp->vp_strvalue), "%s ok action=check-only by-policy=%i", s, hcstatus & 0x0100 ? 1 : 0); break; case 3: - snprintf(vp->vp_strvalue, sizeof(vp->vp_strvalue), "%s ok action=download", s); + snprintf(vp->vp_strvalue, sizeof(vp->vp_strvalue), "%s ok action=download by-policy=%i", s, hcstatus & 0x0100 ? 1 : 0); break; case 4: - snprintf(vp->vp_strvalue, sizeof(vp->vp_strvalue), "%s ok action=install", s); + snprintf(vp->vp_strvalue, sizeof(vp->vp_strvalue), "%s ok action=install by-policy=%i", s, hcstatus & 0x0100 ? 1 : 0); break; case 5: - snprintf(vp->vp_strvalue, sizeof(vp->vp_strvalue), "%s warn unconfigured", s); + snprintf(vp->vp_strvalue, sizeof(vp->vp_strvalue), "%s warn unconfigured by-policy=%i", s, hcstatus & 0x0100 ? 1 : 0); break; case 0xc0ff0003: snprintf(vp->vp_strvalue, sizeof(vp->vp_strvalue), "%s warn service-down", s);