From e431ab3c24acc5309531a26d71e761619bd69eec Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 14 Feb 2025 12:44:55 +0900 Subject: app: check username length against LOGIN_NAME_MAX This limit is arbitrary, but it's good to enforce it anyway. Signed-off-by: Ophestra --- internal/sysconf.go | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 internal/sysconf.go (limited to 'internal/sysconf.go') diff --git a/internal/sysconf.go b/internal/sysconf.go new file mode 100644 index 00000000..03b236f4 --- /dev/null +++ b/internal/sysconf.go @@ -0,0 +1,6 @@ +package internal + +//#include +import "C" + +func Sysconf_SC_LOGIN_NAME_MAX() int { return int(C.sysconf(C._SC_LOGIN_NAME_MAX)) } -- cgit v1.3.1