• Home
  • Raw
  • Download

Lines Matching refs:pxdesc

1507 static void showposix(const struct POSIX_SECURITY *pxdesc)  in showposix()  argument
1522 if (pxdesc) { in showposix()
1523 acccnt = pxdesc->acccnt; in showposix()
1524 defcnt = pxdesc->defcnt; in showposix()
1525 firstdef = pxdesc->firstdef; in showposix()
1526 acl = &pxdesc->acl; in showposix()
1531 printf(" mode : 0%03o\n",(int)pxdesc->mode); in showposix()
1532 printf(" tagsset : 0x%02x\n",(int)pxdesc->tagsset); in showposix()
2074 struct POSIX_SECURITY *pxdesc; in showhex() local
2145 pxdesc = linux_permissions_posix(attr,isdir); in showhex()
2146 if (pxdesc) { in showhex()
2147 showposix(pxdesc); in showhex()
2148 free(pxdesc); in showhex()
2468 static u32 merge_rights(const struct POSIX_SECURITY *pxdesc, BOOL def) in merge_rights() argument
2482 first = pxdesc->firstdef; in merge_rights()
2483 last = pxdesc->firstdef + pxdesc->defcnt - 1; in merge_rights()
2486 last = pxdesc->acccnt - 1; in merge_rights()
2488 pxace = pxdesc->acl.ace; in merge_rights()
2556 static void tryposix(struct POSIX_SECURITY *pxdesc) in tryposix() argument
2581 newpxdesc = ntfs_merge_descr_posix(pxdesc, oldpxdesc); in tryposix()
2583 newpxdesc = pxdesc; in tryposix()
2590 newpxdesc = pxdesc; in tryposix()
2759 struct POSIX_SECURITY *pxdesc; in check_samples() local
2971 pxdesc = linux_permissions_posix(descr, isdir); in check_samples()
2973 pxdesc = (struct POSIX_SECURITY*)NULL; in check_samples()
2974 if (!descr || !pxdesc || !same_posix(pxsample,pxdesc)) { in check_samples()
2979 if (pxdesc) in check_samples()
2980 showposix(pxdesc); in check_samples()
2984 free(pxdesc); in check_samples()
3131 pxdesc = linux_permissions_posix(descr, isdir); in check_samples()
3132 if (pxdesc) { in check_samples()
3133 accrights = merge_rights(pxdesc,FALSE); in check_samples()
3134 defrights = merge_rights(pxdesc,TRUE); in check_samples()
3135 if (!(pxdesc->tagsset & ~(POSIX_ACL_USER_OBJ | POSIX_ACL_GROUP_OBJ | POSIX_ACL_OTHER))) in check_samples()
3139 if ((pxdesc->mode != mixmode) in check_samples()
3143 cnt,pxdesc->mode,mixmode); in check_samples()
3149 showposix(pxdesc); in check_samples()
3151 free(pxdesc); in check_samples()
3195 struct POSIX_SECURITY *pxdesc; in basictest() local
3226 pxdesc = linux_permissions_posix(attr, isdir); in basictest()
3227 if (!pxdesc || (pxdesc->mode != perm)) { in basictest()
3229 if (pxdesc) in basictest()
3230 gotback = pxdesc->mode; in basictest()
3240 pxdesc,isdir,owner, in basictest()
3258 free(pxdesc); in basictest()
3372 struct POSIX_SECURITY *pxdesc; in posixtest() local
3374 struct POSIX_SECURITY pxdesc; in posixtest() member
3447 pxdesc = &desc.pxdesc; in posixtest()
3448 pxdesc->mode = 0; in posixtest()
3449 pxdesc->defcnt = 0; in posixtest()
3451 pxdesc->acccnt = 4; in posixtest()
3452 pxdesc->firstdef = 4; in posixtest()
3453 pxdesc->tagsset = 0x35; in posixtest()
3455 pxdesc->acccnt = 6;; in posixtest()
3456 pxdesc->firstdef = 6; in posixtest()
3457 pxdesc->tagsset = 0x3f; in posixtest()
3459 pxdesc->acl.version = POSIX_VERSION; in posixtest()
3460 pxdesc->acl.flags = 0; in posixtest()
3461 pxdesc->acl.filler = 0; in posixtest()
3463 pxdesc->acl.ace[0].tag = POSIX_ACL_USER_OBJ; in posixtest()
3464 pxdesc->acl.ace[0].id = -1; in posixtest()
3466 pxdesc->acl.ace[1].tag = POSIX_ACL_GROUP_OBJ; in posixtest()
3467 pxdesc->acl.ace[1].id = -1; in posixtest()
3468 pxdesc->acl.ace[2].tag = POSIX_ACL_MASK; in posixtest()
3469 pxdesc->acl.ace[2].id = -1; in posixtest()
3470 pxdesc->acl.ace[3].tag = POSIX_ACL_OTHER; in posixtest()
3471 pxdesc->acl.ace[3].id = -1; in posixtest()
3473 pxdesc->acl.ace[1].tag = POSIX_ACL_USER; in posixtest()
3474 pxdesc->acl.ace[1].id = (kind & 16 ? 0 : 1000); in posixtest()
3475 pxdesc->acl.ace[2].tag = POSIX_ACL_GROUP_OBJ; in posixtest()
3476 pxdesc->acl.ace[2].id = -1; in posixtest()
3477 pxdesc->acl.ace[3].tag = POSIX_ACL_GROUP; in posixtest()
3478 pxdesc->acl.ace[3].id = (kind & 16 ? 0 : 1002); in posixtest()
3479 pxdesc->acl.ace[4].tag = POSIX_ACL_MASK; in posixtest()
3480 pxdesc->acl.ace[4].id = -1; in posixtest()
3481 pxdesc->acl.ace[5].tag = POSIX_ACL_OTHER; in posixtest()
3482 pxdesc->acl.ace[5].id = -1; in posixtest()
3497 pxdesc->mode = (ownobj << 6) | (mask << 3) | wrld; in posixtest()
3499 pxdesc->acl.ace[0].perms = ownobj; in posixtest()
3501 pxdesc->acl.ace[1].perms = grpobj; in posixtest()
3502 pxdesc->acl.ace[2].perms = mask; in posixtest()
3503 pxdesc->acl.ace[3].perms = wrld; in posixtest()
3505 pxdesc->acl.ace[1].perms = usr; in posixtest()
3506 pxdesc->acl.ace[2].perms = grpobj; in posixtest()
3507 pxdesc->acl.ace[3].perms = grp; in posixtest()
3508 pxdesc->acl.ace[4].perms = mask; in posixtest()
3509 pxdesc->acl.ace[5].perms = wrld; in posixtest()
3514 pxdesc,isdir,owner,group); in posixtest()
3524 if (!same_posix(pxdesc,gotback)) { in posixtest()
3527 showposix(pxdesc); in posixtest()
3551 showposix(pxdesc); in posixtest()
3804 static BOOL setfull_posix(const char *fullname, const struct POSIX_SECURITY *pxdesc, in setfull_posix() argument
3823 if (pxdesc->acccnt) in setfull_posix()
3826 printf(" mode 0%03o\n",pxdesc->mode); in setfull_posix()
3837 if (!pxdesc->defcnt in setfull_posix()
3838 && !(pxdesc->tagsset & in setfull_posix()
3840 if (!ntfs_merge_mode_posix(oldpxdesc,pxdesc->mode)) in setfull_posix()
3847 newpxdesc = ntfs_merge_descr_posix(pxdesc, oldpxdesc); in setfull_posix()
4115 struct POSIX_SECURITY *pxdesc; in showfull() local
4209 pxdesc = linux_permissions_posix(attr,isdir); in showfull()
4210 if (pxdesc) in showfull()
4211 mode = pxdesc->mode; in showfull()
4240 if (pxdesc) { in showfull()
4242 && (pxdesc->defcnt in showfull()
4243 || (pxdesc->tagsset in showfull()
4247 showposix(pxdesc); in showfull()
4248 free(pxdesc); in showfull()
4397 struct POSIX_SECURITY *pxdesc; in showmounted() local
4432 pxdesc = linux_permissions_posix(attr,isdir); in showmounted()
4433 if (pxdesc) in showmounted()
4434 mode = pxdesc->mode; in showmounted()
4438 pxdesc = (struct POSIX_SECURITY*)NULL; in showmounted()
4465 if (pxdesc) { in showmounted()
4466 if ((pxdesc->defcnt in showmounted()
4467 || (pxdesc->tagsset in showmounted()
4471 showposix(pxdesc); in showmounted()
4472 free(pxdesc); in showmounted()
4544 static BOOL recurseset_posix(const char *path, const struct POSIX_SECURITY *pxdesc) in recurseset_posix() argument
4557 err = !setfull_posix(path,pxdesc,TRUE); in recurseset_posix()
4569 recurseset_posix(current->name,pxdesc); in recurseset_posix()
4576 err = !setfull_posix(path,pxdesc,FALSE); in recurseset_posix()
4633 static BOOL singleset_posix(const char *path, const struct POSIX_SECURITY *pxdesc) in singleset_posix() argument
4642 err = !setfull_posix(path,pxdesc,isdir); in singleset_posix()
5597 struct POSIX_SECURITY *pxdesc; in encode_posix_acl() local
5633 pxdesc = (struct POSIX_SECURITY*)malloc(sizeof(struct POSIX_SECURITY) in encode_posix_acl()
5635 if (pxdesc) { in encode_posix_acl()
5636 pxdesc->acccnt = acccnt; in encode_posix_acl()
5637 pxdesc->firstdef = acccnt; in encode_posix_acl()
5638 pxdesc->defcnt = defcnt; in encode_posix_acl()
5639 acl = &pxdesc->acl; in encode_posix_acl()
5846 pxdesc->mode = mode; in encode_posix_acl()
5847 pxdesc->tagsset = tagsset; in encode_posix_acl()
5848 pxdesc->acl.version = POSIX_VERSION; in encode_posix_acl()
5849 pxdesc->acl.flags = 0; in encode_posix_acl()
5850 pxdesc->acl.filler = 0; in encode_posix_acl()
5852 ntfs_sort_posix(pxdesc); in encode_posix_acl()
5853 showposix(pxdesc); in encode_posix_acl()
5857 || !ntfs_valid_posix(pxdesc)) { in encode_posix_acl()
5858 if (~pxdesc->tagsset in encode_posix_acl()
5863 free(pxdesc); in encode_posix_acl()
5864 pxdesc = (struct POSIX_SECURITY*)NULL; in encode_posix_acl()
5868 showposix(pxdesc); in encode_posix_acl()
5872 return (pxdesc); in encode_posix_acl()
5883 struct POSIX_SECURITY *pxdesc; in setperms() local
5891 pxdesc = encode_posix_acl(p); in setperms()
5892 if (pxdesc) { in setperms()
5898 recurseset_posix(base,pxdesc); in setperms()
5900 singleset_posix(base,pxdesc); in setperms()
5915 free(pxdesc); in setperms()