Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Aug 2007 10:00:10 GMT
From:      Dmitry A Grigorovich <odip@bionet.nsc.ru>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/115919: [PATCH] smbldap-passwd failed when unset defaultMaxPasswordAge
Message-ID:  <200708291000.l7TA0Awg081022@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/115919; it has been noted by GNATS.

From: Dmitry A Grigorovich <odip@bionet.nsc.ru>
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708291000.l7TA0Awg081022>