Skip to content

Instantly share code, notes, and snippets.

View inC3ASE's full-sized avatar

Gabriel Sawyer inC3ASE

  • Aptos, California
View GitHub Profile
@inC3ASE
inC3ASE / sntp-wrapper
Created October 14, 2016 02:03
libexec
#!/bin/sh
# Cribbed from /usr/libexec/ntpd-wrapper. Will wait for DNS to be available before
# invoking sntp, but does not need to handle starting a server, or any configurability.
# Intended for use in the BaseSystem only.
PATH=/usr/sbin:/usr/bin:/bin
TIMEOUT=30
KEY=State:/Network/Global/DNS
DNS=/var/run/resolv.conf
#!/bin/sh
SSHDIR=/etc/ssh
[ ! -f ${SSHDIR}/ssh_host_key ] && ssh-keygen -q -t rsa1 -f ${SSHDIR}/ssh_host_key -N "" -C "" < /dev/null > /dev/null 2> /dev/null
[ ! -f ${SSHDIR}/ssh_host_rsa_key ] && ssh-keygen -q -t rsa -f ${SSHDIR}/ssh_host_rsa_key -N "" -C "" < /dev/null > /dev/null 2> /dev/null
[ ! -f ${SSHDIR}/ssh_host_dsa_key ] && ssh-keygen -q -t dsa -f ${SSHDIR}/ssh_host_dsa_key -N "" -C "" < /dev/null > /dev/null 2> /dev/null
[ ! -f ${SSHDIR}/ssh_host_ecdsa_key ] && ssh-keygen -q -t ecdsa -f ${SSHDIR}/ssh_host_ecdsa_key -N "" -C "" < /dev/null > /dev/null 2> /dev/null
[ ! -f ${SSHDIR}/ssh_host_ed25519_key ] && ssh-keygen -q -t ed25519 -f ${SSHDIR}/ssh_host_ed25519_key -N "" -C "" < /dev/null > /dev/null 2> /dev/null
exec /usr/sbin/sshd $@
@inC3ASE
inC3ASE / upsshutdown
Created October 14, 2016 02:04
libexec
#!/bin/sh
#
# Initialize...
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin
SI_PATH=/System/Library/StartupItems
MSG="Shutting down due to power loss!"
logger -i -p daemon.emerg -t UPS "${MSG}"
@inC3ASE
inC3ASE / blued.sb
Created October 14, 2016 02:05
usr/share/sandbox
;; Copyright (c) 2012 Apple Inc. All Rights reserved.
;;
;; WARNING: The sandbox rules in this file currently constitute
;; Apple System Private Interface and are subject to change at any time and
;; without notice. The contents of this file are also auto-generated and not
;; user editable; it may be overwritten at any time.
;;
(version 1)
@inC3ASE
inC3ASE / airportd.sb
Created October 14, 2016 02:05
usr share sandbox
;; Copyright (c) 2012 Apple Inc. All Rights reserved.
;;
;; WARNING: The sandbox rules in this file currently constitute
;; Apple System Private Interface and are subject to change at any time and
;; without notice. The contents of this file are also auto-generated and not
;; user editable; it may be overwritten at any time.
;;
(version 1)
@inC3ASE
inC3ASE / fontmover.sb
Created October 14, 2016 02:05
usr/share/sandbox
;;
;; fontmover - sandbox profile
;; Copyright 2009 - 2010 Apple, Inc. All Rights reserved.
;;
;; WARNING: The sandbox rules in this file currently constitute
;; Apple System Private Interface and are subject to change at any time and
;; without notice.
;;
(version 1)
@inC3ASE
inC3ASE / ftp-proxy.sb
Created October 14, 2016 02:05
usr/share/sandbox
;;
;; ftp proxy - sandbox profile
;; Copyright (c) 2010 Apple Inc. All Rights reserved.
;;
;; WARNING: The sandbox rules in this file currently constitute
;; Apple System Private Interface and are subject to change at any time and
;; without notice. The contents of this file are also auto-generated and not
;; user editable; it may be overwritten at any time.
;;
(version 1)
@inC3ASE
inC3ASE / mDNSResponder.sb
Created October 14, 2016 02:06
/usr/share/sandbox
; -*- Mode: Scheme; tab-width: 4 -*-
;
; Copyright (c) 2012-2015 Apple Inc. All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are met:
;
; 1. Redistributions of source code must retain the above copyright notice,
; this list of conditions and the following disclaimer.
; 2. Redistributions in binary form must reproduce the above copyright notice,
@inC3ASE
inC3ASE / webdav_agent.sb
Created October 14, 2016 02:06
usr/share/sandbox
;;; Copyright (c) 2012 Apple Inc. All rights reserved.
;;; Sandbox profile for webdav_agent.
(version 1)
(deny default)
(import "system.sb")
(import "gss-acceptor.sb")
(system-network)
@inC3ASE
inC3ASE / 031-77681.English.dat
Created October 14, 2016 02:09
/Library/Updates/zzzz03-77681
<?xml version="1.0" encoding="UTF-8"?>
<installer-gui-script minSpecVersion="1">
<options hostArchitectures="i386" customize="never"/>
<title>SU_TITLE</title>
<script/>
<installation-check script="InstallationCheck()"/>
<script>
function InstallationCheck(prefix) {
if (system.compareVersions(system.version.ProductVersion, '10.9.5') &lt; 0) {
my.result.message = system.localizedStringWithFormat('ERROR_0', '10.9.5');