Download Cygwin User's Guide
Transcript
Chapter 2. Setting Up Cygwin
main()
{
unsigned int bit=0x40000000, sum=0;
char *x;
while (bit > 4096)
{
x = malloc(bit);
if (x)
sum += bit;
bit >>= 1;
}
printf("%08x bytes (%.1fMb)\n", sum, sum/1024.0/1024.0);
return 0;
}
You can compile this program using:
gcc max_memory.c -o max_memory.exe
Run the program and it will output the maximum amount of allocatable memory.
2.4. NT security and usage of ntsec
The setting of UNIX like object permissions is controlled by the CYGWIN environment variable setting
(no)ntsec which is set to ntsec by default.
The design goal of ntsec is to get a more UNIX-like permission structure based upon the security
features of Windows NT. To describe the changes, I will first give a short overview in Section 2.4.1.
Process privileges discusses the changes in ntsec related to privileges on processes.
File permissions shows the basics of UNIX-like setting of file permissions.
NT SIDs in Cygwin talks about using SIDs in /etc/passwd and /etc/group.
The mapping leak illustrates the permission mapping leak of Windows NT.
The ACL API describes in short the ACL API since release 1.1.
New setuid concept describes the new support of a setuid concept introduced with release 1.1.3.
Switching User Context gives the basics of using the SYSTEM user to switch user context.
15