- Timestamp:
- Nov 30, 1999, 8:41:45 PM (26 years ago)
- Location:
- trunk/src/advapi32
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/advapi32/ADVAPI32.CPP
r1497 r1894 1 /* $Id: ADVAPI32.CPP,v 1. 8 1999-10-28 18:24:24sandervl Exp $ */1 /* $Id: ADVAPI32.CPP,v 1.9 1999-11-30 19:41:06 sandervl Exp $ */ 2 2 3 3 /* … … 42 42 43 43 44 //****************************************************************************** 45 //****************************************************************************** 46 BOOL WIN32API GetFileSecurityA(LPCSTR lpFileName, 47 SECURITY_INFORMATION RequestedInformation, 48 PSECURITY_DESCRIPTOR pSecurityDescriptor, 49 DWORD nLength, 50 LPDWORD lpnLengthNeeded) 51 { 52 #ifdef DEBUG 53 WriteLog("GetFileSecurityA %s, not implemented\n", lpFileName); 54 #endif 55 return(FALSE); 56 } 57 //****************************************************************************** 58 //****************************************************************************** 59 BOOL WIN32API GetFileSecurityW(LPCWSTR lpFileName, 60 SECURITY_INFORMATION RequestedInformation, 61 PSECURITY_DESCRIPTOR pSecurityDescriptor, 62 DWORD nLength, 63 LPDWORD lpnLengthNeeded) 64 { 65 #ifdef DEBUG 66 WriteLog("GetFileSecurityW %s, not implemented\n", 67 lpFileName); 68 #endif 69 return(FALSE); 70 } 71 //****************************************************************************** 72 //****************************************************************************** 73 BOOL WIN32API SetFileSecurityA(LPCSTR lpFileName, 74 SECURITY_INFORMATION RequestedInformation, 75 PSECURITY_DESCRIPTOR pSecurityDescriptor) 76 { 77 #ifdef DEBUG 78 WriteLog("SetFileSecurityA %s, not implemented\n", lpFileName); 79 #endif 80 return(FALSE); 81 } 82 //****************************************************************************** 83 //****************************************************************************** 84 BOOL WIN32API SetFileSecurityW(LPCWSTR lpFileName, 85 SECURITY_INFORMATION RequestedInformation, 86 PSECURITY_DESCRIPTOR pSecurityDescriptor) 87 { 88 #ifdef DEBUG 89 WriteLog("SetFileSecurityW %s, not implemented\n", lpFileName); 90 #endif 91 return(FALSE); 92 } 44 /***************************************************************************** 45 * Name : SetTokenInformation 46 * Purpose : The SetTokenInformation function sets various types of 47 * information for a specified access token. The information it 48 * sets replaces existing information. The calling process must 49 * have appropriate access rights to set the information. 50 * Parameters: HANDLE hToken handle of access token 51 * TOKEN_INFORMATION_CLASS tic type of information to set 52 * LPVOID lpvInformation address of information to set 53 * DWORD cbInformation size of information buffer 54 * Variables : 55 * Result : 56 * Remark : 57 * Status : UNTESTED STUB 58 * 59 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 60 *****************************************************************************/ 61 62 #define TOKEN_INFORMATION_CLASS DWORD 63 BOOL WIN32API SetTokenInformation(HANDLE hToken, 64 TOKEN_INFORMATION_CLASS tic, 65 LPVOID lpvInformation, 66 DWORD cbInformation) 67 { 68 dprintf(("ADVAPI32: SetTokenInformation(%08xh,%08xh,%08xh,%08xh) not implemented.\n", 69 hToken, 70 tic, 71 lpvInformation, 72 cbInformation)); 73 74 return (FALSE); /* signal failure */ 75 } 76 93 77 //****************************************************************************** 94 78 //****************************************************************************** … … 164 148 165 149 166 BOOL WIN32API SetSecurityDescriptorDacl( /*PLF Sat 98-03-07 02:48:45*/167 PSECURITY_DESCRIPTOR pSecurityDescriptor,168 BOOL bDaclPresent,169 PACL pDacl,170 BOOL bDaclDefaulted171 )172 173 {174 dprintf(("SetSecurityDescriptorDacl(): NIY - returning error\n"));175 return FALSE;176 }177 178 179 180 /*PLF Sat 98-03-07 02:59:20*/181 BOOL WIN32API InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor,182 DWORD dwRevision)183 {184 dprintf(("InitializeSecurityDescriptor() NIY\n"));185 return FALSE;186 }187 188 150 /*PLF Sat 98-03-07 02:59:20*/ 189 151 HANDLE WIN32API RegisterEventSourceA(LPCSTR lpUNCServerName, LPCSTR lpSourceName) … … 210 172 211 173 /*PLF Sat 98-03-07 02:59:20*/ 212 BOOL WIN32API AdjustTokenPrivileges(213 HANDLE TokenHandle,214 BOOL DisableAllPrivileges,215 PTOKEN_PRIVILEGES NewState,216 DWORD BufferLength,217 PTOKEN_PRIVILEGES PreviousState,218 LPDWORD ReturnLength219 )220 {221 dprintf(("AdjustTokenPrivileges() NIY\n"));222 return FALSE;223 }224 225 /*PLF Sat 98-03-07 02:59:20*/226 BOOL WIN32API LookupPrivilegeValueA(LPCSTR lpSystemName,227 LPCSTR lpName,228 LPVOID lpLuid)229 {230 dprintf(("LookupPrivilegeValueA() NIY\n"));231 return FALSE;232 }233 234 BOOL WIN32API LookupPrivilegeValueW(LPCWSTR lpSystemName,235 LPCWSTR lpName,236 LPVOID lpLuid)237 {238 dprintf(("LookupPrivilegeValueW() NIY\n"));239 return FALSE;240 }241 242 243 /*PLF Sat 98-03-07 02:59:20*/244 BOOL WIN32API OpenProcessToken(HANDLE ProcessHandle,245 DWORD DesiredAccess,246 PHANDLE TokenHandle247 )248 {249 dprintf(("OpenProcessToken() NIY\n"));250 return FALSE;251 }252 253 254 //******************************************************************************255 //******************************************************************************256 /*KSO Thu 21.05.1998*/257 BOOL WIN32API SetThreadToken (258 PHANDLE Thread,259 HANDLE Token260 )261 {262 dprintf(("SetThreadToken() NIY\n"));263 return FALSE;264 }265 266 //******************************************************************************267 //******************************************************************************268 /*KSO Thu 21.05.1998*/269 BOOL WIN32API OpenThreadToken (270 HANDLE ThreadHandle,271 DWORD DesiredAccess,272 BOOL OpenAsSelf,273 PHANDLE TokenHandle274 )275 {276 dprintf(("OpenThreadToken() NIY\n"));277 return FALSE;278 }279 280 281 282 283 174 284 175 /***************************************************************************** … … 326 217 327 218 328 /*****************************************************************************329 * Name : AccessCheck330 * Purpose : The AccessCheck function is used by a server application to331 * check a client's access to an object against the access control332 * associated with the object.333 * Parameters: PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor334 * HANDLE ClientToken handle of client access token335 * DWORD DesiredAccess access mask to request336 * PGENERIC_MAPPING GenericMapping address of generic-mapping structure337 * PPRIVILEGE_SET PrivilegeSet address of privilege-set structure338 * LPDWORD PrivilegeSetLength size of privilege-set structure339 * LPDWORD GrantedAccess address of granted access mask340 * LPBOOL AccessStatus address of flag indicating whether access granted341 * Variables :342 * Result :343 * Remark :344 * Status : UNTESTED STUB345 *346 * Author : Patrick Haller [Tue, 1998/06/16 23:00]347 *****************************************************************************/348 349 #define PGENERIC_MAPPING LPVOID350 #define PPRIVILEGE_SET LPVOID351 BOOL WIN32API AccessCheck(PSECURITY_DESCRIPTOR pSecurityDescriptor,352 HANDLE ClientToken,353 DWORD DesiredAccess,354 PGENERIC_MAPPING GenericMapping,355 PPRIVILEGE_SET PrivilegeSet,356 LPDWORD PrivilegeSetLength,357 LPDWORD GrantedAccess,358 LPBOOL AccessStatus)359 {360 dprintf(("ADVAPI32: AccessCheck(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",361 pSecurityDescriptor,362 ClientToken,363 DesiredAccess,364 GenericMapping,365 PrivilegeSet,366 PrivilegeSetLength,367 GrantedAccess,368 AccessStatus));369 370 return (TRUE); /* always grant access */371 }372 219 373 220 … … 662 509 663 510 664 /*****************************************************************************665 * Name : AllocateAndInitializeSid666 * Purpose : The AllocateAndInitializeSid function allocates and initializes667 * a security identifier (SID) with up to eight subauthorities.668 * Parameters: PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority address of identifier authority669 * BYTE nSubAuthorityCount count of subauthorities670 * DWORD dwSubAuthority0 subauthority 0671 * DWORD dwSubAuthority1 subauthority 1672 * DWORD dwSubAuthority2 subauthority 2673 * DWORD dwSubAuthority3 subauthority 3674 * DWORD dwSubAuthority4 subauthority 4675 * DWORD dwSubAuthority5 subauthority 5676 * DWORD dwSubAuthority6 subauthority 6677 * DWORD dwSubAuthority7 subauthority 7678 * PSID *pSid address of pointer to SID679 * Variables :680 * Result :681 * Remark :682 * Status : UNTESTED STUB683 *684 * Author : Patrick Haller [Tue, 1998/06/16 23:00]685 *****************************************************************************/686 687 BOOL WIN32API AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,688 BYTE nSubAuthorityCount,689 DWORD dwSubAuthority0,690 DWORD dwSubAuthority1,691 DWORD dwSubAuthority2,692 DWORD dwSubAuthority3,693 DWORD dwSubAuthority4,694 DWORD dwSubAuthority5,695 DWORD dwSubAuthority6,696 DWORD dwSubAuthority7,697 PSID *pSid)698 {699 dprintf(("ADVAPI32: AllocateAndInitializeSid(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",700 pIdentifierAuthority,701 nSubAuthorityCount,702 dwSubAuthority0,703 dwSubAuthority1,704 dwSubAuthority2,705 dwSubAuthority3,706 dwSubAuthority4,707 dwSubAuthority5,708 dwSubAuthority6,709 dwSubAuthority7,710 pSid));711 712 return (FALSE); /* signal failure */713 }714 715 511 716 512 /***************************************************************************** … … 1064 860 } 1065 861 1066 1067 /*****************************************************************************1068 * Name : CopySid1069 * Purpose : The CopySid function copies a security identifier (SID) to a buffer.1070 * Parameters: DWORD nDestinationSidLength size of buffer for copied SID1071 * PSID pDestinationSid address of buffer for copied SID1072 * PSID pSourceSid address of source SID1073 * Variables :1074 * Result :1075 * Remark :1076 * Status : UNTESTED STUB1077 *1078 * Author : Patrick Haller [Tue, 1998/06/16 23:00]1079 *****************************************************************************/1080 1081 BOOL WIN32API CopySid(DWORD nDestinationSidLength,1082 PSID pDestinationSid,1083 PSID pSourceSid)1084 {1085 dprintf(("ADVAPI32: CopySid(%08xh,%08xh,%08xh)\n",1086 nDestinationSidLength,1087 pDestinationSid,1088 pSourceSid));1089 1090 memcpy((LPVOID)pDestinationSid, /* that's all :) */1091 (LPVOID)pSourceSid,1092 nDestinationSidLength);1093 1094 return (TRUE);1095 }1096 862 1097 863 … … 1627 1393 1628 1394 1629 /*****************************************************************************1630 * Name : EqualPrefixSid1631 * Purpose : The EqualPrefixSid function tests two security-identifier (SID)1632 * prefix values for equality. An SID prefix is the entire SID except1633 * for the last subauthority value.1634 * Parameters: PSID pSid1 address of first SID to compare1635 * PSID pSid2 address of second SID to compare1636 * Variables :1637 * Result :1638 * Remark :1639 * Status : UNTESTED STUB1640 *1641 * Author : Patrick Haller [Tue, 1998/06/16 23:00]1642 *****************************************************************************/1643 1644 BOOL WIN32API EqualPrefixSid(PSID pSid1,1645 PSID pSid2)1646 {1647 dprintf(("ADVAPI32: EqualPrefixSid(%08xh,%08xh) not correctly implemented.\n",1648 pSid1,1649 pSid2));1650 1651 return ( lstrcmpA( (LPCSTR)pSid1,1652 (LPCSTR)pSid2) == 0 ); /* @@@PH roughly ... :) */1653 }1654 1655 1656 /*****************************************************************************1657 * Name : EqualSid1658 * Purpose : The EqualSid function tests two security identifier (SID) values1659 * for equality. Two SIDs must match exactly to be considered equal.1660 * Parameters: PSID pSid1 address of first SID to compare1661 * PSID pSid2 address of second SID to compare1662 * Variables :1663 * Result :1664 * Remark :1665 * Status : UNTESTED STUB1666 *1667 * Author : Patrick Haller [Tue, 1998/06/16 23:00]1668 *****************************************************************************/1669 1670 BOOL WIN32API EqualSid(PSID pSid1,1671 PSID pSid2)1672 {1673 dprintf(("ADVAPI32: EqualSid(%08xh, %08xh) not correctly implemented.\n",1674 pSid1,1675 pSid2));1676 1677 return ( lstrcmpA( (LPCSTR)pSid1,1678 (LPCSTR)pSid2) == 0 ); /* @@@PH roughly ... :) */1679 }1680 1681 1395 1682 1396 /***************************************************************************** … … 1702 1416 1703 1417 return (FALSE); /* signal failure */ 1704 }1705 1706 1707 /*****************************************************************************1708 * Name : FreeSid1709 * Purpose : The FreeSid function frees a security identifier (SID) previously1710 * allocated by using the AllocateAndInitializeSid function.1711 * Parameters: PSID pSid address of SID to free1712 * Variables :1713 * Result :1714 * Remark :1715 * Status : UNTESTED STUB1716 *1717 * Author : Patrick Haller [Tue, 1998/06/16 23:00]1718 *****************************************************************************/1719 1720 PVOID WIN32API FreeSid(PSID pSid)1721 {1722 dprintf(("ADVAPI32: FreeSid(%08xh) not implemented.\n",1723 pSid));1724 return NULL;1725 1418 } 1726 1419 … … 1820 1513 1821 1514 1822 /*****************************************************************************1823 * Name : GetLengthSid1824 * Purpose : The GetLengthSid function returns the length, in bytes, of a1825 * valid SID structure. A SID is a security identifier.1826 * Parameters: PSID pSid address of SID to query1827 * Variables :1828 * Result :1829 * Remark :1830 * Status : UNTESTED STUB1831 *1832 * Author : Patrick Haller [Tue, 1998/06/16 23:00]1833 *****************************************************************************/1834 1835 DWORD WIN32API GetLengthSid(PSID pSid)1836 {1837 dprintf(("ADVAPI32: GetLengthSid(%08xh) not correctly implemented.\n",1838 pSid));1839 1840 return (lstrlenA( (LPCSTR)pSid)); /* @@@PH might not work */1841 }1842 1843 1515 1844 1516 /***************************************************************************** … … 1927 1599 1928 1600 /***************************************************************************** 1929 * Name : GetSecurityDescriptorControl1930 * Purpose : The GetSecurityDescriptorControl function retrieves a security1931 * descriptor's control and revision information.1932 * Parameters: PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor1933 * PSECURITY_DESCRIPTOR_CONTROL pControl address of control structure1934 * LPDWORD lpdwRevision address of revision value1935 * Variables :1936 * Result :1937 * Remark :1938 * Status : UNTESTED STUB1939 *1940 * Author : Patrick Haller [Tue, 1998/06/16 23:00]1941 *****************************************************************************/1942 1943 #define PSECURITY_DESCRIPTOR_CONTROL LPVOID1944 BOOL WIN32API GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor,1945 PSECURITY_DESCRIPTOR_CONTROL pControl,1946 LPDWORD lpdwRevision)1947 {1948 dprintf(("ADVAPI32: GetSecurityDescriptorControl(%08xh,%08xh,%08xh) not implemented.\n",1949 pSecurityDescriptor,1950 pControl,1951 lpdwRevision));1952 1953 return (FALSE); /* signal failure */1954 }1955 1956 1957 /*****************************************************************************1958 * Name : GetSecurityDescriptorDacl1959 * Purpose : The GetSecurityDescriptorDacl function retrieves a pointer to the1960 * discretionary access-control list (ACL) in a specified security descriptor.1961 * Parameters: PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor1962 * LPBOOL lpbDaclPresent address of flag for presence of disc. ACL1963 * PACL *pDacl address of pointer to ACL1964 * LPBOOL lpbDaclDefaulted address of flag for default disc. ACL1965 * Variables :1966 * Result :1967 * Remark :1968 * Status : UNTESTED STUB1969 *1970 * Author : Patrick Haller [Tue, 1998/06/16 23:00]1971 *****************************************************************************/1972 1973 BOOL WIN32API GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,1974 LPBOOL lpbDaclPresent,1975 PACL *pDacl,1976 LPBOOL lpbDaclDefaulted)1977 {1978 dprintf(("ADVAPI32: GetSecurityDescriptorDacl(%08xh,%08xh,%08xh,%08xh) not implemented.\n",1979 pSecurityDescriptor,1980 lpbDaclPresent,1981 pDacl,1982 lpbDaclDefaulted));1983 1984 return (FALSE); /* signal failure */1985 }1986 1987 1988 /*****************************************************************************1989 * Name : GetSecurityDescriptorGroup1990 * Purpose : The GetSecurityDescriptorGroup function retrieves the primary1991 * group information from a security descriptor.1992 * Parameters: PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor1993 * PSID *pGroup address of pointer to group security identifier (SID)1994 * LPBOOL lpbGroupDefaulted address of flag for default1995 * Variables :1996 * Result :1997 * Remark :1998 * Status : UNTESTED STUB1999 *2000 * Author : Patrick Haller [Tue, 1998/06/16 23:00]2001 *****************************************************************************/2002 2003 BOOL WIN32API GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor,2004 PSID *pGroup,2005 LPBOOL lpbGroupDefaulted)2006 {2007 dprintf(("ADVAPI32: GetSecurityDescriptorGroup(%08xh,%08xh,%08xh) not implemented.\n",2008 pSecurityDescriptor,2009 pGroup,2010 lpbGroupDefaulted));2011 2012 return (FALSE); /* signal failure */2013 }2014 2015 2016 /*****************************************************************************2017 * Name : GetSecurityDescriptorLength2018 * Purpose : The GetSecurityDescriptorLength function returns the length, in2019 * bytes, of a structurally valid SECURITY_DESCRIPTOR structure. The2020 * length includes the length of all associated structures, such as2021 * SID and ACL structures.2022 * Parameters: PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor2023 * Variables :2024 * Result :2025 * Remark :2026 * Status : UNTESTED STUB2027 *2028 * Author : Patrick Haller [Tue, 1998/06/16 23:00]2029 *****************************************************************************/2030 2031 #define SECURITY_DESCRIPTOR DWORD2032 DWORD WIN32API GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR pSecurityDescriptor)2033 {2034 dprintf(("ADVAPI32: GetSecurityDescriptorLength(%08xh) not correctly implemented.\n",2035 pSecurityDescriptor));2036 2037 return ( sizeof(SECURITY_DESCRIPTOR) );2038 }2039 2040 2041 /*****************************************************************************2042 * Name : GetSecurityDescriptorOwner2043 * Purpose : The GetSecurityDescriptorOwner function retrieves the owner2044 * information from a security descriptor.2045 * Parameters: PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor2046 * PSID *pOwner address of pointer to owner security identifier (SID)2047 * LPBOOL lpbOwnerDefaulted address of flag for default2048 * Variables :2049 * Result :2050 * Remark :2051 * Status : UNTESTED STUB2052 *2053 * Author : Patrick Haller [Tue, 1998/06/16 23:00]2054 *****************************************************************************/2055 2056 BOOL WIN32API GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor,2057 PSID *pOwner,2058 LPBOOL lpbOwnerDefaulted)2059 {2060 dprintf(("ADVAPI32: GetSecurityDescriptorOwner(%08xh,%08xh,%08xh) not implemented.\n",2061 pSecurityDescriptor,2062 pOwner,2063 lpbOwnerDefaulted));2064 2065 return (FALSE); /* signal failure */2066 }2067 2068 2069 /*****************************************************************************2070 * Name : GetSecurityDescriptorSacl2071 * Purpose : The GetSecurityDescriptorSacl function retrieves a pointer to2072 * the system access-control list (ACL) in a specified security descriptor.2073 * Parameters: PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor2074 * LPBOOL lpbSaclPresent address of flag for presence of system ACL2075 * PACL *pSacl address of pointer to ACL2076 * LPBOOL lpbSaclDefaulted address of flag for default system ACL2077 * Variables :2078 * Result :2079 * Remark :2080 * Status : UNTESTED STUB2081 *2082 * Author : Patrick Haller [Tue, 1998/06/16 23:00]2083 *****************************************************************************/2084 2085 BOOL WIN32API GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,2086 LPBOOL lpbSaclPresent,2087 PACL *pSacl,2088 LPBOOL lpbSaclDefaulted)2089 {2090 dprintf(("ADVAPI32: GetSecurityDescriptorSacl(%08xh,%08xh,%08xh,%08xh) not implemented.\n",2091 pSecurityDescriptor,2092 lpbSaclPresent,2093 pSacl,2094 lpbSaclDefaulted));2095 2096 return (FALSE); /* signal failure */2097 }2098 2099 2100 /*****************************************************************************2101 1601 * Name : GetServiceDisplayNameA 2102 1602 * Purpose : The GetServiceDisplayName function obtains the display name that … … 2225 1725 } 2226 1726 2227 2228 /*****************************************************************************2229 * Name : GetSidIdentifierAuthority2230 * Purpose : The GetSidIdentifierAuthority function returns the address of2231 * the SID_IDENTIFIER_AUTHORITY structure in a specified security identifier (SID).2232 * Parameters: PSID pSid address of SID to query2233 * Variables :2234 * Result :2235 * Remark :2236 * Status : UNTESTED STUB2237 *2238 * Author : Patrick Haller [Tue, 1998/06/16 23:00]2239 *****************************************************************************/2240 2241 PSID_IDENTIFIER_AUTHORITY WIN32API GetSidIdentifierAuthority(PSID pSid)2242 {2243 dprintf(("ADVAPI32: GetSidIdentifierAuthority(%08xh) not implemented.\n",2244 pSid));2245 2246 return (NULL); /* signal failure */2247 }2248 2249 2250 /*****************************************************************************2251 * Name : GetSidLengthRequired2252 * Purpose : The GetSidLengthRequired function returns the length, in bytes,2253 * of the buffer required to store a SID structure with a specified2254 * number of subauthorities.2255 * Parameters: UCHAR nSubAuthorityCount count of subauthorities2256 * Variables :2257 * Result :2258 * Remark :2259 * Status : UNTESTED STUB2260 *2261 * Author : Patrick Haller [Tue, 1998/06/16 23:00]2262 *****************************************************************************/2263 2264 #define SID DWORD2265 DWORD WIN32API GetSidLengthRequired(UCHAR nSubAuthorityCount)2266 {2267 dprintf(("ADVAPI32: GetSidLengthRequired(%u) not correctly implemented.\n",2268 nSubAuthorityCount));2269 2270 return ( sizeof(SID) );2271 }2272 2273 2274 /*****************************************************************************2275 * Name : GetSidSubAuthority2276 * Purpose : The GetSidSubAuthority function returns the address of a2277 * specified subauthority in a SID structure. The subauthority2278 * value is a relative identifier (RID). A SID is a security identifier.2279 * Parameters: PSID pSid address of security identifier to query2280 * DWORD nSubAuthority index of subauthority to retrieve2281 * Variables :2282 * Result :2283 * Remark :2284 * Status : UNTESTED STUB2285 *2286 * Author : Patrick Haller [Tue, 1998/06/16 23:00]2287 *****************************************************************************/2288 2289 LPDWORD WIN32API GetSidSubAuthority(PSID pSid,2290 DWORD nSubAuthority)2291 {2292 dprintf(("ADVAPI32: GetSidSubAuthority(%08xh,%08xh) not implemented.\n",2293 pSid,2294 nSubAuthority));2295 2296 return ( (LPDWORD)pSid ); /* signal failure */2297 }2298 2299 2300 /*****************************************************************************2301 * Name : GetSidSubAuthorityCount2302 * Purpose : The GetSidSubAuthorityCount function returns the address of the2303 * field in a SID structure containing the subauthority count. A2304 * SID is a security identifier.2305 * Parameters: PSID pSid address of security identifier to query2306 * Variables :2307 * Result :2308 * Remark :2309 * Status : UNTESTED STUB2310 *2311 * Author : Patrick Haller [Tue, 1998/06/16 23:00]2312 *****************************************************************************/2313 2314 PUCHAR WIN32API GetSidSubAuthorityCount(PSID pSid)2315 {2316 static UCHAR ucSubAuthorityCount = 1;2317 2318 dprintf(("ADVAPI32: GetSidSubAuthorityCount(%08xh) not implemented.\n",2319 pSid));2320 2321 return (&ucSubAuthorityCount);2322 }2323 2324 2325 /*****************************************************************************2326 * Name : GetTokenInformation2327 * Purpose : The GetTokenInformation function retrieves a specified type of2328 * information about an access token. The calling process must have2329 * appropriate access rights to obtain the information.2330 * Parameters: HANDLE TokenHandle handle of access token2331 * TOKEN_INFORMATION_CLASS TokenInformationClass type of information to retrieve2332 * LPVOID TokenInformation address of retrieved information2333 * DWORD TokenInformationLength size of information buffer2334 * LPDWORD ReturnLength address of required buffer size2335 * Variables :2336 * Result :2337 * Remark :2338 * Status : UNTESTED STUB2339 *2340 * Author : Patrick Haller [Tue, 1998/06/16 23:00]2341 *****************************************************************************/2342 2343 BOOL WIN32API GetTokenInformation(HANDLE TokenHandle,2344 TOKEN_INFORMATION_CLASS TokenInformationClass,2345 LPVOID TokenInformation,2346 DWORD TokenInformationLength,2347 LPDWORD ReturnLength)2348 {2349 dprintf(("ADVAPI32: GetTokenInformation(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",2350 TokenHandle,2351 TokenInformationClass,2352 TokenInformation,2353 TokenInformationLength,2354 ReturnLength));2355 2356 return (FALSE); /* signal failure */2357 }2358 2359 2360 1727 /***************************************************************************** 2361 1728 * Name : ImpersonateLoggedOnUser … … 2402 1769 } 2403 1770 2404 2405 /*****************************************************************************2406 * Name : ImpersonateSelf2407 * Purpose : The ImpersonateSelf function obtains an access token that2408 * impersonates the security context of the calling process. The2409 * token is assigned to the calling thread.2410 * Parameters: SECURITY_IMPERSONATION_LEVEL ImpersonationLevel impersonation level2411 * Variables :2412 * Result :2413 * Remark :2414 * Status : UNTESTED STUB2415 *2416 * Author : Patrick Haller [Tue, 1998/06/16 23:00]2417 *****************************************************************************/2418 2419 BOOL WIN32API ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel)2420 {2421 dprintf(("ADVAPI32: ImpersonateSelf(%08xh) not implemented.\n",2422 ImpersonationLevel));2423 2424 return (TRUE); /* signal OK */2425 }2426 1771 2427 1772 … … 2453 1798 } 2454 1799 2455 2456 /*****************************************************************************2457 * Name : InitializeSid2458 * Purpose : The InitializeSid function initializes a SID structure. An SID2459 * is a security identifier.2460 * Parameters: PSID pSid address of SID to initialize2461 * PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority address of identifier authority2462 * BYTE nSubAuthorityCount count of subauthorities2463 * Variables :2464 * Result :2465 * Remark :2466 * Status : UNTESTED STUB2467 *2468 * Author : Patrick Haller [Tue, 1998/06/16 23:00]2469 *****************************************************************************/2470 2471 BOOL WIN32API InitializeSid(PSID pSid,2472 PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,2473 BYTE nSubAuthorityCount)2474 {2475 dprintf(("ADVAPI32: InitializeSid(%08xh,%08xh,%08xh) not implemented.\n",2476 pSid,2477 pIdentifierAuthority,2478 nSubAuthorityCount));2479 2480 return (FALSE); /* signal failure */2481 }2482 1800 2483 1801 … … 2606 1924 return (TRUE); /* signal OK */ 2607 1925 } 2608 2609 2610 /*****************************************************************************2611 * Name : IsValidSecurityDescriptor2612 * Purpose : The IsValidSecurityDescriptor function validates a2613 * SECURITY_DESCRIPTOR structure. Validation is performed by2614 * checking the revision level of each component in the security descriptor.2615 * Parameters: PSECURITY_DESCRIPTOR pSecurityDescriptor2616 * Variables :2617 * Result :2618 * Remark :2619 * Status : UNTESTED STUB2620 *2621 * Author : Patrick Haller [Tue, 1998/06/16 23:00]2622 *****************************************************************************/2623 2624 BOOL WIN32API IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor)2625 {2626 dprintf(("ADVAPI32: IsValidSecurityDescriptor(%08xh) not implemented.\n",2627 pSecurityDescriptor));2628 2629 return (TRUE); /* signal OK */2630 }2631 2632 2633 /*****************************************************************************2634 * Name : IsValidSid2635 * Purpose : The IsValidSid function validates a SID structure by verifying2636 * that the revision number is within a known range and that the2637 * number of subauthorities is less than the maximum. A SID is a2638 * security identifier.2639 * Parameters: PSID pSid address of SID to query2640 * Variables :2641 * Result :2642 * Remark :2643 * Status : UNTESTED STUB2644 *2645 * Author : Patrick Haller [Tue, 1998/06/16 23:00]2646 *****************************************************************************/2647 2648 BOOL WIN32API IsValidSid(PSID pSid)2649 {2650 dprintf(("ADVAPI32: IsValidSid(%08xh) not implemented.\n",2651 pSid));2652 2653 return (TRUE); /* signal OK */2654 }2655 2656 1926 2657 1927 /***************************************************************************** … … 2843 2113 } 2844 2114 2845 2846 /*****************************************************************************2847 * Name : LookupAccountSidA2848 * Purpose : The LookupAccountSid function accepts a security identifier (SID)2849 * as input. It retrieves the name of the account for this SID and2850 * the name of the first domain on which this SID is found.2851 * Parameters: LPCSTR lpSystemName address of string for system name2852 * PSID Sid address of security identifier2853 * LPTSTR Name address of string for account name2854 * LPDWORD cbName address of size account string2855 * LPTSTR ReferencedDomainName address of string for referenced domain2856 * LPDWORD cbReferencedDomainName address of size domain string2857 * PSID_NAME_USE peUse address of structure for SID type2858 * Variables :2859 * Result :2860 * Remark :2861 * Status : UNTESTED STUB2862 *2863 * Author : Patrick Haller [Tue, 1998/06/16 23:00]2864 *****************************************************************************/2865 2866 BOOL WIN32API LookupAccountSidA(LPCSTR lpSystemName,2867 PSID Sid,2868 LPTSTR Name,2869 LPDWORD cbName,2870 LPTSTR ReferencedDomainName,2871 LPDWORD cbReferencedDomainName,2872 PSID_NAME_USE peUse)2873 {2874 dprintf(("ADVAPI32: LookupAccountSidA(%s,%08xh,%s,%08xh,%s,%08xh,%08xh) not implemented.\n",2875 lpSystemName,2876 Sid,2877 Name,2878 cbName,2879 ReferencedDomainName,2880 cbReferencedDomainName,2881 peUse));2882 2883 return (FALSE); /* signal failure */2884 }2885 2886 2887 /*****************************************************************************2888 * Name : LookupAccountSidW2889 * Purpose : The LookupAccountSid function accepts a security identifier (SID)2890 * as input. It retrieves the name of the account for this SID and2891 * the name of the first domain on which this SID is found.2892 * Parameters: LPCWSTR lpSystemName address of string for system name2893 * PSID Sid address of security identifier2894 * LPWSTR Name address of string for account name2895 * LPDWORD cbName address of size account string2896 * LPWSTR ReferencedDomainName address of string for referenced domain2897 * LPDWORD cbReferencedDomainName address of size domain string2898 * PSID_NAME_USE peUse address of structure for SID type2899 * Variables :2900 * Result :2901 * Remark :2902 * Status : UNTESTED STUB2903 *2904 * Author : Patrick Haller [Tue, 1998/06/16 23:00]2905 *****************************************************************************/2906 2907 BOOL WIN32API LookupAccountSidW(LPCWSTR lpSystemName,2908 PSID Sid,2909 LPWSTR Name,2910 LPDWORD cbName,2911 LPWSTR ReferencedDomainName,2912 LPDWORD cbReferencedDomainName,2913 PSID_NAME_USE peUse)2914 {2915 dprintf(("ADVAPI32: LookupAccountSidW(%s,%08xh,%s,%08xh,%s,%08xh,%08xh) not implemented.\n",2916 lpSystemName,2917 Sid,2918 Name,2919 cbName,2920 ReferencedDomainName,2921 cbReferencedDomainName,2922 peUse));2923 2924 return (FALSE); /* signal failure */2925 }2926 2115 2927 2116 … … 3111 2300 3112 2301 3113 /*****************************************************************************3114 * Name : MakeSelfRelativeSD3115 * Purpose : The MakeSelfRelativeSD function creates a security descriptor3116 * in self-relative format by using a security descriptor in absolute3117 * format as a template.3118 * Parameters: PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor address of absolute SD3119 * PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor address self-relative SD3120 * LPDWORD lpdwBufferLength address of SD size3121 * Variables :3122 * Result :3123 * Remark :3124 * Status : UNTESTED STUB3125 *3126 * Author : Patrick Haller [Tue, 1998/06/16 23:00]3127 *****************************************************************************/3128 3129 BOOL WIN32API MakeSelfRelativeSD(PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,3130 PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,3131 LPDWORD lpdwBufferLength)3132 {3133 dprintf(("ADVAPI32: MakeSelfRelativeSD(%08xh,%08xh,%08xh) not implemented.\n",3134 pAbsoluteSecurityDescriptor,3135 pSelfRelativeSecurityDescriptor,3136 lpdwBufferLength));3137 3138 return (FALSE); /* signal failure */3139 }3140 2302 3141 2303 … … 3164 2326 3165 2327 3166 /*****************************************************************************3167 * Name : NotifyBootConfigStatus3168 * Purpose : The NotifyBootConfigStatus function notifies the service control3169 * manager as to the acceptability of the configuration that booted3170 * the system. An acceptable configuration triggers the storage of3171 * that configuration as the last-known good configuration; an3172 * unacceptable configuration triggers a system reboot.3173 * Parameters: BOOL BootAcceptable indicates acceptability of boot configuration3174 * Variables :3175 * Result :3176 * Remark :3177 * Status : UNTESTED STUB3178 *3179 * Author : Patrick Haller [Tue, 1998/06/16 23:00]3180 *****************************************************************************/3181 3182 BOOL WIN32API NotifyBootConfigStatus(BOOL BootAcceptable)3183 {3184 dprintf(("ADVAPI32: NotifyBootConfigStatus(%08xh) not implemented.\n",3185 BootAcceptable));3186 3187 return (TRUE); /* signal OK */3188 }3189 2328 3190 2329 … … 4099 3238 4100 3239 /***************************************************************************** 4101 * Name : RevertToSelf4102 * Purpose : The RevertToSelf function terminates the impersonation of a client application.4103 * Parameters:4104 * Variables :4105 * Result :4106 * Remark :4107 * Status : UNTESTED STUB4108 *4109 * Author : Patrick Haller [Tue, 1998/06/16 23:00]4110 *****************************************************************************/4111 4112 BOOL WIN32API RevertToSelf(VOID)4113 {4114 dprintf(("ADVAPI32: RevertToSelf() not implemented.\n"));4115 4116 return (TRUE); /* signal OK */4117 }4118 4119 4120 /*****************************************************************************4121 3240 * Name : SetAclInformation 4122 3241 * Purpose : The SetAclInformation function sets information about an access-control list (ACL). … … 4210 3329 } 4211 3330 4212 4213 /*****************************************************************************4214 * Name : SetSecurityDescriptorGroup4215 * Purpose : The SetSecurityDescriptorGroup function sets the primary group4216 * information of an absolute-format security descriptor, replacing4217 * any primary group information already present in the security descriptor.4218 * Parameters: PSECURITY_DESCRIPTOR psd address of security descriptor4219 * PSID psidGroup address of SID for group4220 * BOOL fGroupDefaulted flag for default4221 * Variables :4222 * Result :4223 * Remark :4224 * Status : UNTESTED STUB4225 *4226 * Author : Patrick Haller [Tue, 1998/06/16 23:00]4227 *****************************************************************************/4228 4229 BOOL WIN32API SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR psd,4230 PSID psidGroup,4231 BOOL fGroupDefaulted)4232 {4233 dprintf(("ADVAPI32: SetSecurityDescriptorGroup(%08xh,%08xh,%08xh) not implemented.\n",4234 psd,4235 psidGroup,4236 fGroupDefaulted));4237 4238 return (FALSE); /* signal failure */4239 }4240 4241 4242 /*****************************************************************************4243 * Name : SetSecurityDescriptorOwner4244 * Purpose : The SetSecurityDescriptorOwner function sets the owner information4245 * of an absolute-format security descriptor. It replaces any owner4246 * information already present in the security descriptor.4247 * Parameters: PSECURITY_DESCRIPTOR psd address of security descriptor4248 * PSID psidOwner address of SID for owner4249 * BOOL fOwnerDefaulted flag for default4250 * Variables :4251 * Result :4252 * Remark :4253 * Status : UNTESTED STUB4254 *4255 * Author : Patrick Haller [Tue, 1998/06/16 23:00]4256 *****************************************************************************/4257 4258 BOOL WIN32API SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR psd,4259 PSID psidOwner,4260 BOOL fOwnerDefaulted)4261 {4262 dprintf(("ADVAPI32: SetSecurityDescriptorOwner(%08xh,%08xh,%08xh) not implemented.\n",4263 psd,4264 psidOwner,4265 fOwnerDefaulted));4266 4267 return (FALSE); /* signal failure */4268 }4269 4270 4271 /*****************************************************************************4272 * Name : SetSecurityDescriptorSacl4273 * Purpose : The SetSecurityDescriptorSacl function sets information in a4274 * system access-control list (ACL). If there is already a system4275 * ACL present in the security descriptor, it is replaced.4276 * Parameters:4277 * Variables :4278 * Result :4279 * Remark :4280 * Status : UNTESTED STUB4281 *4282 * Author : Patrick Haller [Tue, 1998/06/16 23:00]4283 *****************************************************************************/4284 4285 BOOL WIN32API SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR psd,4286 BOOL fSaclPresent,4287 PACL pAcl,4288 BOOL fSaclDefaulted)4289 {4290 dprintf(("ADVAPI32: SetSecurityDescriptorSacl(%08xh,%08xh,%08xh,%08xh) not implemented.\n",4291 psd,4292 fSaclPresent,4293 pAcl,4294 fSaclDefaulted));4295 4296 return (FALSE); /* signal failure */4297 }4298 3331 4299 3332 … … 4389 3422 4390 3423 /***************************************************************************** 4391 * Name : SetTokenInformation4392 * Purpose : The SetTokenInformation function sets various types of4393 * information for a specified access token. The information it4394 * sets replaces existing information. The calling process must4395 * have appropriate access rights to set the information.4396 * Parameters: HANDLE hToken handle of access token4397 * TOKEN_INFORMATION_CLASS tic type of information to set4398 * LPVOID lpvInformation address of information to set4399 * DWORD cbInformation size of information buffer4400 * Variables :4401 * Result :4402 * Remark :4403 * Status : UNTESTED STUB4404 *4405 * Author : Patrick Haller [Tue, 1998/06/16 23:00]4406 *****************************************************************************/4407 4408 #define TOKEN_INFORMATION_CLASS DWORD4409 BOOL WIN32API SetTokenInformation(HANDLE hToken,4410 TOKEN_INFORMATION_CLASS tic,4411 LPVOID lpvInformation,4412 DWORD cbInformation)4413 {4414 dprintf(("ADVAPI32: SetTokenInformation(%08xh,%08xh,%08xh,%08xh) not implemented.\n",4415 hToken,4416 tic,4417 lpvInformation,4418 cbInformation));4419 4420 return (FALSE); /* signal failure */4421 }4422 4423 4424 /*****************************************************************************4425 3424 * Name : StartServiceA 4426 3425 * Purpose : The StartService function starts the execution of a service. -
trunk/src/advapi32/ADVAPI32.DEF
r1591 r1894 1 ; $Id: ADVAPI32.DEF,v 1. 7 1999-11-04 12:44:47 phallerExp $1 ; $Id: ADVAPI32.DEF,v 1.8 1999-11-30 19:41:06 sandervl Exp $ 2 2 3 3 ;Created by BLAST for IBM's compiler … … 184 184 ImpersonateSelf = _ImpersonateSelf@4 @72 185 185 InitializeAcl = _InitializeAcl@12 @73 186 InitializeSecurityDescriptor = _InitializeSecurityDescriptor@8 @74186 InitializeSecurityDescriptor = _InitializeSecurityDescriptor@8 @74 187 187 InitializeSid = _InitializeSid@12 @75 188 188 InitiateSystemShutdownA = _InitiateSystemShutdownA@20 @76 -
trunk/src/advapi32/lsa.cpp
r1673 r1894 1 /* $Id: lsa.cpp,v 1. 2 1999-11-09 19:37:44 phallerExp $ */1 /* $Id: lsa.cpp,v 1.3 1999-11-30 19:41:06 sandervl Exp $ */ 2 2 3 3 /* … … 728 728 } 729 729 730 /*****************************************************************************731 * Name : LsaOpenPolicy732 * Purpose : The LsaOpenPolicy function opens a handle to the LSA policy733 * object on a local or remote system.734 * Parameters: PLSA_UNICODE_STRING SystemName,735 * PLSA_OBJECT_ATTRIBUTES ObjectAttributes,736 * ACCESS_MASK DesiredAccess,737 * PLSA_HANDLE PolicyHandle738 * Variables :739 * Result : NTSTATUS740 * Remark :741 * Status : UNTESTED STUB742 *743 * Author : Patrick Haller [Thu, 1999/11/04 23:00]744 *****************************************************************************/745 746 ODINFUNCTION4(NTSTATUS,LsaOpenPolicy,PLSA_UNICODE_STRING, SystemName,747 PLSA_OBJECT_ATTRIBUTES, ObjectAttributes,748 ACCESS_MASK, DesiredAccess,749 PLSA_HANDLE, PolicyHandle)750 {751 dprintf(("ADVAPI32:Lsa: LsaOpenPolicy not implemented.\n"));752 return 0;753 }754 730 755 731 -
trunk/src/advapi32/makefile
r1591 r1894 1 # $Id: makefile,v 1.1 3 1999-11-04 12:44:47 phallerExp $1 # $Id: makefile,v 1.14 1999-11-30 19:41:07 sandervl Exp $ 2 2 3 3 # … … 21 21 TARGET = advapi32 22 22 23 OBJS = advapi32.obj initterm.obj registry.obj lsa.obj 23 OBJS = advapi32.obj initterm.obj registry.obj lsa.obj security.obj 24 24 25 25 … … 29 29 $(TARGET).dll: $(OBJS) $(TARGET).def 30 30 $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \ 31 $(PDWIN32_LIB)/kernel32.lib \31 $(PDWIN32_LIB)/kernel32.lib $(PDWIN32_LIB)/ntdll.lib \ 32 32 $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O) 33 33 $(CP) $@ $(PDWIN32_BIN) … … 48 48 49 49 clean: 50 $(RM) *.obj *.lib *.dll * ~ *.map *.pch50 $(RM) *.obj *.lib *.dll *.map *.pch 51 51 $(RM) $(PDWIN32_BIN)\$(TARGET).dll 52 52 $(RM) $(PDWIN32_LIB)\$(TARGET).lib
Note:
See TracChangeset
for help on using the changeset viewer.