sysutils/runas: Update to 0.2.0

Add asroot alias, equivalent to "runas root"
Give user control over "su" flags
Guard against Trojan "su" commands

Changes: https://github.com/outpaddling/runas/releases
This commit is contained in:
bacon 2023-10-29 11:46:46 +00:00
parent 5f5a2da154
commit 1d2081cbf0
4 changed files with 9 additions and 53 deletions

View File

@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.1 2023/09/11 14:01:39 bacon Exp $
# $NetBSD: Makefile,v 1.2 2023/10/29 11:46:46 bacon Exp $
DISTNAME= runas-0.1.1
DISTNAME= runas-0.2.0
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_GITHUB:=outpaddling/}
GITHUB_PROJECT= runas

View File

@ -1,3 +1,5 @@
@comment $NetBSD: PLIST,v 1.1 2023/09/11 14:01:39 bacon Exp $
@comment $NetBSD: PLIST,v 1.2 2023/10/29 11:46:46 bacon Exp $
bin/asroot
bin/runas
man/man1/asroot.1
man/man1/runas.1

View File

@ -1,6 +1,5 @@
$NetBSD: distinfo,v 1.1 2023/09/11 14:01:39 bacon Exp $
$NetBSD: distinfo,v 1.2 2023/10/29 11:46:46 bacon Exp $
BLAKE2s (runas-0.1.1.tar.gz) = 243575aeb11ee27d883adb023410f1934633478da8e093fd7e1136e1e7b78306
SHA512 (runas-0.1.1.tar.gz) = 1eca9dbf5bfe805a4902542a4f556a632ab6cc0a807245cea5c56d606174e705fa6e4d2558b5f31c8b1242fabcfcf17740ad8a13cf1ff8d0681f1c001b0c1527
Size (runas-0.1.1.tar.gz) = 4084 bytes
SHA1 (patch-runas.c) = d0a50e953b76e535cb7a209614411341fa47631b
BLAKE2s (runas-0.2.0.tar.gz) = f450fcde7f37f2a27e5786c9aa852d23f3333f9746c0d82f2828292c658a4b27
SHA512 (runas-0.2.0.tar.gz) = c18263364f15251c0ad5c756de886ac4a8e666e9220cfec2f357d1e164e583a2d65c00ee13740f6482e61ced7c1a6f609a7357e6bb1d09a6fdb37b6b782a7011
Size (runas-0.2.0.tar.gz) = 4920 bytes

View File

@ -1,45 +0,0 @@
$NetBSD: patch-runas.c,v 1.1 2023/09/11 14:01:39 bacon Exp $
# Linux missing strl*()
--- runas.c.orig 2021-02-04 13:39:53.796790582 +0000
+++ runas.c
@@ -18,6 +18,11 @@
#include <unistd.h>
#include <limits.h>
+#ifdef __linux__
+#define ARG_MAX 2097152 // getconf ARG_MAX CentOS 7
+#endif
+
+// Remove usage() from libbacon?
void usage(char *argv[])
{
@@ -25,6 +30,26 @@ void usage(char *argv[])
exit(EX_USAGE);
}
+#ifdef __linux__
+size_t strlcat(char *dest,const char *src,size_t maxlen)
+
+{
+ char *dp,*sp;
+
+ /* Find end of first string */
+ for (dp=dest; (*dp != '\0') && --maxlen; ++dp)
+ ;
+
+ /* Concetanate second string */
+ for (sp=(char *)src; (*sp != '\0') && --maxlen; )
+ *dp++ = *sp++;
+
+ /* Null terminate */
+ *dp = '\0';
+ return dp-dest;
+}
+#endif
+
int main(int argc,char *argv[])
{