Lines Matching refs:isdir
933 int isdir; in guess_dir() local
938 isdir = 0; in guess_dir()
945 isdir = 1; in guess_dir()
949 return (isdir); in guess_dir()
1279 static void showace(const char *attr, int off, int isdir, int level) in showace() argument
1326 if (isdir) /* a directory */ { in showace()
1420 static void showacl(const char *attr, int off, int isdir, int level) in showacl() argument
1440 showace(attr,off + x,isdir,level+4); in showacl()
1445 static void showdacl(const char *attr, int isdir, int level) in showdacl() argument
1459 showacl(attr,off,isdir,level+4); in showdacl()
1467 static void showsacl(const char *attr, int isdir, int level) in showsacl() argument
1481 showacl(attr,off,isdir,level+4); in showsacl()
1492 BOOL isdir; in showall() local
1494 isdir = guess_dir(attr); in showall()
1498 showdacl(attr,isdir,level); in showall()
1499 showsacl(attr,isdir,level); in showall()
1623 static struct POSIX_SECURITY *linux_permissions_posix(const char *attr, BOOL isdir) in linux_permissions_posix() argument
1651 (const char*)attr, usid, gsid, isdir); in linux_permissions_posix()
1654 (const char*)attr, usid, gsid, isdir); in linux_permissions_posix()
1664 static int linux_permissions(const char *attr, BOOL isdir) in linux_permissions() argument
1689 perm = ntfs_build_permissions((const char*)attr, usid, gsid, isdir); in linux_permissions()
2081 int isdir; in showhex() local
2123 isdir = guess_dir(attr); in showhex()
2125 (isdir ? "directory" : "file")); in showhex()
2134 showdacl(attr,isdir,4); in showhex()
2135 showsacl(attr,isdir,4); in showhex()
2137 mode = linux_permissions(attr,isdir); in showhex()
2145 pxdesc = linux_permissions_posix(attr,isdir); in showhex()
2283 int isdir; in restore() local
2332 isdir = guess_dir(attr); in restore()
2333 printf(" Estimated type : %s\n",(isdir ? "directory" : "file")); in restore()
2337 showdacl(attr,isdir,4); in restore()
2338 showsacl(attr,isdir,4); in restore()
2339 mode = linux_permissions(attr,isdir); in restore()
2572 BOOL isdir; in tryposix() local
2578 isdir = FALSE; in tryposix()
2580 oldpxdesc = linux_permissions_posix(oldattr, isdir); in tryposix()
2592 isdir,(SID*)owner_sid,(SID*)group_sid); in tryposix()
2600 showdacl(attr,isdir,4); in tryposix()
2601 showsacl(attr,isdir,4); in tryposix()
2602 mode = linux_permissions(attr,isdir); in tryposix()
2605 newpxdesc = linux_permissions_posix(attr,isdir); in tryposix()
2623 static char *build_dummy_descr(BOOL isdir __attribute__((unused)), in build_dummy_descr() argument
2749 BOOL isdir = FALSE; in check_samples() local
2912 isdir = FALSE; in check_samples()
2914 isdir, (const SID*)owner3, (const SID*)group3); in check_samples()
2919 isdir = FALSE; in check_samples()
2921 isdir, (const SID*)adminsid, (const SID*)group3); in check_samples()
2924 isdir = FALSE; in check_samples()
2928 isdir, (const SID*)group3, (const SID*)group3); in check_samples()
2931 isdir = FALSE; in check_samples()
2935 isdir, (const SID*)owner3, (const SID*)group3); in check_samples()
2938 isdir = FALSE; in check_samples()
2942 isdir, (const SID*)owner3, (const SID*)group3); in check_samples()
2945 isdir = FALSE; in check_samples()
2949 isdir, (const SID*)owner3, (const SID*)group3); in check_samples()
2952 isdir = FALSE; in check_samples()
2956 isdir, (const SID*)adminsid, (const SID*)adminsid); in check_samples()
2961 isdir = FALSE; in check_samples()
2963 isdir, (const SID*)owner3, (const SID*)group3); in check_samples()
2971 pxdesc = linux_permissions_posix(descr, isdir); in check_samples()
2998 isdir = TRUE; in check_samples()
2999 descr = build_dummy_descr(isdir, in check_samples()
3007 isdir = TRUE; in check_samples()
3008 descr = build_dummy_descr(isdir, adminsid, (const SID*)group2, in check_samples()
3016 isdir = TRUE; in check_samples()
3017 descr = build_dummy_descr(isdir, (const SID*)owner3, (const SID*)group3, in check_samples()
3023 isdir = FALSE; in check_samples()
3024 descr = build_dummy_descr(isdir, in check_samples()
3040 isdir = TRUE; in check_samples()
3041 descr = build_dummy_descr(isdir, systemsid, systemsid, in check_samples()
3053 isdir = TRUE; in check_samples()
3054 descr = build_dummy_descr(isdir, systemsid, systemsid, in check_samples()
3067 isdir = TRUE; in check_samples()
3068 descr = build_dummy_descr(isdir, adminsid, systemsid, in check_samples()
3080 isdir = TRUE; in check_samples()
3081 descr = build_dummy_descr(isdir, adminsid, systemsid, in check_samples()
3093 isdir = TRUE; in check_samples()
3094 descr = build_dummy_descr(isdir, in check_samples()
3107 isdir = FALSE; in check_samples()
3108 descr = build_dummy_descr(isdir, in check_samples()
3123 perms = linux_permissions(descr, isdir); in check_samples()
3131 pxdesc = linux_permissions_posix(descr, isdir); in check_samples()
3166 static void basictest(int kind, BOOL isdir, const SID *owner, const SID *group) in basictest() argument
3213 attr = ntfs_build_descr(perm,isdir,owner,(const SID*)group); in basictest()
3226 pxdesc = linux_permissions_posix(attr, isdir); in basictest()
3240 pxdesc,isdir,owner, in basictest()
3249 gotback = linux_permissions(pxattr, isdir); in basictest()
3260 gotback = linux_permissions(attr, isdir); in basictest()
3279 showdacl(attr,isdir,4); in basictest()
3280 showsacl(attr,isdir,4); in basictest()
3300 showdacl(pxattr,isdir,4); in basictest()
3301 showsacl(pxattr,isdir,4); in basictest()
3320 showdacl(attr,isdir,4); in basictest()
3321 showsacl(attr,isdir,4); in basictest()
3369 static void posixtest(int kind, BOOL isdir, in posixtest() argument
3514 pxdesc,isdir,owner,group); in posixtest()
3521 gotback = linux_permissions_posix(pxattr, isdir); in posixtest()
3533 showdacl(pxattr,isdir,4); in posixtest()
3554 showdacl(pxattr,isdir,4); in posixtest()
3607 BOOL isdir; in selftests() local
3625 isdir = kind & 1; in selftests()
3631 basictest(kind, isdir, owner, group); in selftests()
3636 isdir = kind & 1; in selftests()
3642 posixtest(kind, isdir, owner, group); in selftests()
3805 BOOL isdir) in setfull_posix() argument
3821 printf("%s ",(isdir ? "Directory" : "File")); in setfull_posix()
3831 oldpxdesc = linux_permissions_posix(attr, isdir); in setfull_posix()
3870 newpxdesc,isdir,usid,gsid); in setfull_posix()
3874 newpxdesc,isdir,usid,gsid); in setfull_posix()
3890 showdacl(newattr,isdir,0); in setfull_posix()
3891 showsacl(newattr,isdir,0); in setfull_posix()
3919 static BOOL setfull(const char *fullname, int mode, BOOL isdir) in setfull() argument
3933 printf("%s ",(isdir ? "Directory" : "File")); in setfull()
3949 newattr = ntfs_build_descr(mode,isdir,usid,gsid); in setfull()
3962 showdacl(newattr,isdir,0); in setfull()
3963 showsacl(newattr,isdir,0); in setfull()
4110 static void showfull(const char *fullname, BOOL isdir) in showfull() argument
4129 printf("%s ",(isdir ? "Directory" : "File")); in showfull()
4164 printf("%s ",(isdir ? "Directory" : "File")); in showfull()
4188 printf("# %s ",(isdir ? "Directory" : "File")); in showfull()
4209 pxdesc = linux_permissions_posix(attr,isdir); in showfull()
4215 mode = linux_permissions(attr,isdir); in showfull()
4223 showdacl(attr,isdir,level); in showfull()
4224 showsacl(attr,isdir,level); in showfull()
4270 printf("%s ",(isdir ? "Directory" : "File")); in showfull()
4279 printf("%s ",(isdir ? "Directory" : "File")); in showfull()
4287 printf("# %s ",(isdir ? "Directory" : "File")); in showfull()
4296 printf("%s ",(isdir ? "Directory" : "File")); in showfull()
4312 BOOL isdir; in recurseshow() local
4318 isdir = ntfs_read_directory(ntfs_context, path, in recurseshow()
4320 if (isdir) { in recurseshow()
4355 BOOL isdir; in singleshow() local
4359 isdir = ntfs_read_directory(ntfs_context, path, in singleshow()
4361 if (isdir || (errno == ENOTDIR)) in singleshow()
4362 showfull(path,isdir); in singleshow()
4406 BOOL isdir; in showmounted() local
4411 isdir = S_ISDIR(st.st_mode); in showmounted()
4412 printf("%s ",(isdir ? "Directory" : "File")); in showmounted()
4432 pxdesc = linux_permissions_posix(attr,isdir); in showmounted()
4439 mode = linux_permissions(attr,isdir); in showmounted()
4444 mode = linux_permissions(attr,isdir); in showmounted()
4451 showdacl(attr,isdir,level); in showmounted()
4452 showsacl(attr,isdir,level); in showmounted()
4548 BOOL isdir; in recurseset_posix() local
4554 isdir = ntfs_read_directory(ntfs_context, path, in recurseset_posix()
4556 if (isdir) { in recurseset_posix()
4597 BOOL isdir; in recurseset() local
4603 isdir = ntfs_read_directory(ntfs_context, path, in recurseset()
4605 if (isdir) { in recurseset()
4635 BOOL isdir; in singleset_posix() local
4639 isdir = ntfs_read_directory(ntfs_context, path, in singleset_posix()
4641 if (isdir || (errno == ENOTDIR)) { in singleset_posix()
4642 err = !setfull_posix(path,pxdesc,isdir); in singleset_posix()
4661 BOOL isdir; in singleset() local
4665 isdir = ntfs_read_directory(ntfs_context, path, in singleset()
4667 if (isdir || (errno == ENOTDIR)) in singleset()
4668 setfull(path,mode,isdir); in singleset()
5000 BOOL isdir; in audit_sds() local
5070 isdir = guess_dir(&attr[20]); in audit_sds()
5071 printf("Assuming %s descriptor\n",(isdir ? "directory" : "file")); in audit_sds()
5075 showdacl(&attr[20],isdir,0); in audit_sds()
5076 showsacl(&attr[20],isdir,0); in audit_sds()
5079 &attr[20],isdir); in audit_sds()