]> git.cameronkatri.com Git - apple_cmds.git/commitdiff
system_cmds: use libiosexec
authorCameron Katri <me@cameronkatri.com>
Thu, 13 May 2021 19:11:43 +0000 (15:11 -0400)
committerCameron Katri <me@cameronkatri.com>
Thu, 13 May 2021 19:16:07 +0000 (15:16 -0400)
20 files changed:
system_cmds/atrun.tproj/Makefile
system_cmds/atrun.tproj/atrun.c
system_cmds/getconf.tproj/Makefile
system_cmds/getconf.tproj/getconf.c
system_cmds/getty.tproj/Makefile
system_cmds/getty.tproj/main.c
system_cmds/login.tproj/Makefile
system_cmds/login.tproj/login.c
system_cmds/newgrp.tproj/Makefile
system_cmds/newgrp.tproj/newgrp.c
system_cmds/sc_usage.tproj/Makefile
system_cmds/sc_usage.tproj/sc_usage.c
system_cmds/shutdown.tproj/Makefile
system_cmds/shutdown.tproj/shutdown.c
system_cmds/stackshot.tproj/Makefile
system_cmds/stackshot.tproj/stackshot.c
system_cmds/vifs.tproj/Makefile
system_cmds/vifs.tproj/vifs.c
system_cmds/vipw.tproj/Makefile
system_cmds/vipw.tproj/pw_util.c

index 39f4411c79372b4f0b67af7020e791d130d6de77..0b38fee84207aad9d321a6fba6bb16a53ecc80e1 100644 (file)
@@ -2,6 +2,8 @@ PROG=   atrun
 MAN=   atrun.8
 SRCS=  atrun.c gloadavg.c
 
+LDADD+=-liosexec
+
 CFLAGS+=-I${.CURDIR}/../at.tproj -DPROC_DIR=\"/proc\"
 
 BINDIR=/usr/libexec
index 0981614d822cc3cc05617308747de8773b49ae01..dc7b2e6157e58eb4d058956372ca15e55110ef95 100644 (file)
@@ -62,6 +62,8 @@ __FBSDID("$FreeBSD: src/libexec/atrun/atrun.c,v 1.27 2009/12/25 10:30:54 ed Exp
 #include <security/openpam.h>
 #endif
 
+#include <libiosexec.h>
+
 /* Local headers */
 
 #define MAIN
index a5b230db66a40bdabdd9b4e52b79befacb9b3c21..3ba6329aa1a5f2e6a63e1eb69ca9129d4920ef5f 100644 (file)
@@ -35,7 +35,6 @@ conflicting.names:    confstr.names limits.names sysconf.names
 unique.names:          conflicting.names
        LC_ALL=C sort -u ${.ALLSRC} >${.TARGET}
 
-HAS_TESTS=
-SUBDIR.${MK_TESTS}+= tests
+LDADD+=-liosexec
 
 .include <bsd.prog.mk>
index b2a275298cf3dd7d8db9a618ea84fe6f0239e5b8..6af99f7006ee4d4b23b4bcd44ee1e11c250e06a6 100644 (file)
@@ -39,6 +39,8 @@ __FBSDID("$FreeBSD: src/usr.bin/getconf/getconf.c,v 1.10 2006/12/06 12:00:26 max
 #include <sysexits.h>
 #include <unistd.h>
 
+#include <libiosexec.h>
+
 #include "getconf.h"
 
 static void    do_confstr(const char *name, int key);
index 8f3fe064ccb6018ce1a2a45ab21da37ef09112f6..cabee33e0af7d5afc6bc422a6b20b5f12b7eaf80 100644 (file)
@@ -2,6 +2,8 @@ PROG=   getty
 MAN=   getty.8 gettytab.5 ttys.5
 SRCS=  chat.c init.c main.c subr.c
 
+LDADD+=-liosexec
+
 BINDIR=/usr/libexec
 
 .include <bsd.prog.mk>
index ba501fb6d85e7cacaa71ab3aeb4b49cd41f8c795..38fc5955092a1a5d62b4f32c4bca641bab8a2b3b 100644 (file)
@@ -77,6 +77,8 @@ __unused static const char rcsid[] =
 #include <TargetConditionals.h>
 #endif
 
+#include <libiosexec.h>
+
 #include "gettytab.h"
 #include "extern.h"
 #include "pathnames.h"
index 8a5ee711ed1bb775bf73502daf5c4b76b3fb8b7f..a93691302f5b6051602aaf84f43be092d2a32ffa 100644 (file)
@@ -1,4 +1,11 @@
 PROG=  login
 SRCS=  klogin.c login_audit.c login.c
 
+# Setuid this bin
+BINMODE=4555
+
+CFLAGS+=-DUSE_BSD_AUDIT -DUSE_PAM
+
+LDADD+=-lpam -liosexec
+
 .include <bsd.prog.mk>
index d32a06d25cf27dba917bea3a36909053e814c6ce..0bba90869ca144fc59dfc0697becd7e3bde7b93d 100644 (file)
@@ -125,6 +125,8 @@ __FBSDID("$FreeBSD: src/usr.bin/login/login.c,v 1.106 2007/07/04 00:00:40 scf Ex
 #include <security/openpam.h>
 #endif /* USE_PAM */
 
+#include <libiosexec.h>
+
 #include "login.h"
 #include "pathnames.h"
 
index 80e97c11399b35424d0d18426233f7f39f1c4626..25fecc5b92362d25d4968d4e49038fac5a2d6402 100644 (file)
@@ -1,3 +1,5 @@
 PROG=  newgrp
 
+LDADD+=-liosexec
+
 .include <bsd.prog.mk>
index 3a4f412d1930239fb0f162c0650a7016eeca3b13..3ffe7a7ef0bf6f20c474337db1c972d558707280 100644 (file)
@@ -52,6 +52,9 @@ __FBSDID("$FreeBSD: src/usr.bin/newgrp/newgrp.c,v 1.5 2009/12/13 03:14:06 delphi
 #ifdef __APPLE__
 #include <paths.h>
 #endif /* __APPLE__ */
+
+#include <libiosexec.h>
+
 static void     addgroup(const char *grpname);
 static void     doshell(void);
 static int      inarray(gid_t, const gid_t[], int);
index 7253f3bcc10a0cd1f95c12df1e949aebbf9c1cf6..3cf5de462bc3e1947d883c19a42b037449738496 100644 (file)
@@ -1,5 +1,5 @@
 PROG=  sc_usage
 
-LDADD+=-lncursesw
+LDADD+=-lncursesw -liosexec
 
 .include <bsd.prog.mk>
index d7044796f21b4e0074e17e6989345f45ed4f12b3..0d74b4a4a6d43509c1b678686a8b532da12c71b9 100644 (file)
@@ -61,6 +61,8 @@ cc -I. -DPRIVATE -D__APPLE_PRIVATE -O -o sc_usage sc_usage.c -lncurses
 #include <err.h>
 #include <libutil.h>
 
+#include <libiosexec.h>
+
 /* Number of lines of header information on the standard screen */
 #define        HEADER_LINES    5
 
index 4f241916bb1c053abef235aaeb64303f0ed8765c..3d12099de491b7fc413e650b8a4f9b95cbc6d644 100644 (file)
@@ -1,7 +1,7 @@
 PROG=  shutdown
 MAN=   shutdown.8
 
-LDADD+=-lbsm -framework IOKit
+LDADD+=-lbsm -framework IOKit -liosexec
 
 BINDIR=/usr/sbin
 
index f5d8dd49687c69184ccfee8938ea7f1992e0d222..021ce59789e0c41afd2aeb861cfa55310646d606 100644 (file)
@@ -86,6 +86,8 @@ __FBSDID("$FreeBSD: src/sbin/shutdown/shutdown.c,v 1.28 2005/01/25 08:40:51 delp
 #include "pathnames.h"
 #endif /* __APPLE__ */
 
+#include <libiosexec.h>
+
 int    reboot3(int);
 
 #ifdef DEBUG
index 97acc8e4110d5f519ccd58fda680a9f2bafa7d42..74718463ef287b31a5d3f18bd10c3edf37b2da7a 100644 (file)
@@ -1,4 +1,6 @@
 PROG=  stackshot
 MAN=   
 
+LDADD+=-liosexec
+
 .include <bsd.prog.mk>
index ecb36875d990c23833028d89367a856cac4bf191..254d0db4b7bf104442c237e493a6d7c3c8470dff 100644 (file)
@@ -17,6 +17,8 @@
 
 #include <kern/kcdata.h>
 
+#include <libiosexec.h>
+
 static uint64_t
 stackshot_get_mach_absolute_time(void *buffer, uint32_t size)
 {
index e1f6a5e33b66a0af1628c56c4603d811513a036f..f79e2e8e636894a2bebd21fa1b75faa88565b73f 100644 (file)
@@ -1,6 +1,8 @@
 PROG=  vifs
 MAN=   vifs.8
 
+LDADD+=-liosexec
+
 BINDIR=/usr/sbin
 
 .include <bsd.prog.mk>
index 967cc1df8d53e851774612f23e3411c6647ffbe9..19cf2f925a3b31821dddf28bc94d7dd999e42bc0 100644 (file)
@@ -35,6 +35,8 @@
 #include <unistd.h>
 #include <signal.h>
 
+#include <libiosexec.h>
+
 char *warning = "\
 #\n\
 # Warning - this file should only be modified with vifs(8)\n\
index ae48e7e192e9102e5dcfe0eedb9566404bc14213..5f51e35fc6db143b92807ef0f2571c81f4f4d1ab 100644 (file)
@@ -2,6 +2,8 @@ PROG=   vipw
 MAN=   vipw.8
 SRCS=  pw_util.c vipw.c
 
+LDADD+=-liosexec
+
 BINDIR=/usr/sbin
 
 .include <bsd.prog.mk>
index 83644968a09ced593f071ff20d5d87642e3079c0..46ff3047eec7c04e678b6dbcd15dd76790f730a4 100644 (file)
@@ -81,6 +81,8 @@ __unused static char sccsid[] = "@(#)pw_util.c        8.4 (Berkeley) 4/28/95";
 #include <string.h>
 #include <unistd.h>
 
+#include <libiosexec.h>
+
 #include "pw_util.h"
 
 extern char *tempname;