Commit graph

49 commits

Author SHA1 Message Date
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
Eric Kohl 81b072cc64 [NTOS:SE]
Add a missing ACE(SeAliasAdminsSid / GENERIC_ALL) to the SePublicDefaultDacl ACL. This fixes a kmtest:ObSecurity failure. 

svn path=/trunk/; revision=74050
2017-03-04 14:38:13 +00:00
Thomas Faber c2cc2ba3be [NTOS:SE]
- In SepPropagateAcl, gracefully handle unknown ACE types by simply copying them.
CORE-10694 #resolve

svn path=/trunk/; revision=71296
2016-05-09 08:49:18 +00:00
Stefan Ginsberg e4fd9b81bc - Remove all NT_ASSERT from the kernel and replace with good old ASSERT, for ease of debugging, especially for tests run on the build servers. There is no need to use NT_ASSERT in the kernel.
- The fish is long gone.

svn path=/trunk/; revision=68888
2015-09-01 01:45:59 +00:00
Thomas Faber 6f37e5b2e3 [NTOS:SE]
- Allow any valid ACE revision in SepPropagateAcl
CORE-9955 #resolve

svn path=/trunk/; revision=68594
2015-08-02 12:17:10 +00:00
Thomas Faber ca809b6cdc [NTOS:SE]
- Implement ACL inheritance for SeAssignSecurityEx
CORE-8745 #resolve

svn path=/trunk/; revision=65259
2014-11-04 22:44:50 +00:00
Thomas Faber f7267c995f [NTOSKRNL:SE]
- Use the correct pool tags for allocations in SepCaptureAcl/SepCaptureSid
See issue #7138 for more details.

svn path=/trunk/; revision=56806
2012-06-26 07:21:45 +00:00
Rafal Harabien 2861515d78 [NTOSKRNL]
- Use tags when allocation and freeing memory and define them in tag.h
- Fix some wrongly used tags when freeing
- Our new memory manager doesn't check tags when ExFreePoolWithTag is used. It will be fixed after testing

svn path=/trunk/; revision=52043
2011-06-01 13:39:36 +00:00
Eric Kohl f0910f33d3 [FORMATTING]
No code changes.

svn path=/trunk/; revision=47383
2010-05-28 16:28:27 +00:00
Stefan Ginsberg f11466d9c0 - Make use of _SEH2_YIELD in Ex, Io, Ob, Ps and Se.
- Don't call ExSystemExceptionFilter() if we know the caller is user mode.
- Get rid of a couple of dependencies on the NTSTATUS being initialized with STATUS_SUCCESS -- indicate success where properly instead.

svn path=/trunk/; revision=42942
2009-08-26 17:31:02 +00:00
Stefan Ginsberg 165bfe865b - STDCALL -> NTAPI
svn path=/trunk/; revision=37745
2008-11-29 20:47:48 +00:00
KJK::Hyperion c086cc2302 Everything
Migrate ntoskrnl to PSEH 2.0. The code should speak for itself

modified   ntoskrnl/ex/atom.c
   _SEH_LEAVE was used improperly in NtQueryInformationAtom. As a free bonus, the upgrade to PSEH 2.0 (and to _SEH2_LEAVE) fixes the potential bug

modified   ntoskrnl/fsrtl/fastio.c
   Corrected exception filter logic

modified   ntoskrnl/include/internal/ex.h
   Goodbye _SEH_ExSystemExceptionFilter, you won't be missed

modified   ntoskrnl/include/internal/ntoskrnl.h
   Don't FORCEINLINE functions that use SEH, it's bad form and the compiler doesn't like

modified   ntoskrnl/ke/i386/usercall.c
   Dispatch the correct EXCEPTION_RECORD in case of exception inside KiInitializeUserApc

modified   ntoskrnl/ke/powerpc/exp.c
   Removed bogus, unused SEH code

modified   ntoskrnl/ntoskrnl-generic.rbuild
   Sources using PSEH 2.0 must be compiled with -fno-unit-at-a-time due to a GCC bug. See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17982 and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054
   Apparently, -fno-unit-at-a-time makes GCC crash when using precompiled headers. Disable precompiled headers for ntoskrnl

svn path=/trunk/; revision=37615
2008-11-24 13:40:26 +00:00
Aleksey Bragin 9dc0da2dea - Reformat Se code and put functions to more appropriate locations.
svn path=/trunk/; revision=33129
2008-04-23 20:38:37 +00:00
Aleksey Bragin 379a429aa9 - Remove autoupdated "$Id:" lines from the kernel source code.
svn path=/trunk/; revision=32623
2008-03-09 14:11:42 +00:00
Alex Ionescu 05d2982786 - Revert 26244, 26245, 26246, 26247.
- Stop committing on crack.
- Read IRC logs and use your head.
- GCC 3.4.5 is buggy, don't use. Don't break good code to hide compiler bugs.

svn path=/trunk/; revision=26248
2007-04-02 15:08:54 +00:00
Magnus Olsen ceac8e2667 fixing the build for gcc 3.4.5
svn path=/trunk/; revision=26246
2007-04-02 09:48:51 +00:00
Alex Ionescu caaa37c1ac - Support INIT section pragmas for msvc. Patch by Brezenbak.
svn path=/trunk/; revision=19732
2005-11-28 23:25:31 +00:00
Alex Ionescu 11272023e5 Part 1 of <many> ntoskrnl header cleanups
svn path=/trunk/; revision=17844
2005-09-13 23:28:21 +00:00
Thomas Bluemel 5e348c00c1 - use inlined probing macros for basic types
- minor optimizations by comparing the processor mode against KernelMode (==0) instead of UserMode (==1)

svn path=/trunk/; revision=17467
2005-08-21 19:04:23 +00:00
KJK::Hyperion 321df5d69c Partial merge from the ROX-U branch (various fixes for Visual C++ compilation, see logs for r16198 and r16208)
svn path=/trunk/; revision=16212
2005-06-21 23:42:58 +00:00
Alex Ionescu b09db8ab65 Nonpaged Pool Liberation Day: Allow PagedPool to be used earlier, allow fast mutex to be used earlier on debug builds. Allocate all Se stuff from PagedPool, set the right object types to use paged pool, allocate all strings from paged pool, allocate PE sections from paged pool, and a bunch of other things which should, imo, be in paged pool. If anyone has any contradicting proof, let me know...until then, enjoy ~4-6MB more NonPagedPool
svn path=/trunk/; revision=15492
2005-05-25 04:16:56 +00:00
Steven Edwards 7fb3ebb9f9 move the rest of the alread defined tags to the private tag.h
svn path=/trunk/; revision=15427
2005-05-20 04:33:47 +00:00
Steven Edwards e4be245882 strip whitespace from end of lines
svn path=/trunk/; revision=15164
2005-05-09 01:38:29 +00:00
Thomas Bluemel 322dbd6fba Thomas Weidenmueller <w3seek@reactos.com>
- Fix various security structures and constants
- Add code to capture quality of service structures and ACLs
- Secure buffer access in NtQueryInformationToken, NtSetInformationToken, NtNotifyChangeDirectoryFile and NtQueryDirectoryFile

svn path=/trunk/; revision=13984
2005-03-12 22:16:02 +00:00
Thomas Bluemel ea5929db62 1. added irql checks to various rtl and security functions
2. RtlGetVersion needs to be implemented differently in ntoskrnl and ntdll, ntoskrnl's version must not access the PEB (which might not be present) while ntdlls gets most information from the PEB structure
3. can't use spinlocks to serialize access to the security descriptor cache since it calls sd rtl functions which require to run < apc level

svn path=/trunk/; revision=13712
2005-02-22 17:58:19 +00:00
Alex Ionescu fe6116543e Standardize comment headers. Patch by Trevor McCort
svn path=/trunk/; revision=13311
2005-01-26 13:58:37 +00:00
Alex Ionescu afbaa12f82 Fix my previous patch and fix ACCESS_TOKEN being declared as a structure. This is incompatible with DDK/W32API because ACCESS_TOKEN is a PVOID. The real structure is TOKEN. Also, structure has been updated.
svn path=/trunk/; revision=12740
2005-01-02 23:12:40 +00:00
Filip Navara c5adfe4512 - Fix definitions of SecurityAnonymous, SecurityIdentification, SecurityImpersonation, SecurityDelegation.
- Fix prototype of NtDuplicateToken and change DuplicateTokenEx accordingly.
- Implement NtOpenThreadToken[Ex] (complete rewrite), PsDisableImpersonation and PsRestoreImpersonation.

svn path=/trunk/; revision=11999
2004-12-10 16:50:38 +00:00
Filip Navara d00861b8e8 - Fix ACL size calculation in SepInitDACLs.
- Fix size check in RtlpAddKnownAce.

svn path=/trunk/; revision=11567
2004-11-06 21:32:16 +00:00
Casper Hornstrup 1bf0775833 2004-08-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* ntoskrnl/include/.cvsignore: New file.
	* ntoskrnl/include/ntoskrnl.h: Ditto.
	* ntoskrnl/*/*.c: Use pre-compiled header.
	* ntoskrnl/Makefile: Support pre-compiled header.
	* tools/helper.mk: .pch files are now .gch files.

svn path=/trunk/; revision=10550
2004-08-15 16:39:12 +00:00
Alex Ionescu 3c1d312107 Added RTL Stubs, Prototypes and Exports.
svn path=/trunk/; revision=10404
2004-08-05 18:17:37 +00:00
Eric Kohl 23dac2681b Create missing default DACLs.
svn path=/trunk/; revision=10184
2004-07-17 20:32:11 +00:00
Eric Kohl 8a81d07bde Fix stupid cut&paste bug.
svn path=/trunk/; revision=8001
2004-02-02 20:59:46 +00:00
Eric Kohl fb0bca238a Use ACL constants and fix ACL-revision checks.
svn path=/trunk/; revision=7990
2004-02-02 12:05:41 +00:00
Thomas Bluemel 583de66b3e tamlin's work on compiling the kernel with another compiler than GCC. Patch by Mike Nordell.
svn path=/trunk/; revision=7460
2004-01-05 14:28:21 +00:00
Aleksey Bragin 49f967d0ed Continue of MSVC-compiling changes....
I double checked, but in case someone's recent commit is somehow overwritten -- please, don't be very frustrated :) -- I will fix it, just drop me a note.

svn path=/trunk/; revision=7338
2003-12-30 18:52:06 +00:00
Hartmut Birr 2a1821394f - Fixed the freeing of memory from boot load drivers.
- Put all init functions in a special section and do free
  the memory from this section after system initialization.

svn path=/trunk/; revision=6296
2003-10-12 17:05:50 +00:00
Royce Mitchell III 59d5c9f016 finished applying @implemented and @unimplemented comments and remove the comments from non-api functions
svn path=/trunk/; revision=5068
2003-07-11 01:23:16 +00:00
Eric Kohl 0c2028b391 Added missing Acl and SD functions from ntdll.
svn path=/trunk/; revision=4156
2003-02-15 21:07:49 +00:00
Casper Hornstrup c28439db70 2002-10-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/tests/tokentest/tokentest.c (ROS_ACE_HEADER): Move field
	AccessMask ...
	(ROS_ACE): ... here.
	(DisplayDacl): Make pAce an ROS_ACE*; Use new path for AceType; Use
	sizeof(ACE) instead of sizeof(ACE_HEADER).
	* include/ntos/security.h (ACE_HEADER): Move field AccessMask ...
	(ACE): ... here.
	* lib/ntdll/rtl/acl.c: Use new path for AccessMask.
	* ntoskrnl/se/semgr.c: Ditto.
	* ntoskrnl/se/acl.c (SepInitDACLs): Use new path for AccessMask; Use
	sizeof(ACE) instead of sizeof(ACE_HEADER).
	* ntoskrnl/se/token.c (SepCreateSystemProcessToken): Use sizeof(ACE)
	instead of sizeof(ACE_HEADER).

svn path=/trunk/; revision=3654
2002-10-25 21:48:00 +00:00
Casper Hornstrup 17c0b5798e Reverted latest changes.
svn path=/trunk/; revision=3473
2002-09-08 10:23:54 +00:00
Casper Hornstrup 387d432884 Use free Windows DDK and compile with latest MinGW releases.
svn path=/trunk/; revision=3466
2002-09-07 15:13:13 +00:00
Eric Kohl fd874ecc14 Fix bug in RtlpAddKnownAce() that caused it to place the SID in the wrong location.
Teach RtlpAddKnownAce() some status values other than STATUS_UNSUCCESSFUL.
(Patch by Joseph Galbraith)

svn path=/trunk/; revision=3089
2002-06-15 10:09:17 +00:00
Eric Kohl bb14287865 - Implement NtCreateToken()
- Implement RtlGetAce()
- Fix bug which cause RtlCreateAcl() to always fail.
- Cleanup parameter names and fix bug that caused a buffer overrun in RtlCopySidAndAttributesArray()
- When referencing the token object in NtQueryInformationToken() pass in either TOKEN_QUERY access or TOKEN_QUERY_SOURCE access. Passing in zero led to ObReferenceObjectByHandle() always failing with ACCESS_DENIED.
- Fixed NtQueryInformationToken() to check the buffer length and return STATUS_BUFFER_TO_SMALL and the required length.
- Ensure that the ReturnLength is set correctly when NtQueryInformationToken() succeeds. Previously, it was set to the number of bytes unused in the user buffer in some cases or not set at all.
- Handle case of NULL default dacl correctly in NtQueryInformationToken()
- Update main makefile to build apps\utils.
- Update makefiles in apps\utils to have the correct PATH_TO_TOP.
- Update main makefile to build apps\tests\tokentest

Written by Joseph Galbraith.

svn path=/trunk/; revision=3024
2002-06-07 23:00:20 +00:00
Eric Kohl 8393800e76 Started security manager initialization.
Some cleanup.

svn path=/trunk/; revision=2637
2002-02-20 20:16:49 +00:00
Eric Kohl 48c46844eb Added hal functions
Fixed se functions

svn path=/trunk/; revision=1105
2000-04-05 15:52:45 +00:00
David Welch 623093eaaa Implemented more security functions
Moved general security types into new header file
Implemented ThreadImpersonationToken info class
Bug fixes to queuing code

svn path=/trunk/; revision=919
2000-01-05 21:57:00 +00:00
Emanuele Aliberti ea5959a772 Some missing __stdcall declarations added in headers and in code.
svn path=/trunk/; revision=903
1999-12-26 17:22:19 +00:00
David Welch 4d5643a96a Added some security functions
Changes to csrss console support
Fixed bug in gdt.c

svn path=/trunk/; revision=901
1999-12-26 15:50:53 +00:00