Jadi on Nostr: Have 10mins to deepen your understanding of #Unix like systems? Check the utistd.h ...
Have 10mins to deepen your understanding of #Unix like systems?
Check the utistd.h page. This is the header file that provides access to the POSIX operating system API. Even a quick browse can show you how your program talks with your OS.
https://en.wikipedia.org/wiki/Unistd.hFor example whenever your program needs a higher privilege (or to act as another user), it calls `setuid` for that. Or starts with `sudo/doas` to have a higher access but calls `setuid` to become "nobody" in most of its life cycle.
If still have a click to spare, check the setuid.h on #OpenBSD man pages:
https://man.openbsd.org/setuid.2in most cases OpenBSD man pages are the best references you need to understand the OS.
#BSD #Linux
Published at
2024-05-08 06:56:27Event JSON
{
"id": "dbaa40418250a7166bdd1c0759286eb1c77bdec6fb02db3633cf7fa883391b62",
"pubkey": "c28aece562af2d5d33e79775d29fe6026023e55e641bfc03e138b2066ed9113a",
"created_at": 1715151387,
"kind": 1,
"tags": [
[
"t",
"unix"
],
[
"t",
"openbsd"
],
[
"t",
"bsd"
],
[
"t",
"linux"
]
],
"content": "Have 10mins to deepen your understanding of #Unix like systems? \n\nCheck the utistd.h page. This is the header file that provides access to the POSIX operating system API. Even a quick browse can show you how your program talks with your OS. \n\nhttps://en.wikipedia.org/wiki/Unistd.h\n\nFor example whenever your program needs a higher privilege (or to act as another user), it calls `setuid` for that. Or starts with `sudo/doas` to have a higher access but calls `setuid` to become \"nobody\" in most of its life cycle.\n\nIf still have a click to spare, check the setuid.h on #OpenBSD man pages:\n\nhttps://man.openbsd.org/setuid.2\n\nin most cases OpenBSD man pages are the best references you need to understand the OS. \n#BSD #Linux ",
"sig": "1201ec3620803236ee9d1505005623ad6d21aa364a60a7a1874f214f3af0c4241135805cb480773d38bf39906d30e00bfaf685536e2f39355d6e6da7a36bce5e"
}