Lines Matching refs:error

147 	int error = IDMAP_ERR_NORESULT;  in getsidname()  local
159 error = idmap_getwinnamebyuid(who, in getsidname()
162 error = idmap_getwinnamebygid(who, in getsidname()
165 if (error != IDMAP_SUCCESS) { in getsidname()
168 error = idmap_get_sidbyuid(get_hdl, who, in getsidname()
172 error = idmap_get_sidbygid(get_hdl, who, in getsidname()
175 if (error == IDMAP_SUCCESS && in getsidname()
335 int error; in aclent_type_txt() local
341 error = str_append(dstr, "user::"); in aclent_type_txt()
343 error = str_append(dstr, "defaultuser::"); in aclent_type_txt()
349 error = str_append(dstr, "user:"); in aclent_type_txt()
351 error = str_append(dstr, "defaultuser:"); in aclent_type_txt()
352 if (error) in aclent_type_txt()
354 error = str_append(dstr, pruname(aclp->a_id, idp, in aclent_type_txt()
356 if (error == 0) in aclent_type_txt()
357 error = str_append(dstr, ":"); in aclent_type_txt()
363 error = str_append(dstr, "group::"); in aclent_type_txt()
365 error = str_append(dstr, "defaultgroup::"); in aclent_type_txt()
371 error = str_append(dstr, "group:"); in aclent_type_txt()
373 error = str_append(dstr, "defaultgroup:"); in aclent_type_txt()
374 if (error) in aclent_type_txt()
376 error = str_append(dstr, prgname(aclp->a_id, idp, in aclent_type_txt()
378 if (error == 0) in aclent_type_txt()
379 error = str_append(dstr, ":"); in aclent_type_txt()
385 error = str_append(dstr, "mask:"); in aclent_type_txt()
387 error = str_append(dstr, "defaultmask:"); in aclent_type_txt()
393 error = str_append(dstr, "other:"); in aclent_type_txt()
395 error = str_append(dstr, "defaultother:"); in aclent_type_txt()
399 error = 1; in aclent_type_txt()
403 return (error); in aclent_type_txt()
413 int error; in ace_type_txt() local
418 error = str_append(dynstr, OWNERAT_TXT); in ace_type_txt()
422 error = str_append(dynstr, GROUPAT_TXT); in ace_type_txt()
427 if (error = str_append(dynstr, in ace_type_txt()
430 if (error = getsidname(acep->a_who, B_FALSE, in ace_type_txt()
433 error = str_append(dynstr, sidp); in ace_type_txt()
435 if (error = str_append(dynstr, GROUP_TXT)) in ace_type_txt()
437 error = str_append(dynstr, prgname(acep->a_who, idp, in ace_type_txt()
440 if (error == 0) in ace_type_txt()
441 error = str_append(dynstr, ":"); in ace_type_txt()
445 error = str_append(dynstr, EVERYONEAT_TXT); in ace_type_txt()
450 if (error = str_append(dynstr, USERSID_TXT)) in ace_type_txt()
452 if (error = getsidname(acep->a_who, B_TRUE, in ace_type_txt()
455 error = str_append(dynstr, sidp); in ace_type_txt()
457 if (error = str_append(dynstr, USER_TXT)) in ace_type_txt()
459 error = str_append(dynstr, pruname(acep->a_who, idp, in ace_type_txt()
462 if (error == 0) in ace_type_txt()
463 error = str_append(dynstr, ":"); in ace_type_txt()
466 error = 0; in ace_type_txt()
472 return (error); in ace_type_txt()
485 int error = 0; in ace_perm_txt() local
548 error = str_append(dstr, buf); in ace_perm_txt()
558 error = str_append(dstr, in ace_perm_txt()
561 error = in ace_perm_txt()
565 if (error == 0 && (mask & ACE_ADD_FILE)) { in ace_perm_txt()
567 error = in ace_perm_txt()
570 error = in ace_perm_txt()
574 if (error == 0 && (mask & ACE_ADD_SUBDIRECTORY)) { in ace_perm_txt()
576 error = str_append(dstr, in ace_perm_txt()
579 error = str_append(dstr, in ace_perm_txt()
585 error = str_append(dstr, READ_DATA_TXT); in ace_perm_txt()
587 if (error == 0 && (mask & ACE_WRITE_DATA)) { in ace_perm_txt()
588 error = str_append(dstr, WRITE_DATA_TXT); in ace_perm_txt()
590 if (error == 0 && (mask & ACE_APPEND_DATA)) { in ace_perm_txt()
591 error = str_append(dstr, APPEND_DATA_TXT); in ace_perm_txt()
594 if (error == 0 && (mask & ACE_READ_NAMED_ATTRS)) { in ace_perm_txt()
595 error = str_append(dstr, READ_XATTR_TXT); in ace_perm_txt()
597 if (error == 0 && (mask & ACE_WRITE_NAMED_ATTRS)) { in ace_perm_txt()
598 error = str_append(dstr, WRITE_XATTR_TXT); in ace_perm_txt()
600 if (error == 0 && (mask & ACE_EXECUTE)) { in ace_perm_txt()
601 error = str_append(dstr, EXECUTE_TXT); in ace_perm_txt()
603 if (error == 0 && (mask & ACE_DELETE_CHILD)) { in ace_perm_txt()
604 error = str_append(dstr, DELETE_CHILD_TXT); in ace_perm_txt()
606 if (error == 0 && (mask & ACE_READ_ATTRIBUTES)) { in ace_perm_txt()
607 error = str_append(dstr, READ_ATTRIBUTES_TXT); in ace_perm_txt()
609 if (error == 0 && (mask & ACE_WRITE_ATTRIBUTES)) { in ace_perm_txt()
610 error = str_append(dstr, WRITE_ATTRIBUTES_TXT); in ace_perm_txt()
612 if (error == 0 && (mask & ACE_DELETE)) { in ace_perm_txt()
613 error = str_append(dstr, DELETE_TXT); in ace_perm_txt()
615 if (error == 0 && (mask & ACE_READ_ACL)) { in ace_perm_txt()
616 error = str_append(dstr, READ_ACL_TXT); in ace_perm_txt()
618 if (error == 0 && (mask & ACE_WRITE_ACL)) { in ace_perm_txt()
619 error = str_append(dstr, WRITE_ACL_TXT); in ace_perm_txt()
621 if (error == 0 && (mask & ACE_WRITE_OWNER)) { in ace_perm_txt()
622 error = str_append(dstr, WRITE_OWNER_TXT); in ace_perm_txt()
624 if (error == 0 && (mask & ACE_SYNCHRONIZE)) { in ace_perm_txt()
625 error = str_append(dstr, SYNCHRONIZE_TXT); in ace_perm_txt()
627 if (error == 0 && dstr->d_aclexport[dstr->d_pos-1] == '/') { in ace_perm_txt()
630 if (error == 0) in ace_perm_txt()
631 error = str_append(dstr, ":"); in ace_perm_txt()
633 return (error); in ace_perm_txt()
642 int error; in ace_access_txt() local
645 error = str_append(dstr, ALLOW_TXT); in ace_access_txt()
647 error = str_append(dstr, DENY_TXT); in ace_access_txt()
649 error = str_append(dstr, AUDIT_TXT); in ace_access_txt()
651 error = str_append(dstr, ALARM_TXT); in ace_access_txt()
653 error = str_append(dstr, UNKNOWN_TXT); in ace_access_txt()
655 return (error); in ace_access_txt()
661 int error = 0; in ace_inherit_txt() local
696 error = str_append(dstr, buf); in ace_inherit_txt()
699 error = str_append(dstr, FILE_INHERIT_TXT); in ace_inherit_txt()
701 if (error == 0 && (iflags & ACE_DIRECTORY_INHERIT_ACE)) { in ace_inherit_txt()
702 error = str_append(dstr, DIR_INHERIT_TXT); in ace_inherit_txt()
704 if (error == 0 && (iflags & ACE_NO_PROPAGATE_INHERIT_ACE)) { in ace_inherit_txt()
705 error = str_append(dstr, NO_PROPAGATE_TXT); in ace_inherit_txt()
707 if (error == 0 && (iflags & ACE_INHERIT_ONLY_ACE)) { in ace_inherit_txt()
708 error = str_append(dstr, INHERIT_ONLY_TXT); in ace_inherit_txt()
710 if (error == 0 && (iflags & ACE_SUCCESSFUL_ACCESS_ACE_FLAG)) { in ace_inherit_txt()
711 error = str_append(dstr, SUCCESSFUL_ACCESS_TXT); in ace_inherit_txt()
713 if (error == 0 && (iflags & ACE_FAILED_ACCESS_ACE_FLAG)) { in ace_inherit_txt()
714 error = str_append(dstr, FAILED_ACCESS_TXT); in ace_inherit_txt()
716 if (error == 0 && (iflags & ACE_INHERITED_ACE)) { in ace_inherit_txt()
717 error = str_append(dstr, INHERITED_ACE_TXT); in ace_inherit_txt()
719 if (error == 0 && dstr->d_aclexport[dstr->d_pos-1] == '/') { in ace_inherit_txt()
721 error = str_append(dstr, ":"); in ace_inherit_txt()
725 return (error); in ace_inherit_txt()
765 int error = 0; in aclent_acltotext() local
780 if (error = aclent_type_txt(dstr, aclp, flags)) in aclent_acltotext()
782 if (error = aclent_perm_txt(dstr, aclp->a_perm)) in aclent_acltotext()
790 if (error = str_append(dstr, ":")) in aclent_acltotext()
794 if (error = str_append(dstr, idstr)) in aclent_acltotext()
798 if (error = str_append(dstr, ",")) in aclent_acltotext()
801 if (error) { in aclent_acltotext()
823 int error; in aclfromtext() local
825 error = acl_fromtext(aclstr, &aclp); in aclfromtext()
826 if (error) in aclfromtext()
915 int error = 0; in ace_acltotext() local
936 if (error = ace_type_txt(dstr, aclp, flags)) in ace_acltotext()
938 if (error = ace_perm_txt(dstr, aclp->a_access_mask, in ace_acltotext()
941 if (error = ace_inherit_txt(dstr, aclp->a_flags, flags)) in ace_acltotext()
943 if (error = ace_access_txt(dstr, aclp->a_type)) in ace_acltotext()
952 if (error = str_append(dstr, ":")) in ace_acltotext()
959 error = getsidname(aclp->a_who, in ace_acltotext()
963 if (error) in ace_acltotext()
973 if (error = str_append(dstr, idstr)) in ace_acltotext()
981 if (error = str_append(dstr, ",")) in ace_acltotext()
988 if (error) { in ace_acltotext()
1021 int error; in acl_fromtext() local
1033 error = yyparse(); in acl_fromtext()
1037 if (error == 0) in acl_fromtext()
1046 return (error); in acl_fromtext()
1052 int error; in acl_parse() local
1055 error = acl_fromtext(acltextp, aclp); in acl_parse()
1057 return (error); in acl_parse()
1322 int error; in compute_ace_perms() local
1327 error = compute_values(ace_perm_table, ACE_PERM_COUNT, in compute_ace_perms()
1330 if (error && positional) { in compute_ace_perms()
1336 error = compute_values(ace_perm_table, in compute_ace_perms()
1339 if (error) in compute_ace_perms()
1340 error = EACL_PERM_MASK_ERROR; in compute_ace_perms()
1342 return (error); in compute_ace_perms()
1353 int error; in compute_aclent_perms() local
1360 error = compute_values(aclent_perm_table, ACLENT_PERM_COUNT, in compute_aclent_perms()
1362 if (error == 0) { in compute_aclent_perms()
1365 error = EACL_PERM_MASK_ERROR; in compute_aclent_perms()
1366 return (error); in compute_aclent_perms()
1375 int error; in ace_perm_mask() local
1387 error = compute_ace_perms(aclperm->perm_str, mask); in ace_perm_mask()
1388 if (error) { in ace_perm_mask()