summaryrefslogtreecommitdiff
path: root/app-admin/pwgen/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-admin/pwgen/files
reinit the tree, so we can have metadata
Diffstat (limited to 'app-admin/pwgen/files')
-rw-r--r--app-admin/pwgen/files/2.06-special-char.patch11
-rw-r--r--app-admin/pwgen/files/pwgen.rc18
2 files changed, 29 insertions, 0 deletions
diff --git a/app-admin/pwgen/files/2.06-special-char.patch b/app-admin/pwgen/files/2.06-special-char.patch
new file mode 100644
index 000000000000..3d014fa4bf11
--- /dev/null
+++ b/app-admin/pwgen/files/2.06-special-char.patch
@@ -0,0 +1,11 @@
+--- a/pwgen.c
++++ b/pwgen.c
+@@ -138,7 +138,7 @@ int main(int argc, char **argv)
+ break;
+ case 's':
+ pwgen = pw_rand;
+- pwgen_flags = PW_DIGITS | PW_UPPERS;
++ pwgen_flags |= PW_DIGITS | PW_UPPERS;
+ break;
+ case 'C':
+ do_columns = 1;
diff --git a/app-admin/pwgen/files/pwgen.rc b/app-admin/pwgen/files/pwgen.rc
new file mode 100644
index 000000000000..94c4067e2faf
--- /dev/null
+++ b/app-admin/pwgen/files/pwgen.rc
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ before local
+}
+
+start() {
+ ebegin "Auto-scrambling root password for security"
+ echo root:`pwgen -s 16` | chpasswd > /dev/null 2>&1
+ eend $? "Failed to scramble root password."
+}
+
+stop() {
+ ebegin "Stopping pwgen"
+ eend $? "Failed to stop pwgen."
+}