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()
314 int error; in aclent_type_txt() local
320 error = str_append(dstr, "user::"); in aclent_type_txt()
322 error = str_append(dstr, "defaultuser::"); in aclent_type_txt()
328 error = str_append(dstr, "user:"); in aclent_type_txt()
330 error = str_append(dstr, "defaultuser:"); in aclent_type_txt()
331 if (error) in aclent_type_txt()
333 error = str_append(dstr, pruname(aclp->a_id, idp, in aclent_type_txt()
335 if (error == 0) in aclent_type_txt()
336 error = str_append(dstr, ":"); in aclent_type_txt()
342 error = str_append(dstr, "group::"); in aclent_type_txt()
344 error = str_append(dstr, "defaultgroup::"); in aclent_type_txt()
350 error = str_append(dstr, "group:"); in aclent_type_txt()
352 error = str_append(dstr, "defaultgroup:"); in aclent_type_txt()
353 if (error) in aclent_type_txt()
355 error = str_append(dstr, prgname(aclp->a_id, idp, in aclent_type_txt()
357 if (error == 0) in aclent_type_txt()
358 error = str_append(dstr, ":"); in aclent_type_txt()
364 error = str_append(dstr, "mask:"); in aclent_type_txt()
366 error = str_append(dstr, "defaultmask:"); in aclent_type_txt()
372 error = str_append(dstr, "other:"); in aclent_type_txt()
374 error = str_append(dstr, "defaultother:"); in aclent_type_txt()
378 error = 1; in aclent_type_txt()
382 return (error); in aclent_type_txt()
392 int error; in ace_type_txt() local
397 error = str_append(dynstr, OWNERAT_TXT); in ace_type_txt()
401 error = str_append(dynstr, GROUPAT_TXT); in ace_type_txt()
406 if (error = str_append(dynstr, in ace_type_txt()
409 if (error = getsidname(acep->a_who, B_FALSE, in ace_type_txt()
412 error = str_append(dynstr, sidp); in ace_type_txt()
414 if (error = str_append(dynstr, GROUP_TXT)) in ace_type_txt()
416 error = str_append(dynstr, prgname(acep->a_who, idp, in ace_type_txt()
419 if (error == 0) in ace_type_txt()
420 error = str_append(dynstr, ":"); in ace_type_txt()
424 error = str_append(dynstr, EVERYONEAT_TXT); in ace_type_txt()
429 if (error = str_append(dynstr, USERSID_TXT)) in ace_type_txt()
431 if (error = getsidname(acep->a_who, B_TRUE, in ace_type_txt()
434 error = str_append(dynstr, sidp); in ace_type_txt()
436 if (error = str_append(dynstr, USER_TXT)) in ace_type_txt()
438 error = str_append(dynstr, pruname(acep->a_who, idp, in ace_type_txt()
441 if (error == 0) in ace_type_txt()
442 error = str_append(dynstr, ":"); in ace_type_txt()
445 error = 0; in ace_type_txt()
451 return (error); in ace_type_txt()
464 int error = 0; in ace_perm_txt() local
527 error = str_append(dstr, buf); in ace_perm_txt()
537 error = str_append(dstr, in ace_perm_txt()
540 error = in ace_perm_txt()
544 if (error == 0 && (mask & ACE_ADD_FILE)) { in ace_perm_txt()
546 error = in ace_perm_txt()
549 error = in ace_perm_txt()
553 if (error == 0 && (mask & ACE_ADD_SUBDIRECTORY)) { in ace_perm_txt()
555 error = str_append(dstr, in ace_perm_txt()
558 error = str_append(dstr, in ace_perm_txt()
564 error = str_append(dstr, READ_DATA_TXT); in ace_perm_txt()
566 if (error == 0 && (mask & ACE_WRITE_DATA)) { in ace_perm_txt()
567 error = str_append(dstr, WRITE_DATA_TXT); in ace_perm_txt()
569 if (error == 0 && (mask & ACE_APPEND_DATA)) { in ace_perm_txt()
570 error = str_append(dstr, APPEND_DATA_TXT); in ace_perm_txt()
573 if (error == 0 && (mask & ACE_READ_NAMED_ATTRS)) { in ace_perm_txt()
574 error = str_append(dstr, READ_XATTR_TXT); in ace_perm_txt()
576 if (error == 0 && (mask & ACE_WRITE_NAMED_ATTRS)) { in ace_perm_txt()
577 error = str_append(dstr, WRITE_XATTR_TXT); in ace_perm_txt()
579 if (error == 0 && (mask & ACE_EXECUTE)) { in ace_perm_txt()
580 error = str_append(dstr, EXECUTE_TXT); in ace_perm_txt()
582 if (error == 0 && (mask & ACE_DELETE_CHILD)) { in ace_perm_txt()
583 error = str_append(dstr, DELETE_CHILD_TXT); in ace_perm_txt()
585 if (error == 0 && (mask & ACE_READ_ATTRIBUTES)) { in ace_perm_txt()
586 error = str_append(dstr, READ_ATTRIBUTES_TXT); in ace_perm_txt()
588 if (error == 0 && (mask & ACE_WRITE_ATTRIBUTES)) { in ace_perm_txt()
589 error = str_append(dstr, WRITE_ATTRIBUTES_TXT); in ace_perm_txt()
591 if (error == 0 && (mask & ACE_DELETE)) { in ace_perm_txt()
592 error = str_append(dstr, DELETE_TXT); in ace_perm_txt()
594 if (error == 0 && (mask & ACE_READ_ACL)) { in ace_perm_txt()
595 error = str_append(dstr, READ_ACL_TXT); in ace_perm_txt()
597 if (error == 0 && (mask & ACE_WRITE_ACL)) { in ace_perm_txt()
598 error = str_append(dstr, WRITE_ACL_TXT); in ace_perm_txt()
600 if (error == 0 && (mask & ACE_WRITE_OWNER)) { in ace_perm_txt()
601 error = str_append(dstr, WRITE_OWNER_TXT); in ace_perm_txt()
603 if (error == 0 && (mask & ACE_SYNCHRONIZE)) { in ace_perm_txt()
604 error = str_append(dstr, SYNCHRONIZE_TXT); in ace_perm_txt()
606 if (error == 0 && dstr->d_aclexport[dstr->d_pos-1] == '/') { in ace_perm_txt()
609 if (error == 0) in ace_perm_txt()
610 error = str_append(dstr, ":"); in ace_perm_txt()
612 return (error); in ace_perm_txt()
621 int error; in ace_access_txt() local
624 error = str_append(dstr, ALLOW_TXT); in ace_access_txt()
626 error = str_append(dstr, DENY_TXT); in ace_access_txt()
628 error = str_append(dstr, AUDIT_TXT); in ace_access_txt()
630 error = str_append(dstr, ALARM_TXT); in ace_access_txt()
632 error = str_append(dstr, UNKNOWN_TXT); in ace_access_txt()
634 return (error); in ace_access_txt()
640 int error = 0; in ace_inherit_txt() local
675 error = str_append(dstr, buf); in ace_inherit_txt()
678 error = str_append(dstr, FILE_INHERIT_TXT); in ace_inherit_txt()
680 if (error == 0 && (iflags & ACE_DIRECTORY_INHERIT_ACE)) { in ace_inherit_txt()
681 error = str_append(dstr, DIR_INHERIT_TXT); in ace_inherit_txt()
683 if (error == 0 && (iflags & ACE_NO_PROPAGATE_INHERIT_ACE)) { in ace_inherit_txt()
684 error = str_append(dstr, NO_PROPAGATE_TXT); in ace_inherit_txt()
686 if (error == 0 && (iflags & ACE_INHERIT_ONLY_ACE)) { in ace_inherit_txt()
687 error = str_append(dstr, INHERIT_ONLY_TXT); in ace_inherit_txt()
689 if (error == 0 && (iflags & ACE_SUCCESSFUL_ACCESS_ACE_FLAG)) { in ace_inherit_txt()
690 error = str_append(dstr, SUCCESSFUL_ACCESS_TXT); in ace_inherit_txt()
692 if (error == 0 && (iflags & ACE_FAILED_ACCESS_ACE_FLAG)) { in ace_inherit_txt()
693 error = str_append(dstr, FAILED_ACCESS_TXT); in ace_inherit_txt()
695 if (error == 0 && (iflags & ACE_INHERITED_ACE)) { in ace_inherit_txt()
696 error = str_append(dstr, INHERITED_ACE_TXT); in ace_inherit_txt()
698 if (error == 0 && dstr->d_aclexport[dstr->d_pos-1] == '/') { in ace_inherit_txt()
700 error = str_append(dstr, ":"); in ace_inherit_txt()
704 return (error); in ace_inherit_txt()
744 int error = 0; in aclent_acltotext() local
759 if (error = aclent_type_txt(dstr, aclp, flags)) in aclent_acltotext()
761 if (error = aclent_perm_txt(dstr, aclp->a_perm)) in aclent_acltotext()
769 if (error = str_append(dstr, ":")) in aclent_acltotext()
773 if (error = str_append(dstr, idstr)) in aclent_acltotext()
777 if (error = str_append(dstr, ",")) in aclent_acltotext()
780 if (error) { in aclent_acltotext()
802 int error; in aclfromtext() local
804 error = acl_fromtext(aclstr, &aclp); in aclfromtext()
805 if (error) in aclfromtext()
894 int error = 0; in ace_acltotext() local
915 if (error = ace_type_txt(dstr, aclp, flags)) in ace_acltotext()
917 if (error = ace_perm_txt(dstr, aclp->a_access_mask, in ace_acltotext()
920 if (error = ace_inherit_txt(dstr, aclp->a_flags, flags)) in ace_acltotext()
922 if (error = ace_access_txt(dstr, aclp->a_type)) in ace_acltotext()
931 if (error = str_append(dstr, ":")) in ace_acltotext()
938 error = getsidname(aclp->a_who, in ace_acltotext()
942 if (error) in ace_acltotext()
952 if (error = str_append(dstr, idstr)) in ace_acltotext()
960 if (error = str_append(dstr, ",")) in ace_acltotext()
967 if (error) { in ace_acltotext()
1000 int error; in acl_fromtext() local
1012 error = yyparse(); in acl_fromtext()
1016 if (error == 0) in acl_fromtext()
1025 return (error); in acl_fromtext()
1031 int error; in acl_parse() local
1034 error = acl_fromtext(acltextp, aclp); in acl_parse()
1036 return (error); in acl_parse()
1301 int error; in compute_ace_perms() local
1306 error = compute_values(ace_perm_table, ACE_PERM_COUNT, in compute_ace_perms()
1309 if (error && positional) { in compute_ace_perms()
1315 error = compute_values(ace_perm_table, in compute_ace_perms()
1318 if (error) in compute_ace_perms()
1319 error = EACL_PERM_MASK_ERROR; in compute_ace_perms()
1321 return (error); in compute_ace_perms()
1332 int error; in compute_aclent_perms() local
1339 error = compute_values(aclent_perm_table, ACLENT_PERM_COUNT, in compute_aclent_perms()
1341 if (error == 0) { in compute_aclent_perms()
1344 error = EACL_PERM_MASK_ERROR; in compute_aclent_perms()
1345 return (error); in compute_aclent_perms()
1354 int error; in ace_perm_mask() local
1366 error = compute_ace_perms(aclperm->perm_str, mask); in ace_perm_mask()
1367 if (error) { in ace_perm_mask()