/[smecontribs]/rpms/smeserver-password/contribs9/smeserver-password-1.2.0-fix-password-aging.patch
ViewVC logotype

Diff of /rpms/smeserver-password/contribs9/smeserver-password-1.2.0-fix-password-aging.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by stephdl, Fri Feb 6 20:44:56 2015 UTC Revision 1.2 by stephdl, Fri Feb 6 20:58:54 2015 UTC
# Line 1  Line 1 
1  diff -Nur smeserver-password-1.2.0.old8823/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/passwordopt.pm smeserver-password-1.2.0.bz8823/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/passwordopt.pm  diff -Nur smeserver-password-1.2.0.old8823/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/passwordopt.pm smeserver-password-1.2.0.bz8823/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/passwordopt.pm
2  --- smeserver-password-1.2.0.old8823/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/passwordopt.pm    2015-02-06 17:03:34.319193079 +0100  --- smeserver-password-1.2.0.old8823/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/passwordopt.pm    2015-02-06 17:03:34.319193079 +0100
3  +++ smeserver-password-1.2.0.bz8823/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/passwordopt.pm     2015-02-06 21:26:41.486827403 +0100  +++ smeserver-password-1.2.0.bz8823/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/passwordopt.pm     2015-02-06 21:55:59.670973331 +0100
4  @@ -14,6 +14,7 @@  @@ -14,6 +14,7 @@
5   our @EXPORT = qw();   our @EXPORT = qw();
6   our $db = esmith::ConfigDB->open();   our $db = esmith::ConfigDB->open();
# Line 28  diff -Nur smeserver-password-1.2.0.old88 Line 28  diff -Nur smeserver-password-1.2.0.old88
28    
29  -for my $user ($adb->users)  -for my $user ($adb->users)
30  -        {  -        {
31  +foreach my $user ($adb->users)  -        # next user unless password is set
32  +    {  -        next unless (($user->prop('PasswordSet') || 'no') eq 'yes');
          # next user unless password is set  
          next unless (($user->prop('PasswordSet') || 'no') eq 'yes');  
33  -        my $passage = $user->prop('PasswordAge') || 'no';  -        my $passage = $user->prop('PasswordAge') || 'no';
34  -        #       $user->set_prop('PasswordAge', 'no');  -        #       $user->set_prop('PasswordAge', 'no');
35  -       my $acctName=$user->key;  -       my $acctName=$user->key;
# Line 44  diff -Nur smeserver-password-1.2.0.old88 Line 42  diff -Nur smeserver-password-1.2.0.old88
42  -                $user->set_prop('PasswordAge', 'no');  -                $user->set_prop('PasswordAge', 'no');
43  -                }  -                }
44  -       unless (system ("/sbin/e-smith/signal-event", "password-modify", $acctName) == 0) {  -       unless (system ("/sbin/e-smith/signal-event", "password-modify", $acctName) == 0) {
45  +        my $passage = $user->prop('PasswordAge') || 'no';        -                $isok=1;
46  +        $user->set_prop('PasswordAge', 'no');  -                }
47  +        my $username = $user-> key;  -        }
48  +        push @acctName, $username;  +foreach my $user ($adb->users) {
49  +        }  +    # next user unless password is set
50    +    next unless (($user->prop('PasswordSet') || 'no') eq 'yes');
51    +    my $passage = $user->prop('PasswordAge') || 'no';      
52    +    $user->set_prop('PasswordAge', 'no');
53    +    my $username = $user-> key;
54    +    push @acctName, $username;
55    +   }
56  +  +
57  +        #we retrieve if the modify box is checked and set to on      +#we retrieve if the modify box is checked and set to on    
58  +        foreach my $m (@cusers) {  +foreach my $m (@cusers) {
59  +             $key = $adb->get($m);  +    $key = $adb->get($m);
60  +              $key->set_prop('PasswordAge','yes')  +    $key->set_prop('PasswordAge','yes')
61  +            }  +    }
62  +  +
63  +        unless (system ("/sbin/e-smith/signal-event", "password-modify", @acctName) == 0) {  +unless (system ("/sbin/e-smith/signal-event", "password-modify", @acctName) == 0) {
64                   $isok=1;  +    $isok=1;
65                   }  +    }
66  -        }  +
67  -unless ($isok==0) {   unless ($isok==0) {
68  -        return $self->error('CANNOT_SAVE');  -        return $self->error('CANNOT_SAVE');
69  -        }  -        }
70  +        unless ($isok==0) {  +    return $self->error('CANNOT_SAVE');
 +                return $self->error('CANNOT_SAVE');  
 +                }  
   
 -return $self->success('SUCCESSFULLY_MODIFIED');  
 -}  
 +        return $self->success('SUCCESSFULLY_MODIFIED');  
71  +    }  +    }
72    
73     return $self->success('SUCCESSFULLY_MODIFIED');
74     }
75   1;   1;
76  -  -


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed