Lines Matching defs:str
1487 #define update_for_len(total, len, size, str) \
1495 str += ulen; \
1500 * @str: buffer to write to. (MAY BE NULL if @size == 0)
1512 static int aa_profile_snxprint(char *str, size_t size, struct aa_ns *view,
1518 AA_BUG(!str && size != 0);
1532 return snprintf(str, size, "%s", "unconfined");
1533 return snprintf(str, size, "%s", ns_name);
1541 return snprintf(str, size, ":%s:%s (%s)", ns_name,
1543 return snprintf(str, size, "%s (%s)", profile->base.hname,
1548 return snprintf(str, size, ":%s:%s", ns_name,
1550 return snprintf(str, size, "%s", profile->base.hname);
1608 * @str: buffer to write to. (MAY BE NULL if @size == 0)
1623 int aa_label_snxprint(char *str, size_t size, struct aa_ns *ns,
1632 AA_BUG(!str && size != 0);
1637 len = snprintf(str, size, "_");
1638 update_for_len(total, len, size, str);
1646 len = snprintf(str, size, "//&");
1647 update_for_len(total, len, size, str);
1649 len = aa_profile_snxprint(str, size, ns, profile,
1652 update_for_len(total, len, size, str);
1659 return snprintf(str, size, "%s", "unconfined");
1660 return snprintf(str, size, "%s", aa_hidden_ns_name);
1667 len = snprintf(str, size, " (%s)",
1669 update_for_len(total, len, size, str);
1738 const char *str;
1752 str = name;
1754 str = (char *) label->hname;
1755 len = strlen(str);
1757 if (audit_string_contains_control(str, len))
1758 audit_log_n_hex(ab, str, len);
1760 audit_log_n_string(ab, str, len);
1772 char *str;
1775 len = aa_label_asxprint(&str, ns, label, flags, gfp);
1780 seq_puts(f, str);
1781 kfree(str);
1795 char *str;
1798 len = aa_label_asxprint(&str, ns, label, flags, gfp);
1803 pr_info("%s", str);
1804 kfree(str);
1836 static int label_count_strn_entries(const char *str, size_t n)
1838 const char *end = str + n;
1842 AA_BUG(!str);
1844 for (split = aa_label_strn_split(str, end - str);
1846 split = aa_label_strn_split(str, end - str)) {
1848 str = split + 3;
1863 const char *str, size_t n)
1865 const char *first = skipn_spaces(str, n);
1868 return aa_fqlookupn_profile(base, str, n);
1870 return aa_fqlookupn_profile(currentbase, str, n);
1876 * @str: null terminated text string (NOT NULL)
1877 * @n: length of str to parse, will stop at \0 if encountered before n
1885 struct aa_label *aa_label_strn_parse(struct aa_label *base, const char *str,
1892 const char *end = str + n;
1896 AA_BUG(!str);
1898 str = skipn_spaces(str, n);
1899 if (str == NULL || (AA_DEBUG_LABEL && *str == '_' &&
1903 len = label_count_strn_entries(str, end - str);
1904 if (*str == '&' || force_stack) {
1908 if (*str == '&')
1909 str++;
1919 for (split = aa_label_strn_split(str, end - str), i = stack;
1921 vec[i] = fqlookupn_profile(base, currbase, str, split - str);
1930 str = split + 3;
1931 split = aa_label_strn_split(str, end - str);
1935 vec[i] = fqlookupn_profile(base, currbase, str, end - str);
1967 struct aa_label *aa_label_parse(struct aa_label *base, const char *str,
1970 return aa_label_strn_parse(base, str, strlen(str), gfp, create,