Lines Matching refs:error

126 	int error = IDMAP_ERR_NORESULT;  in getsidname()  local
138 error = idmap_getwinnamebyuid(who, in getsidname()
141 error = idmap_getwinnamebygid(who, in getsidname()
144 if (error != IDMAP_SUCCESS) { in getsidname()
147 error = idmap_get_sidbyuid(get_hdl, who, in getsidname()
151 error = idmap_get_sidbygid(get_hdl, who, in getsidname()
154 if (error == IDMAP_SUCCESS && in getsidname()
305 int error; in aclent_type_txt() local
311 error = str_append(dstr, "user::"); in aclent_type_txt()
313 error = str_append(dstr, "defaultuser::"); in aclent_type_txt()
319 error = str_append(dstr, "user:"); in aclent_type_txt()
321 error = str_append(dstr, "defaultuser:"); in aclent_type_txt()
322 if (error) in aclent_type_txt()
324 error = str_append(dstr, pruname(aclp->a_id, idp, in aclent_type_txt()
326 if (error == 0) in aclent_type_txt()
327 error = str_append(dstr, ":"); in aclent_type_txt()
333 error = str_append(dstr, "group::"); in aclent_type_txt()
335 error = str_append(dstr, "defaultgroup::"); in aclent_type_txt()
341 error = str_append(dstr, "group:"); in aclent_type_txt()
343 error = str_append(dstr, "defaultgroup:"); in aclent_type_txt()
344 if (error) in aclent_type_txt()
346 error = str_append(dstr, prgname(aclp->a_id, idp, in aclent_type_txt()
348 if (error == 0) in aclent_type_txt()
349 error = str_append(dstr, ":"); in aclent_type_txt()
355 error = str_append(dstr, "mask:"); in aclent_type_txt()
357 error = str_append(dstr, "defaultmask:"); in aclent_type_txt()
363 error = str_append(dstr, "other:"); in aclent_type_txt()
365 error = str_append(dstr, "defaultother:"); in aclent_type_txt()
369 error = 1; in aclent_type_txt()
373 return (error); in aclent_type_txt()
383 int error; in ace_type_txt() local
388 error = str_append(dynstr, OWNERAT_TXT); in ace_type_txt()
392 error = str_append(dynstr, GROUPAT_TXT); in ace_type_txt()
397 if (error = str_append(dynstr, in ace_type_txt()
400 if (error = getsidname(acep->a_who, B_FALSE, in ace_type_txt()
403 error = str_append(dynstr, sidp); in ace_type_txt()
405 if (error = str_append(dynstr, GROUP_TXT)) in ace_type_txt()
407 error = str_append(dynstr, prgname(acep->a_who, idp, in ace_type_txt()
410 if (error == 0) in ace_type_txt()
411 error = str_append(dynstr, ":"); in ace_type_txt()
415 error = str_append(dynstr, EVERYONEAT_TXT); in ace_type_txt()
420 if (error = str_append(dynstr, USERSID_TXT)) in ace_type_txt()
422 if (error = getsidname(acep->a_who, B_TRUE, in ace_type_txt()
425 error = str_append(dynstr, sidp); in ace_type_txt()
427 if (error = str_append(dynstr, USER_TXT)) in ace_type_txt()
429 error = str_append(dynstr, pruname(acep->a_who, idp, in ace_type_txt()
432 if (error == 0) in ace_type_txt()
433 error = str_append(dynstr, ":"); in ace_type_txt()
436 error = 0; in ace_type_txt()
442 return (error); in ace_type_txt()
455 int error = 0; in ace_perm_txt() local
518 error = str_append(dstr, buf); in ace_perm_txt()
528 error = str_append(dstr, in ace_perm_txt()
531 error = in ace_perm_txt()
535 if (error == 0 && (mask & ACE_ADD_FILE)) { in ace_perm_txt()
537 error = in ace_perm_txt()
540 error = in ace_perm_txt()
544 if (error == 0 && (mask & ACE_ADD_SUBDIRECTORY)) { in ace_perm_txt()
546 error = str_append(dstr, in ace_perm_txt()
549 error = str_append(dstr, in ace_perm_txt()
555 error = str_append(dstr, READ_DATA_TXT); in ace_perm_txt()
557 if (error == 0 && (mask & ACE_WRITE_DATA)) { in ace_perm_txt()
558 error = str_append(dstr, WRITE_DATA_TXT); in ace_perm_txt()
560 if (error == 0 && (mask & ACE_APPEND_DATA)) { in ace_perm_txt()
561 error = str_append(dstr, APPEND_DATA_TXT); in ace_perm_txt()
564 if (error == 0 && (mask & ACE_READ_NAMED_ATTRS)) { in ace_perm_txt()
565 error = str_append(dstr, READ_XATTR_TXT); in ace_perm_txt()
567 if (error == 0 && (mask & ACE_WRITE_NAMED_ATTRS)) { in ace_perm_txt()
568 error = str_append(dstr, WRITE_XATTR_TXT); in ace_perm_txt()
570 if (error == 0 && (mask & ACE_EXECUTE)) { in ace_perm_txt()
571 error = str_append(dstr, EXECUTE_TXT); in ace_perm_txt()
573 if (error == 0 && (mask & ACE_DELETE_CHILD)) { in ace_perm_txt()
574 error = str_append(dstr, DELETE_CHILD_TXT); in ace_perm_txt()
576 if (error == 0 && (mask & ACE_READ_ATTRIBUTES)) { in ace_perm_txt()
577 error = str_append(dstr, READ_ATTRIBUTES_TXT); in ace_perm_txt()
579 if (error == 0 && (mask & ACE_WRITE_ATTRIBUTES)) { in ace_perm_txt()
580 error = str_append(dstr, WRITE_ATTRIBUTES_TXT); in ace_perm_txt()
582 if (error == 0 && (mask & ACE_DELETE)) { in ace_perm_txt()
583 error = str_append(dstr, DELETE_TXT); in ace_perm_txt()
585 if (error == 0 && (mask & ACE_READ_ACL)) { in ace_perm_txt()
586 error = str_append(dstr, READ_ACL_TXT); in ace_perm_txt()
588 if (error == 0 && (mask & ACE_WRITE_ACL)) { in ace_perm_txt()
589 error = str_append(dstr, WRITE_ACL_TXT); in ace_perm_txt()
591 if (error == 0 && (mask & ACE_WRITE_OWNER)) { in ace_perm_txt()
592 error = str_append(dstr, WRITE_OWNER_TXT); in ace_perm_txt()
594 if (error == 0 && (mask & ACE_SYNCHRONIZE)) { in ace_perm_txt()
595 error = str_append(dstr, SYNCHRONIZE_TXT); in ace_perm_txt()
597 if (error == 0 && dstr->d_aclexport[dstr->d_pos-1] == '/') { in ace_perm_txt()
600 if (error == 0) in ace_perm_txt()
601 error = str_append(dstr, ":"); in ace_perm_txt()
603 return (error); in ace_perm_txt()
612 int error; in ace_access_txt() local
615 error = str_append(dstr, ALLOW_TXT); in ace_access_txt()
617 error = str_append(dstr, DENY_TXT); in ace_access_txt()
619 error = str_append(dstr, AUDIT_TXT); in ace_access_txt()
621 error = str_append(dstr, ALARM_TXT); in ace_access_txt()
623 error = str_append(dstr, UNKNOWN_TXT); in ace_access_txt()
625 return (error); in ace_access_txt()
631 int error = 0; in ace_inherit_txt() local
666 error = str_append(dstr, buf); in ace_inherit_txt()
669 error = str_append(dstr, FILE_INHERIT_TXT); in ace_inherit_txt()
671 if (error == 0 && (iflags & ACE_DIRECTORY_INHERIT_ACE)) { in ace_inherit_txt()
672 error = str_append(dstr, DIR_INHERIT_TXT); in ace_inherit_txt()
674 if (error == 0 && (iflags & ACE_NO_PROPAGATE_INHERIT_ACE)) { in ace_inherit_txt()
675 error = str_append(dstr, NO_PROPAGATE_TXT); in ace_inherit_txt()
677 if (error == 0 && (iflags & ACE_INHERIT_ONLY_ACE)) { in ace_inherit_txt()
678 error = str_append(dstr, INHERIT_ONLY_TXT); in ace_inherit_txt()
680 if (error == 0 && (iflags & ACE_SUCCESSFUL_ACCESS_ACE_FLAG)) { in ace_inherit_txt()
681 error = str_append(dstr, SUCCESSFUL_ACCESS_TXT); in ace_inherit_txt()
683 if (error == 0 && (iflags & ACE_FAILED_ACCESS_ACE_FLAG)) { in ace_inherit_txt()
684 error = str_append(dstr, FAILED_ACCESS_TXT); in ace_inherit_txt()
686 if (error == 0 && (iflags & ACE_INHERITED_ACE)) { in ace_inherit_txt()
687 error = str_append(dstr, INHERITED_ACE_TXT); in ace_inherit_txt()
689 if (error == 0 && dstr->d_aclexport[dstr->d_pos-1] == '/') { in ace_inherit_txt()
691 error = str_append(dstr, ":"); in ace_inherit_txt()
695 return (error); in ace_inherit_txt()
735 int error = 0; in aclent_acltotext() local
750 if (error = aclent_type_txt(dstr, aclp, flags)) in aclent_acltotext()
752 if (error = aclent_perm_txt(dstr, aclp->a_perm)) in aclent_acltotext()
760 if (error = str_append(dstr, ":")) in aclent_acltotext()
764 if (error = str_append(dstr, idstr)) in aclent_acltotext()
768 if (error = str_append(dstr, ",")) in aclent_acltotext()
771 if (error) { in aclent_acltotext()
793 int error; in aclfromtext() local
795 error = acl_fromtext(aclstr, &aclp); in aclfromtext()
796 if (error) in aclfromtext()
885 int error = 0; in ace_acltotext() local
906 if (error = ace_type_txt(dstr, aclp, flags)) in ace_acltotext()
908 if (error = ace_perm_txt(dstr, aclp->a_access_mask, in ace_acltotext()
911 if (error = ace_inherit_txt(dstr, aclp->a_flags, flags)) in ace_acltotext()
913 if (error = ace_access_txt(dstr, aclp->a_type)) in ace_acltotext()
922 if (error = str_append(dstr, ":")) in ace_acltotext()
929 error = getsidname(aclp->a_who, in ace_acltotext()
933 if (error) in ace_acltotext()
943 if (error = str_append(dstr, idstr)) in ace_acltotext()
951 if (error = str_append(dstr, ",")) in ace_acltotext()
958 if (error) { in ace_acltotext()
991 int error; in acl_fromtext() local
1003 error = yyparse(); in acl_fromtext()
1007 if (error == 0) in acl_fromtext()
1016 return (error); in acl_fromtext()
1022 int error; in acl_parse() local
1025 error = acl_fromtext(acltextp, aclp); in acl_parse()
1027 return (error); in acl_parse()
1274 int error; in compute_ace_perms() local
1279 error = compute_values(ace_perm_table, ACE_PERM_COUNT, in compute_ace_perms()
1282 if (error && positional) { in compute_ace_perms()
1288 error = compute_values(ace_perm_table, in compute_ace_perms()
1291 if (error) in compute_ace_perms()
1292 error = EACL_PERM_MASK_ERROR; in compute_ace_perms()
1294 return (error); in compute_ace_perms()
1305 int error; in compute_aclent_perms() local
1312 error = compute_values(aclent_perm_table, ACLENT_PERM_COUNT, in compute_aclent_perms()
1314 if (error == 0) { in compute_aclent_perms()
1317 error = EACL_PERM_MASK_ERROR; in compute_aclent_perms()
1318 return (error); in compute_aclent_perms()
1327 int error; in ace_perm_mask() local
1339 error = compute_ace_perms(aclperm->perm_str, mask); in ace_perm_mask()
1340 if (error) { in ace_perm_mask()