From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Aug 29 10:00:10 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DB6116A41B for ; Wed, 29 Aug 2007 10:00:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3B20313C46C for ; Wed, 29 Aug 2007 10:00:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l7TA0AI8081025 for ; Wed, 29 Aug 2007 10:00:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l7TA0Awg081022; Wed, 29 Aug 2007 10:00:10 GMT (envelope-from gnats) Date: Wed, 29 Aug 2007 10:00:10 GMT Message-Id: <200708291000.l7TA0Awg081022@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Dmitry A Grigorovich Cc: Subject: Re: ports/115919: [PATCH] smbldap-passwd failed when unset defaultMaxPasswordAge X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dmitry A Grigorovich List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2007 10:00:10 -0000 The following reply was made to PR ports/115919; it has been noted by GNATS. From: Dmitry A Grigorovich To: bug-followup@FreeBSD.org, odip@bionet.nsc.ru Cc: Subject: Re: ports/115919: [PATCH] smbldap-passwd failed when unset defaultMaxPasswordAge Date: Wed, 29 Aug 2007 16:32:01 +0700 This is a multi-part message in MIME format. --------------010602040000060705090206 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Sorry, corrected patch -- [ODiP] == Grigorovich Dmitry --------------010602040000060705090206 Content-Type: text/plain; name="patch-smbldap-passwd" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-smbldap-passwd" --- smbldap-passwd.orig Thu Jul 19 16:54:33 2007 +++ smbldap-passwd Wed Aug 29 16:18:21 2007 @@ -266,22 +266,18 @@ if ( $update_unix_passwd ) { my $shadowLastChange=int(time()/86400); my $modify; + my @mods; if ($< != 0) { - $modify = $ldap_master->modify ( "$dn", - changes => [ - replace => [userPassword => "$hash_password"], - replace => [shadowLastChange => "$shadowLastChange"] - ] - ); + push @mods, 'userPassword' => "$hash_password"; + push @mods, 'shadowLastChange' => "$shadowLastChange"; } else { - $modify = $ldap_master->modify ( "$dn", - changes => [ - replace => [userPassword => "$hash_password"], - replace => [shadowLastChange => "$shadowLastChange"], - replace => [shadowMax => "$config{defaultMaxPasswordAge}"] - ] - ); + push @mods, 'userPassword' => "$hash_password"; + push @mods, 'shadowLastChange' => "$shadowLastChange"; + if ( defined $config{defaultMaxPasswordAge} ) { + push @mods, 'shadowMax' => "$config{defaultMaxPasswordAge}"; + } } + $modify = $ldap_master->modify ( "$dn", 'replace' => { @mods } ); $modify->code && warn "Unable to change password: ", $modify->error ; } --------------010602040000060705090206--