[Pkg-shadow-devel] [shadow] 04/05: login.postinst: install a default /etc/subuid and /etc/subgid

Micah Anderson micah at moszumanska.debian.org
Wed Feb 26 16:42:57 UTC 2014


This is an automated email from the git hooks/post-receive script.

micah pushed a commit to branch master
in repository shadow.

commit 99a8e345da3f7d416ca6bc723fa01556b1e7b104
Author: Micah Anderson <micah at riseup.net>
Date:   Tue Feb 25 22:54:35 2014 -0500

    login.postinst: install a default /etc/subuid and /etc/subgid
---
 debian/changelog      |  1 +
 debian/login.postinst | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index ebf1e9c..cb9f338 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -39,6 +39,7 @@ shadow (1:4.2-1) UNRELEASED; urgency=low
   * Allow LXC devices (lxc/console, lxc/tty[1234]) in securetty.linux
   * Update documentation of UMASK: Explain that USERGROUPS_ENAB will modify
     this default for UPGs. (Closes: #583971)
+  * login.postinst: install a default /etc/subuid and /etc/subgid
 
  -- Christian Perrier <bubulle at debian.org>  Sat, 27 Jul 2013 20:07:18 +0200
 
diff --git a/debian/login.postinst b/debian/login.postinst
index 59d6b7f..39aa57c 100644
--- a/debian/login.postinst
+++ b/debian/login.postinst
@@ -24,6 +24,19 @@ then
 	fi
 fi
 
+        # Create subuid/subgid if missing
+        if [ ! -e /etc/subuid ]; then
+                touch /etc/subuid
+                chown root:root /etc/subuid
+                chmod 644 /etc/subuid
+        fi
+
+        if [ ! -e /etc/subgid ]; then
+                touch /etc/subgid
+                chown root:root /etc/subgid
+                chmod 644 /etc/subgid
+        fi
+
 #DEBHELPER#
 
 exit 0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shadow/shadow.git



More information about the Pkg-shadow-devel mailing list