Login Accounting Overview of utmp and wtmp Files

Login Accounting

Capabilities-Only Environments, Securebits, Discovering Required Capabilities & Older Kernels

Linux Capabilities Changing Capabilities Programmatically

Linux Capabilities Effect of Changing User IDs on Capabilities

ransformation During exec() & The Bounding Set

Linux Capabilities Part 3: Process & File Capability Sets

The Linux Capabilities Table

Linux Capabilities Introduction & Rationale

DoS Defense, Return Status Checking, and Safe Failure

Stack Crashing, Dangerous Functions, and Safe Alternatives

Environment Variables, Input Validation, and Runtime Assumptions

Pitfalls in File Operations and File I/O

Beware of Signals and Race Conditions

Linux Capabilities, chroot Jails, and Virtualization

Memory Erasure, Core Dumps, and mlock()

Safe exec(), Avoiding Shell Execution, Closing File Descriptors

Operate with Least Privilege — Temporarily and Permanently Dropping Privileges

Writing Secure Privileged Programs

Routing Log Messages to Files, Consoles & Remote Hosts

openlog(), syslog(), closelog(), setlogmask()

The syslog Logging System

Using SIGHUP to Reinitialize a Daemon

Guidelines for Writing Daemons SIGTERM, Memory Leaks, Single Instance

Creating a Daemon Process– Part 2: Step-by-Step Daemon Creation & becomeDaemon()

What is a Daemon Process?

Linux Daemons Complete Tutorial Series

Exercises with Full Solution Code

Chapter Summary Process Resources

RLIMIT_STACK Stack Size Limit: SIGSEGV, Alternate Signal Stack, argv/env Space

RLIMIT_SIGPENDING Queued Signals per Real User ID: sigqueue(), kill() Exception, /proc/PID/status SigQ

RLIMIT_RTTIME Realtime CPU Time in Microseconds: SIGXCPU, SIGKILL, Blocking Syscall Reset

RLIMIT_RTPRIO Realtime Scheduling Priority Ceiling

RLIMIT_RSS Resident Set Size Limit

RLIMIT_NPROC Process Count per Real User ID: fork/EAGAIN, threads-max, /proc/PID/status

RLIMIT_NOFILE Max File Descriptors: EMFILE, NR_OPEN, nr_open, file-max

RLIMIT_NICE Nice Value Ceiling: Ceiling Formula, nice(), sched_setscheduler()

RLIMIT_MSGQUEUE POSIX Message Queue Bytes Limit: mq_open(), mq_attr

RLIMIT_MEMLOCK Locked Memory Limit: mlock(), mlockall(), MCL_FUTURE

RLIMIT_FSIZE Maximum File Size: SIGXFSZ & EFBIG