summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/2010-November/000804.html
diff options
context:
space:
mode:
Diffstat (limited to 'zarb-ml/mageia-sysadm/2010-November/000804.html')
-rw-r--r--zarb-ml/mageia-sysadm/2010-November/000804.html201
1 files changed, 201 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/2010-November/000804.html b/zarb-ml/mageia-sysadm/2010-November/000804.html
new file mode 100644
index 000000000..a1f1601fe
--- /dev/null
+++ b/zarb-ml/mageia-sysadm/2010-November/000804.html
@@ -0,0 +1,201 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+ <HEAD>
+ <TITLE> [Mageia-sysadm] [408] - split the module in 2 part, and add class to allow to more easyly
+ </TITLE>
+ <LINK REL="Index" HREF="index.html" >
+ <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B408%5D%20-%20split%20the%20module%20in%202%20part%2C%0A%09and%20add%20class%20to%20allow%20to%20more%20easyly&In-Reply-To=%3C20101123011110.A5EBA3FC92%40valstar.mageia.org%3E">
+ <META NAME="robots" CONTENT="index,nofollow">
+ <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <LINK REL="Previous" HREF="000803.html">
+ <LINK REL="Next" HREF="000806.html">
+ </HEAD>
+ <BODY BGCOLOR="#ffffff">
+ <H1>[Mageia-sysadm] [408] - split the module in 2 part, and add class to allow to more easyly</H1>
+ <B>root at mageia.org</B>
+ <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B408%5D%20-%20split%20the%20module%20in%202%20part%2C%0A%09and%20add%20class%20to%20allow%20to%20more%20easyly&In-Reply-To=%3C20101123011110.A5EBA3FC92%40valstar.mageia.org%3E"
+ TITLE="[Mageia-sysadm] [408] - split the module in 2 part, and add class to allow to more easyly">root at mageia.org
+ </A><BR>
+ <I>Tue Nov 23 02:11:10 CET 2010</I>
+ <P><UL>
+ <LI>Previous message: <A HREF="000803.html">[Mageia-sysadm] [407] - use pam for openssh ( I am not sure if we need to restrict its use
+</A></li>
+ <LI>Next message: <A HREF="000806.html">[Mageia-sysadm] [409] add class for scp and sftp
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#804">[ date ]</a>
+ <a href="thread.html#804">[ thread ]</a>
+ <a href="subject.html#804">[ subject ]</a>
+ <a href="author.html#804">[ author ]</a>
+ </LI>
+ </UL>
+ <HR>
+<!--beginarticle-->
+<PRE>Revision: 408
+Author: misc
+Date: 2010-11-23 02:11:10 +0100 (Tue, 23 Nov 2010)
+Log Message:
+-----------
+- split the module in 2 part, and add class to allow to more easyly
+combine the autorized shell
+
+Modified Paths:
+--------------
+ puppet/modules/restrictshell/manifests/init.pp
+ puppet/modules/restrictshell/templates/membersh-conf.pl
+
+Modified: puppet/modules/restrictshell/manifests/init.pp
+===================================================================
+--- puppet/modules/restrictshell/manifests/init.pp 2010-11-23 01:11:08 UTC (rev 407)
++++ puppet/modules/restrictshell/manifests/init.pp 2010-11-23 01:11:10 UTC (rev 408)
+@@ -1,5 +1,12 @@
+ class restrictshell {
+ class shell {
++ file {&quot;/etc/membersh-conf.d&quot;:
++ ensure =&gt; directory,
++ owner =&gt; root,
++ group =&gt; root,
++ mode =&gt; 755,
++ }
++
+ file { '/usr/local/bin/sv_membersh.pl':
+ ensure =&gt; present,
+ owner =&gt; root,
+@@ -7,16 +14,7 @@
+ mode =&gt; 755,
+ content =&gt; template(&quot;restrictshell/sv_membersh.pl&quot;),
+ }
+- }
+
+- class base {
+- include shell
+- $allow_svn = &quot;0&quot;
+- $allow_git = &quot;0&quot;
+- $allow_rsync = &quot;0&quot;
+- $allow_pkgsubmit = &quot;0&quot;
+-
+- $ldap_pwfile = &quot;/etc/ldap.secret&quot;
+ file { '/etc/membersh-conf.pl':
+ ensure =&gt; present,
+ owner =&gt; root,
+@@ -24,6 +22,9 @@
+ mode =&gt; 755,
+ content =&gt; template(&quot;restrictshell/membersh-conf.pl&quot;),
+ }
++ }
++
++ class ssh_keys_from_ldap {
+
+ package { 'python-ldap':
+ ensure =&gt; installed,
+@@ -37,6 +38,7 @@
+ mode =&gt; 755,
+ }
+
++ $ldap_pwfile = &quot;/etc/ldap.secret&quot;
+ file { '/usr/local/bin/ldap-sshkey2file.py':
+ ensure =&gt; present,
+ owner =&gt; root,
+@@ -47,9 +49,32 @@
+ }
+ }
+
+- class allow_svn_git_pkgsubmit inherits base {
+- $allow_svn = &quot;1&quot;
+- $allow_git = &quot;1&quot;
+- $allow_pkgsubmit = &quot;1&quot;
++ define allow {
++ include shell
++ file { &quot;/etc/membersh-conf.d/allow_$name.pl&quot;:
++ ensure =&gt; &quot;present&quot;,
++ owner =&gt; root,
++ group =&gt; root,
++ mode =&gt; 755,
++ content =&gt; &quot;\$use_$name = 1;\n&quot;,
++ }
+ }
++
++ # yes, we could directly use the allow, but this is
++ # a nicer syntax
++ class allow_git {
++ allow{ &quot;git&quot;: }
++ }
++
++ class allow_rsync {
++ allow{ &quot;rsync&quot;: }
++ }
++
++ class allow_pkgsubmit {
++ allow{ &quot;pkgsubmit&quot;: }
++ }
++
++ class allow_svn {
++ allow{ &quot;svn&quot;: }
++ }
+ }
+
+Modified: puppet/modules/restrictshell/templates/membersh-conf.pl
+===================================================================
+--- puppet/modules/restrictshell/templates/membersh-conf.pl 2010-11-23 01:11:08 UTC (rev 407)
++++ puppet/modules/restrictshell/templates/membersh-conf.pl 2010-11-23 01:11:10 UTC (rev 408)
+@@ -1,16 +1,18 @@
+-$use_svn = &quot;&lt;%= allow_svn %&gt;&quot;;
++
++
+ $bin_svn = &quot;/usr/bin/svnserve&quot;;
+ $regexp_svn = &quot;^svnserve -t\$&quot;;
+ #@prepend_args_svn = ( '-r', '/svn' );
+ @prepend_args_svn = ();
+
+-$use_git = &quot;&lt;%= allow_git %&gt;&quot;;
+ $bin_git = &quot;/usr/bin/git-shell&quot;;
+
+-$use_rsync = &quot;&lt;%= allow_rsync %&gt;&quot;;
+ $bin_rsync = &quot;/usr/bin/rsync&quot;;
+ $regexp_rsync = &quot;^rsync --server&quot;;
+ $regexp_dir_rsync = &quot;^/.*&quot;;
+
+-$use_pkgsubmit = &quot;&lt;%= allow_pkgsubmit %&gt;&quot;;
+
++foreach my $f (glob(&quot;/etc/membersh-conf.d/allow_*pl&quot;)) {
++ do($f)
++}
++1;
+-------------- next part --------------
+An HTML attachment was scrubbed...
+URL: &lt;/pipermail/mageia-sysadm/attachments/20101123/0c4827d6/attachment-0001.html&gt;
+</PRE>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<!--endarticle-->
+ <HR>
+ <P><UL>
+ <!--threads-->
+ <LI>Previous message: <A HREF="000803.html">[Mageia-sysadm] [407] - use pam for openssh ( I am not sure if we need to restrict its use
+</A></li>
+ <LI>Next message: <A HREF="000806.html">[Mageia-sysadm] [409] add class for scp and sftp
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#804">[ date ]</a>
+ <a href="thread.html#804">[ thread ]</a>
+ <a href="subject.html#804">[ subject ]</a>
+ <a href="author.html#804">[ author ]</a>
+ </LI>
+ </UL>
+
+<hr>
+<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm
+mailing list</a><br>
+</body></html>