There was false restriction in smack_cipso_add_from_file() that
disallowed CIPSO labels without categories.
For example, this example given in the SMACK kernel documentation
should be perfectly legal:
TopSecret 7
(cherry picked from commit
4e4ea9142727ca7f14bf1d64cd81949b28bb1d0b)
label = strtok_r(buf, " \t\n", &ptr);
level = strtok_r(NULL, " \t\n", &ptr);
cat = strtok_r(NULL, " \t\n", &ptr);
- if (label == NULL || cat == NULL || level == NULL ||
+ if (label == NULL || level == NULL ||
strlen(label) > SMACK_LABEL_LEN) {
errno = EINVAL;
goto err_out;