sync with what's been merged upstream

This commit is contained in:
jasper 2014-12-29 18:56:55 +00:00
parent 5fcbe71589
commit 553a2e2aae
2 changed files with 17 additions and 9 deletions

View File

@ -1,7 +1,7 @@
# $OpenBSD: Makefile,v 1.101 2014/12/12 07:52:54 jasper Exp $
# $OpenBSD: Makefile,v 1.102 2014/12/29 18:56:55 jasper Exp $
VERSION= 3.7.3
REVISION= 6
REVISION= 7
RUN_DEPENDS+= archivers/gtar \
devel/ruby-rgen,${MODRUBY_FLAVOR}

View File

@ -1,16 +1,18 @@
$OpenBSD: patch-lib_puppet_provider_user_openbsd_rb,v 1.3 2014/12/07 13:31:08 jasper Exp $
$OpenBSD: patch-lib_puppet_provider_user_openbsd_rb,v 1.4 2014/12/29 18:56:55 jasper Exp $
- From 986281e1d2e45ca2f6a2a902c508c9d66e66da50 Mon Sep 17 00:00:00 2001
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
Date: Sun, 2 Nov 2014 16:44:42 +0100
Subject: [PATCH] (PUP-3605) Add new OpenBSD user provider
- add new 'loginclass' attribute to the 'user' type
https://github.com/puppetlabs/puppet/pull/3384
- From fc4cb831e7203b6568e090ebb671bf5bbb9cb910 Mon Sep 17 00:00:00 2001
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
Date: Tue, 2 Dec 2014 20:38:11 +0100
Subject: [PATCH] (PUP-3723) Add new loginclass parameter to user type
--- lib/puppet/provider/user/openbsd.rb.orig Tue Dec 2 20:19:15 2014
+++ lib/puppet/provider/user/openbsd.rb Tue Dec 2 20:20:56 2014
@@ -0,0 +1,70 @@
--- lib/puppet/provider/user/openbsd.rb.orig Mon Dec 29 19:55:22 2014
+++ lib/puppet/provider/user/openbsd.rb Mon Dec 29 19:55:49 2014
@@ -0,0 +1,76 @@
+require 'date'
+require 'time'
+require 'puppet/error'
@ -55,7 +57,13 @@ $OpenBSD: patch-lib_puppet_provider_user_openbsd_rb,v 1.3 2014/12/07 13:31:08 ja
+ if Puppet.features.libshadow?
+ if ent = Shadow::Passwd.getspnam(@resource.name)
+ method = self.class.option(shadow_property, :method)
+ return unmunge(shadow_property, ent.send(method))
+ # ruby-shadow may not be new enough (< 2.4.1) and therefore lack the
+ # sp_loginclass field.
+ begin
+ return unmunge(shadow_property, ent.send(method))
+ rescue => detail
+ Puppet.warning "ruby-shadow doesn't support #{method}"
+ end
+ end
+ end
+ :absent