Skip to content

Instantly share code, notes, and snippets.

View rbgarga's full-sized avatar

Renato Botelho rbgarga

View GitHub Profile
Output of update-initramfs -c -k all:
update-initramfs: Generating /boot/initrd.img-6.12.5-0-generic
libkmod: kmod_module_parse_depline: ctx=0xffff99080b80 path=/lib/modules/6.12.5-0-generic/apk-dist/kernel/drivers/net/mii.ko.zst error=No such file or directory
dracut-install: could not get modinfo from '3c59x': No such file or directory
libkmod: kmod_module_parse_depline: ctx=0xffff99080b80 path=/lib/modules/6.12.5-0-generic/apk-dist/kernel/drivers/net/mii.ko.zst error=No such file or directory
libkmod: kmod_module_parse_depline: ctx=0xffff99080b80 path=/lib/modules/6.12.5-0-generic/apk-dist/kernel/drivers/net/mii.ko.zst error=No such file or directory
dracut-install: could not get modinfo from '8139cp': No such file or directory
libkmod: kmod_module_parse_depline: ctx=0xffff99080b80 path=/lib/modules/6.12.5-0-generic/apk-dist/kernel/drivers/net/mii.ko.zst error=No such file or directory
libkmod: kmod_module_parse_depline: ctx=0xffff99080b80 path=/lib/modules/6.12.5-0-generic/apk-dist/kernel/drivers/net/mii
diff --git lib/libc/stdio/gets_s.c lib/libc/stdio/gets_s.c
index 41e379507483..acf0bad71600 100644
--- lib/libc/stdio/gets_s.c
+++ lib/libc/stdio/gets_s.c
@@ -37,6 +37,7 @@
#include "namespace.h"
#include <errno.h>
#include <unistd.h>
+#include <stdbool.h>
#include <stdint.h>
diff --git lib/libc/stdio/gets_s.c lib/libc/stdio/gets_s.c
index 41e379507483..5ced224ba60a 100644
--- lib/libc/stdio/gets_s.c
+++ lib/libc/stdio/gets_s.c
@@ -48,32 +48,29 @@ static inline char *
_gets_s(char *buf, rsize_t n)
{
int c;
+ int size = n;
char *s;
@rbgarga
rbgarga / binary.txt
Created September 28, 2022 17:51
strace Ubuntu 22.04 systemd reboot vs reboot binary on Lenovo ThinkPad x230
# strace ./reboot
execve("./reboot", ["./reboot"], 0x7ffd5f55b8e0 /* 31 vars */) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0x7f45c50f8000
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
sync() = 0
reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_CAD_OFF) = 0
reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART
@rbgarga
rbgarga / gist:910f0a062f0d17a19092231842935999
Created September 28, 2022 17:49
Ubuntu 22.04 systemd reboot on Lenovo ThinkPad x230
# strace reboot
execve("/usr/sbin/reboot", ["reboot"], 0x7ffc2ad73e60 /* 27 vars */) = 0
brk(NULL) = 0x55d4ae24a000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffc202f2740) = -1 EINVAL (Invalid argument)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6cb2f8a000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/systemd/glibc-hwcaps/x86-64-v2/libcap.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/systemd/glibc-hwcaps/x86-64-v2", 0x7ffc202f1960, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/systemd/tls/x86_64/x86_64/libcap.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/systemd/tls/x86_64/x86_64", 0x7ffc202f1960, 0) = -1 ENOENT (No such file or directory)
@rbgarga
rbgarga / git.txt
Created April 23, 2020 18:04
git weirdness
>>> I see the commit 53e5b36834f1 is present on current branch (RELENG_2_4_5)
❯ git log RELENG_2_4_5 | grep -A5 53e5b36834f1 ✘ 130
commit 53e5b36834f1
Author: jim-p <[email protected]>
Date: Fri Jan 3 11:50:09 2020 -0500
Allow sshguard to process via stdin again. Issue #9971
>>> And this commit changed file 'security/sshguard/files/patch-src_sshguard.in'
@rbgarga
rbgarga / rc.conf
Created August 23, 2019 13:03
Failover between ethernet and wifi on FreeBSD
ifconfig_em0="up"
wlans_iwn0="wlan0"
ifconfig_wlan0="WPA"
# Configure wifi interface with the same mac address of em0
create_args_wlan0="wlanaddr 3c:97:0e:48:3f:f8 up"
cloned_interfaces="lagg0"
ifconfig_lagg0="up laggproto failover laggport em0 laggport wlan0 DHCP"
ifconfig_lagg0_ipv6="inet6 accept_rtadv"
rtsold_enable="YES"
diff --git a/security/pfSense-pkg-suricata/Makefile b/security/pfSense-pkg-suricata/Makefile
index b465ba0c87f0..23e621ff992e 100644
--- a/security/pfSense-pkg-suricata/Makefile
+++ b/security/pfSense-pkg-suricata/Makefile
@@ -21,6 +21,8 @@ NO_MTREE= yes
SUB_FILES= pkg-install pkg-deinstall
SUB_LIST= PORTNAME=${PORTNAME}
+.include <bsd.port.pre.mk>
+
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
index b35964d7ab..4c60f9409e 100644
--- a/src/etc/inc/interfaces.inc
+++ b/src/etc/inc/interfaces.inc
@@ -2093,7 +2093,8 @@ function interface_ppps_configure($interface) {
}
}
- if (is_array($ports) && count($ports) > 1) {
+ if (isset($ppp['pppoe-multilink-over-singlelink']) ||
Index: Makefile
===================================================================
--- Makefile (revision 472086)
+++ Makefile (working copy)
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= clixon
-DISTVERSION= 3.6.0.b.20180424
+PORTVERSION= 3.6.1