Lines Matching defs:str
47 format_who(char *str, size_t size, const acl_entry_t entry, int numeric)
61 snprintf(str, size, "owner@");
74 snprintf(str, size, "user:%d", (unsigned int)*id);
76 snprintf(str, size, "user:%s", pwd->pw_name);
80 snprintf(str, size, "group@");
93 snprintf(str, size, "group:%d", (unsigned int)*id);
95 snprintf(str, size, "group:%s", grp->gr_name);
99 snprintf(str, size, "everyone@");
110 format_entry_type(char *str, size_t size, const acl_entry_t entry)
121 snprintf(str, size, "allow");
124 snprintf(str, size, "deny");
127 snprintf(str, size, "audit");
130 snprintf(str, size, "alarm");
140 format_additional_id(char *str, size_t size, const acl_entry_t entry)
154 str[0] = '\0';
161 snprintf(str, size, ":%d", (unsigned int)*id);
168 format_entry(char *str, size_t size, const acl_entry_t entry, int flags)
193 off += snprintf(str + off, size - off, "%*s:", len, buf);
199 off += snprintf(str + off, size - off, "%s:", buf);
205 off += snprintf(str + off, size - off, "%s:", buf);
210 off += snprintf(str + off, size - off, "%s", buf);
216 off += snprintf(str + off, size - off, "%s", buf);
219 off += snprintf(str + off, size - off, "\n");
231 char *str;
238 str = malloc(size);
239 if (str == NULL)
247 error = format_entry(str + off, size - off, entry, flags);
249 free(str);
254 off = strlen(str);
258 str[off] = '\0';
263 return (str);