{"id":5113,"date":"2014-11-11T23:07:35","date_gmt":"2014-11-11T14:07:35","guid":{"rendered":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=5113"},"modified":"2014-11-11T23:24:08","modified_gmt":"2014-11-11T14:24:08","slug":"net-%e3%81%ab%e3%81%8a%e3%81%91%e3%82%8b%e3%82%bb%e3%82%ad%e3%83%a5%e3%83%aa%e3%83%86%e3%82%a3%e8%a8%98%e8%bf%b0%e5%ad%90-windows-net","status":"publish","type":"post","link":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=5113","title":{"rendered":".NET \u306b\u304a\u3051\u308b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8a18\u8ff0\u5b50 (Windows\/.NET)"},"content":{"rendered":"<p>Windows \u3067\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8a2d\u5b9a\u304c\u53ef\u80fd\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 (securable object) \u306e\u30aa\u30fc\u30ca\u30fc\u3084\u30a2\u30af\u30bb\u30b9\u6a29\u8a2d\u5b9a\u306a\u3069\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8a18\u8ff0\u5b50 (security descriptor) \u3067\u8868\u73fe\u3059\u308b\u3053\u3068\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u3001 .NET \u306b\u304a\u3044\u3066\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8a18\u8ff0\u5b50\u3092\u8868\u3059\u30af\u30e9\u30b9\u306f\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<p>1\u3064\u306f GenericSecurityDescriptor \u6d3e\u751f\u30af\u30e9\u30b9\u3067\u3059\u3002\u30af\u30e9\u30b9\u968e\u5c64\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>Object\r\n `- GenericSecurityDescriptor\r\n     +- CommonSecurityDescriptor\r\n     `- RawSecurityDescriptor<\/pre>\n<p>\u3053\u3061\u3089\u306e\u30b0\u30eb\u30fc\u30d7\u306f Win32 API \u3092\u76f4\u3067\u89e6\u308b\u306e\u306b\u8fd1\u3044\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u305f\u3060\u3057\u3001securable object \u306b\u3064\u3044\u3066 GenericSecurityDescriptor \u30af\u30e9\u30b9\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97or\u8a2d\u5b9a\u3059\u308b .NET API \u306f\u8efd\u304f\u8abf\u3079\u305f\u9650\u308a\u3067\u306f\u5b58\u5728\u3057\u306a\u3044\u3088\u3046\u3067\u3059\uff08\u3042\u3063\u305f\u3089\u6559\u3048\u3066\uff09\u3002\u4ed5\u65b9\u304c\u306a\u3044\u306e\u3067\u3001\u4f8b\u3048\u3070 GetSecurityInfo Win32 API \u3067\u30a2\u30f3\u30de\u30cd\u30fc\u30b8\u30d0\u30a4\u30ca\u30ea\u8868\u73fe\u3092\u53d6\u5f97\u3057\u3001Marshal.Copy \u3067 byte[] \u306b\u5909\u63db\u3057\u3001\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306b\u6e21\u3059\u3001\u3068\u3044\u3046\u624b\u9806\u3092\u8e0f\u3080\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3082\u30461\u3064\u306f ObjectSecurity \u6d3e\u751f\u30af\u30e9\u30b9\u3067\u3059\u3002\u30af\u30e9\u30b9\u968e\u5c64\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>Object\r\n `- ObjectSecurity\r\n     +- CommonObjectSecurity\r\n     |   `- NativeObjectSecurity\r\n     |       +- FileSystemSecurity\r\n     |       |   +- DirectorySecurity\r\n     |       |   `- FileSecurity\r\n     |       +- RegistrySecurity\r\n     |       `- \u4ed6\u306b\u3082\u3044\u3063\u3071\u3044\r\n     `- DirectoryObjectSecurity<\/pre>\n<p>\u3053\u3061\u3089\u306e\u30b0\u30eb\u30fc\u30d7\u306f securable object \u306e\u7a2e\u985e\u3054\u3068\u306b\u30af\u30e9\u30b9\u304c\u5206\u304b\u308c\u3066\u304a\u308a\u3001\u4f8b\u3048\u3070\u30d5\u30a1\u30a4\u30eb\u3067\u306f FileSecurity\u3001\u30ec\u30b8\u30b9\u30c8\u30ea\u30ad\u30fc\u3067\u306f RegistrySecurity\u3001\u3068\u3044\u3063\u305f\u5bfe\u5fdc\u306b\u306a\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u4f8b\u3048\u3070\u30d5\u30a1\u30a4\u30eb\u306a\u3089 File.GetAccessControl \u30e1\u30bd\u30c3\u30c9\u3067\u53d6\u5f97\u3057\u3001File.SetAccessControl \u30e1\u30bd\u30c3\u30c9\u3067\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002GenericSecurityDescriptor \u306e\u30b0\u30eb\u30fc\u30d7\u3088\u308a\u6700\u521d\u306e\u4e00\u6b69\u304c\u304a\u624b\u8efd\u3067\u3059\u3002<\/p>\n<p>\u3067\u3001\u79c1\u304c\u628a\u63e1\u3057\u3066\u3044\u308b\u7bc4\u56f2\u3067\u306f\u3001\u4e21\u8005\u306e\u4e3b\u306a\u5dee\u7570\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<table rules=\"all\" frame=\"border\">\n<tr>\n<td><\/td>\n<td>RawSecurityDescriptor<\/td>\n<td>CommonSecurityDescriptor<\/td>\n<td>ObjectSecurity \u6d3e\u751f\u30af\u30e9\u30b9<\/td>\n<\/tr>\n<tr>\n<td>\u6697\u9ed9\u7684\u306a ACL \u306e\u6700\u9069\u5316<\/td>\n<td>\u306a\u3057<\/td>\n<td colspan=\"2\">\u3042\u308a<\/td>\n<\/tr>\n<tr>\n<td>trustee \u306e\u8868\u73fe\u30af\u30e9\u30b9<\/td>\n<td colspan=\"2\">SecurityIdentifier<\/td>\n<td>IdentityReference \u6d3e\u751f\u30af\u30e9\u30b9 \uff08SecurityIdentifier \u307e\u305f\u306f NTAccount\uff09<\/td>\n<\/tr>\n<tr>\n<td>ACL (DACL\/SACL) \u306e\u8868\u73fe\u30af\u30e9\u30b9<\/td>\n<td>RawAcl<\/td>\n<td>DiscretionaryAcl \u304a\u3088\u3073 SystemAcl<\/td>\n<td>AuthorizationRuleCollection<\/td>\n<\/tr>\n<tr>\n<td>ACE \u306e\u8868\u73fe\u30af\u30e9\u30b9<\/td>\n<td colspan=\"2\">GenericAce \u6d3e\u751f\u30af\u30e9\u30b9 \uff08\u4e3b\u306b CommonAce \u30af\u30e9\u30b9\uff09<\/td>\n<td>\u30af\u30e9\u30b9\u306b\u3088\u3063\u3066\u7570\u306a\u308b \uff08\u305f\u3068\u3048\u3070 FileSystemAccessRule \u30af\u30e9\u30b9\uff09<\/td>\n<\/tr>\n<tr>\n<td>ACL \u306e\u53d6\u5f97\u65b9\u6cd5<\/td>\n<td colspan=\"2\">DiscritionaryAcl\/SystemAcl \u30d7\u30ed\u30d1\u30c6\u30a3<\/td>\n<td>GetAccessRules\/GetAuditRules \u30e1\u30bd\u30c3\u30c9\u3067\u30b3\u30d4\u30fc\u3092\u53d6\u5f97<\/td>\n<\/tr>\n<tr>\n<td>ACL \u306e\u5909\u66f4\u65b9\u6cd5<\/td>\n<td colspan=\"2\">ACL \u3092\u7d44\u307f\u7acb\u3066\u3066 DiscritionaryAcl\/SystemAcl \u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u30bb\u30c3\u30c8 \u307e\u305f\u306f \u30d7\u30ed\u30d1\u30c6\u30a3\u304b\u3089\u8fd4\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u76f4\u63a5\u64cd\u4f5c<\/td>\n<td>AddAccessRule \u30e1\u30bd\u30c3\u30c9\u7b49\u3067 ACE \u30921\u3064\u305a\u3064\u64cd\u4f5c\u3059\u308b<\/td>\n<\/tr>\n<\/table>\n<p>\u300c\u6697\u9ed9\u7684\u306a ACL \u306e\u6700\u9069\u5316\u300d\u3068\u306f\u3001AddAccessRule \u7b49\u3067 ACL \u3092\u64cd\u4f5c\u3057\u305f\u308a\u3001SetSecurityDescriptorSddlForm \u7b49\u3067 ACL \u3092\u5909\u66f4\u3057\u305f\u6642\u306b\u3001ACE \u306e\u6570\u304c\u5c11\u306a\u304f\u306a\u308b\u3088\u3046\u306b\u7d50\u5408\u3057\u305f\u308a\u9806\u5e8f\u3092\u5165\u308c\u66ff\u3048\u305f\u308a\u3059\u308b\u3053\u3068\u3067\u3059\uff08GetAccessControl \u30e1\u30bd\u30c3\u30c9\u3067\u53d6\u5f97\u3057\u305f\u6642\u306b\u306f\u6700\u9069\u5316\u306f\u884c\u308f\u308c\u306a\u3044\uff09\u3002\u305f\u3068\u3048\u3070\u3001\u300cUsers \u306b\u66f8\u304d\u8fbc\u307f\u3092\u8a31\u53ef\u300d\u3068\u300cUsers \u306b\u8aad\u307f\u8fbc\u307f\u3092\u8a31\u53ef\u300d\u306e2\u3064\u306e ACE \u304c\u3042\u308b\u3068\u3001\u6697\u9ed9\u7684\u306b\u300cUsers \u306b\u8aad\u307f\u66f8\u304d\u3092\u8a31\u53ef\u300d\u3068\u3044\u30461\u3064\u306e ACE \u306b\u7d50\u5408\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u6700\u9069\u5316\u306e\u30eb\u30fc\u30eb\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8a18\u8ff0\u5b50\u304c\u30b3\u30f3\u30c6\u30ca\uff08\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3084\u30ec\u30b8\u30b9\u30c8\u30ea\u30ad\u30fc\uff09\u306b\u5bfe\u3059\u308b\u3082\u306e\u304b\u30b3\u30f3\u30c6\u30ca\u4ee5\u5916\uff08\u30d5\u30a1\u30a4\u30eb\u3084\u30b5\u30fc\u30d3\u30b9\uff09\u306b\u5bfe\u3059\u308b\u3082\u306e\u304b\u3069\u3046\u304b\u3001\u3042\u308b\u3044\u306f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30b5\u30fc\u30d3\u30b9\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5bfe\u3059\u308b\u3082\u306e\u304b\u3069\u3046\u304b\u3067\u7570\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u5dee\u7570\u306f ObjectSecurity \u6d3e\u751f\u30af\u30e9\u30b9\u3067\u306f\u30af\u30e9\u30b9\u81ea\u4f53\u306b\u3088\u3063\u3066\u8868\u73fe\u3055\u308c\u307e\u3059\u304c\u3001CommonSecurityDescriptor \u30af\u30e9\u30b9\u3067\u306f\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306b\u30d5\u30e9\u30b0\u3092\u6e21\u3059\u3053\u3068\u306b\u3088\u3063\u3066\u5b9f\u73fe\u3055\u308c\u307e\u3059\u3002RawSecurityDescriptor \u30af\u30e9\u30b9\u3067\u306f\u6700\u9069\u5316\u306f\u884c\u308f\u308c\u306a\u3044\u306e\u3067\u3001\u3053\u308c\u3089\u306e\u30d5\u30e9\u30b0\u306f\u6301\u3061\u307e\u305b\u3093\u3002<\/p>\n<p>\u300cACL \u306e\u5909\u66f4\u65b9\u6cd5\u300d\u3082\u5927\u304d\u306a\u9055\u3044\u304c\u3042\u308a\u307e\u3059\u3002ObjectSecurity \u6d3e\u751f\u30af\u30e9\u30b9\u306f ACL \u3092\u4e00\u62ec\u3067\u5909\u66f4\u3059\u308b\u65b9\u6cd5\u304c\u7121\u3044\u306e\u3067\u30011\u3064\u305a\u3064\u8ffd\u52a0\u524a\u9664\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u3001\u3081\u3093\u3069\u304f\u3055\u3044\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u3055\u3089\u306b\u3001\u8ffd\u52a0\u3068\u524a\u9664\u304c\u6df7\u5728\u3057\u305f\u64cd\u4f5c\u3092\u884c\u304a\u3046\u3068\u3059\u308b\u3068\u3001\u524d\u8ff0\u306e\u6697\u9ed9\u7684\u306a ACL \u306e\u6700\u9069\u5316\u304c\u4ecb\u5165\u3057\u3066\u3001\u4e88\u60f3\u3068\u306f\u7570\u306a\u3063\u305f\u7d50\u679c\u304c\u767a\u751f\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows \u3067\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8a2d\u5b9a\u304c\u53ef\u80fd\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 (securable object) \u306e\u30aa\u30fc\u30ca\u30fc\u3084\u30a2\u30af\u30bb\u30b9\u6a29\u8a2d\u5b9a\u306a\u3069\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8a18\u8ff0\u5b50 (security descriptor) \u3067\u8868\u73fe\u3059\u308b\u3053\u3068\u306b\u306a\u3063\u3066\u3044\u307e\u3059 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[],"class_list":["post-5113","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/5113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5113"}],"version-history":[{"count":17,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/5113\/revisions"}],"predecessor-version":[{"id":5130,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/5113\/revisions\/5130"}],"wp:attachment":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5113"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}