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

Annotation of /rpms/smeserver-password/contribs10/smeserver-password-1.2.0-fix-password-aging.patch

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


Revision 1.1 - (hide annotations) (download)
Tue Oct 13 11:25:53 2020 UTC (4 years, 1 month ago) by brianr
Branch: MAIN
CVS Tags: smeserver-password-1_2_0-15_el7_sme, smeserver-password-1_2_0-13_el7_sme, smeserver-password-1_2_0-14_el7_sme, smeserver-password-1_2_0-12_el7_sme, smeserver-password-1_2_0-11_el7_sme, HEAD
Initial import

1 brianr 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
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
3     +++ 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 @@
5     our @EXPORT = qw();
6     our $db = esmith::ConfigDB->open();
7     our $adb = esmith::AccountsDB->open();
8     +our @acctName;
9    
10     sub new
11     {
12     @@ -171,43 +172,35 @@
13     $key->set_prop('LockAccount', $q->param('LockAccount'));
14     $key->set_prop('DateReset', $q->param('DateReset'));
15    
16     -# this way something goes wrong when deselecting all one stays
17     -#my @cusers = $q->param('PasswordAge');
18     -# workaround
19     use CGI;
20     my $cgi = CGI->new;
21     my @cusers = $cgi->param('PasswordAge');
22    
23     -my %opt1 ;
24     -foreach (@cusers) {
25     - $opt1{$_}="on";
26     - }
27     my $isok=0;
28    
29     -for my $user ($adb->users)
30     - {
31     - # next user unless password is set
32     - next unless (($user->prop('PasswordSet') || 'no') eq 'yes');
33     - my $passage = $user->prop('PasswordAge') || 'no';
34     - # $user->set_prop('PasswordAge', 'no');
35     - my $acctName=$user->key;
36     - if ( defined $opt1{$acctName} eq "on" )
37     - {
38     - $user->set_prop('PasswordAge', 'yes');
39     - }
40     - else
41     - {
42     - $user->set_prop('PasswordAge', 'no');
43     - }
44     - unless (system ("/sbin/e-smith/signal-event", "password-modify", $acctName) == 0) {
45     - $isok=1;
46     - }
47     - }
48     +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
58     +foreach my $m (@cusers) {
59     + $key = $adb->get($m);
60     + $key->set_prop('PasswordAge','yes')
61     + }
62     +
63     +unless (system ("/sbin/e-smith/signal-event", "password-modify", @acctName) == 0) {
64     + $isok=1;
65     + }
66     +
67     unless ($isok==0) {
68     - return $self->error('CANNOT_SAVE');
69     - }
70     + return $self->error('CANNOT_SAVE');
71     + }
72    
73     return $self->success('SUCCESSFULLY_MODIFIED');
74     }
75     1;
76     -

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