X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/1f2f436a38f7ae2d39a943ad2898d8fed4ed2e58..HEAD:/posix1e/acl_translate.c diff --git a/posix1e/acl_translate.c b/posix1e/acl_translate.c index 41bbe21..57cb01f 100644 --- a/posix1e/acl_translate.c +++ b/posix1e/acl_translate.c @@ -227,6 +227,7 @@ static struct { {ACL_READ_SECURITY, "readsecurity", ACL_TYPE_FILE | ACL_TYPE_DIR}, {ACL_WRITE_SECURITY, "writesecurity", ACL_TYPE_FILE | ACL_TYPE_DIR}, {ACL_CHANGE_OWNER, "chown", ACL_TYPE_FILE | ACL_TYPE_DIR}, + {ACL_SYNCHRONIZE, "synchronize", ACL_TYPE_FILE | ACL_TYPE_DIR}, {0, NULL, 0} }; @@ -248,7 +249,6 @@ static struct { /* * reallocing snprintf with offset */ - static int raosnprintf(char **buf, size_t *size, ssize_t *offset, char *fmt, ...) { @@ -349,7 +349,7 @@ acl_from_text(const char *buf_p) */ field = strsep(&entry, " "); errno = 0; - if (!*field || strtol(field, NULL, 0) != 1) + if (field == NULL || !*field || strtol(field, NULL, 0) != 1) { error = EINVAL; goto exit; @@ -443,7 +443,7 @@ acl_from_text(const char *buf_p) /* field 2: */ if ((field = strsep(&entry, ":")) != NULL && *field) { - mbr_string_to_uuid(field, *uu); + uuid_parse(field, *uu); need_tag = 0; } @@ -698,8 +698,8 @@ acl_to_text(acl_t acl, ssize_t *len_p) } } } - buf[(*len_p)++] = '\n'; - buf[(*len_p)] = 0; + + if(!raosnprintf(&buf, &bufsize, len_p, "\n")) goto err_nomem; return buf; err_nomem: