Skip to content

Instantly share code, notes, and snippets.

@ok-ryoko
ok-ryoko / f38-custom-os-suid-root-binaries.md
Last active November 28, 2024 19:08
SUID-root Binaries in Fedora Custom OS 38

Warning

The author does not maintain this report actively. Please see their reports on newer versions of Fedora Linux for up-to-date information and corrections of errors.

SUID-root Binaries in Fedora Custom OS 38

by [OK Ryoko], revision 2024-11-28.3

Assumed audience: Linux system administrators, Linux utility authors and [Fedora Linux] package maintainers. Familiarity with process credentials, capabilities, syscalls, [strace], [Linux PAM] and [SELinux] is assumed.

I dive into all the SUID-root binaries that come with a minimal installation of [Fedora Server] 38. I also discuss the use of file capabilities to limit the level of privilege attainable by those programs.

@de-wim
de-wim / enable_hibernation.sh
Created October 20, 2022 08:02
Hibernation enablement script for Fedora
#!/bin/bash
# Based on https://fedoramagazine.org/hibernation-in-fedora-36-workstation/
set -eo pipefail
ZRAM_KBYTES=$(cat /proc/swaps | grep zram0 | sed -E 's/\s+/\t/g' | cut -f 3)
TOTAL_RAM=$(free -k | egrep ^Mem: | sed -E "s/ +/\t/g" | cut -f2)
TOTAL_ZRAM=0
UNCOMPRESSED_RAM=${TOTAL_RAM}
for ZRAM in ${ZRAM_KBYTES}; do
#!/bin/bash
# Spotify song recorder. Records songs played back with Spotify to ~/Music, as MP3 files with correct-ish ID3 tags.
# Songs are organized by album, one directory per album.
# Only works on Linux with pulseaudio (or pipewire).
#
# For Ubuntu users: apt install sox libsox-fmt-mp3 id3
# TODO: record into playlist directory instead of album
LAST_FILENAME=""
@Eliastik
Eliastik / update-hosts.sh
Last active November 10, 2024 06:16 — forked from glesica/update-hosts.sh
A quick shell script that will automatically update a Linux HOSTS file to block domains (ads, malwares, ...). Support multiple hosts sources, initial host file and incorrect/malicious entries checking.
#!/bin/bash
# Filename: update-hosts.sh
#
# Author: George Lesica <george@lesica.com>
# Enhanced by Eliastik ( eliastiksofts.com/contact )
# Version 1.3 (22 april 2021) - Eliastik
#
# Description: Replaces the HOSTS file with hosts lists from Internet,
# creating a backup of the old file. Can be used as an update script.