diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2017-06-21 15:00:21 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2017-06-21 15:00:21 +0300 |
commit | 6896b3c90de4725b0ddc8e62516b9f4afc32f8bf (patch) | |
tree | e41b909f74d3ed35e7cc2423da69c34a05d4cdd6 | |
parent | 3b1a81504cb67ec6b1477e1e409fdac86c9c3371 (diff) | |
download | sudo-6896b3c90de4725b0ddc8e62516b9f4afc32f8bf.tar.gz |
Add SMF service
-rwxr-xr-x | debian/rules | 9 | ||||
-rw-r--r-- | debian/sudo-smf.xml | 26 |
2 files changed, 35 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules index 3f29600..30c9206 100755 --- a/debian/rules +++ b/debian/rules @@ -148,6 +148,15 @@ ifeq ($(DEB_HOST_ARCH_OS),linux) debian/sudo-ldap/lib/systemd/system/sudo.service endif +ifeq ($(DEB_HOST_ARCH_OS),illumos) + # we don't need postinst scripts (and dh-smf), as this service is for boot time only + set -x; for p in sudo sudo-ldap; do \ + mkdir -p debian/$$p/lib/svc/manifest/system && \ + install -o root -g root -m 0644 debian/sudo-smf.xml \ + debian/$$p/lib/svc/manifest/system/sudo.xml ; \ + done +endif + binary-indep: build install binary-arch: build install diff --git a/debian/sudo-smf.xml b/debian/sudo-smf.xml new file mode 100644 index 0000000..df93dcd --- /dev/null +++ b/debian/sudo-smf.xml @@ -0,0 +1,26 @@ +<?xml version="1.0"?> +<!DOCTYPE service_bundle SYSTEM "/usr/share/xml/schema/smf/service_bundle.dtd.1"> +<service_bundle type="manifest" name="sudo"> + <service name="system/sudo" type="service" version="1"> + <dependency name="filesystem" grouping="require_all" restart_on="error" type="service"> + <service_fmri value="svc:/system/filesystem/local"/> + </dependency> + <instance name="default" enabled="true"> + <exec_method type="method" name="start" exec="find /var/lib/sudo -exec touch -d @0 '{}' \;" timeout_seconds="10"/> + <exec_method type="method" name="stop" exec=":true" timeout_seconds="10"/> + <property_group name="startd" type="framework"> + <propval name="duration" type="astring" value="transient"/> + <propval name="ignore_error" type="astring" value="core,signal"/> + </property_group> + </instance> + <stability value="Evolving"/> + <template> + <common_name> + <loctext xml:lang="C">Make sure sudo privileges don't persist across reboots</loctext> + </common_name> + <documentation> + <manpage title="sudo" section="1"/> + </documentation> + </template> + </service> +</service_bundle> |