/[smecontribs]/rpms/smeserver-lazy_admin_tools/contribs8/smeserver-lazy_admin_tools-1.0-patch3.patch
ViewVC logotype

Contents of /rpms/smeserver-lazy_admin_tools/contribs8/smeserver-lazy_admin_tools-1.0-patch3.patch

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


Revision 1.2 - (show annotations) (download)
Mon Jul 28 19:19:20 2014 UTC (9 years, 9 months ago) by unnilennium
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
* Mon Jul 28 2014 JP PIALASSE tests@pialasse.com  1.1.-2.sme
- fix user not being deleted [SME: 8500]
- fix shadow activating user with blank password [SME: 7731]
- NFR added pseudonyms with @ [SME: 7706]
- note: lat-restore now do lat-pseudonyms later after lat-domains for pseudonyms with @ verification.

1 diff -up smeserver-lazy_admin_tools-1.0/root/usr/sbin/lat-procmail.patch3 smeserver-lazy_admin_tools-1.0/root/usr/sbin/lat-procmail
2 --- smeserver-lazy_admin_tools-1.0/root/usr/sbin/lat-procmail.patch3 2006-02-09 23:19:25.000000000 -0500
3 +++ smeserver-lazy_admin_tools-1.0/root/usr/sbin/lat-procmail 2013-05-13 22:08:28.000000000 -0400
4 @@ -31,8 +31,8 @@ if ( $Hlp ) { &PrintPod(9); exit; }
5 # Check for e-smith-user-panel
6 my $UPanel=`rpm -qa | grep -c "smeserver-userpanel"`;
7 if ( $UPanel < 1 ) {
8 - print "\nThis tool requires the smeserver-userpanel contribution from Dungog Networks.\n";
9 - print "Please download it from http://dungog.net and install it first.\n\n\a";
10 + print "\nThis tool requires the smeserver-userpanel and smeserver-mailsorting contribution.\n";
11 + print "Please download them with yum from smecontribs repo and configure them first.\n\n\a";
12 exit;
13 }
14
15 @@ -73,7 +73,7 @@ foreach my $record (@records)
16 print "Activating procmail for user '$username'.\n";
17 db_set(\%processmail, $username, 'settings', \%user);
18 db_set_prop(\%accounts, $username, 'EmailForward', 'procmail');
19 - system("/sbin/e-smith/signal-event", "user-modprocmail", $username) == 0
20 + system("/sbin/e-smith/signal-event", "email-update-quick", $username) == 0
21 or die ("An error occurred while updating account '$username'.\n");
22 }
23 }
24 @@ -81,7 +81,7 @@ foreach my $record (@records)
25 print "Deactivating procmail for user '$username'.\n";
26 db_delete(\%processmail, $username, 'settings', \%user);
27 db_set_prop(\%accounts, $username, 'EmailForward', 'local');
28 - system("/sbin/e-smith/signal-event", "user-modprocmail", $username) == 0
29 + system("/sbin/e-smith/signal-event", "email-update-quick", $username) == 0
30 or die ("An error occurred while updating account '$username'.\n");
31 }
32 }
33 diff -up smeserver-lazy_admin_tools-1.0/root/usr/sbin/lat-users.patch3 smeserver-lazy_admin_tools-1.0/root/usr/sbin/lat-users
34 --- smeserver-lazy_admin_tools-1.0/root/usr/sbin/lat-users.patch3 2013-05-13 22:05:14.000000000 -0400
35 +++ smeserver-lazy_admin_tools-1.0/root/usr/sbin/lat-users 2013-06-19 00:28:33.000000000 -0400
36 @@ -18,6 +18,7 @@ tie %accounts, 'esmith::config', '/home/
37 my ($Hlp, $Cml, $Frc, $Inp, $Pwf);
38 my $Add =0;
39 my $Del =0;
40 +my $Kaa =0;
41 my $passwlist="./passwords.new";
42
43 #==============================================================================
44 @@ -28,7 +29,8 @@ GetOptions ("help" => \$Hlp,
45 "add" => \$Add,
46 "delete" => \$Del,
47 "force" => \$Frc,
48 - "passwords" => \$Pwf,
49 + "nickname" => \$Kaa,
50 + "passwords" => \$Pwf,
51 "command-line=s" => \$Cml,
52 "input-file=s" => \$Inp);
53
54 @@ -116,6 +118,12 @@ if ($Add) {
55 system("/usr/sbin/lat-groups -a -c='$fields[$cntgrps]|$fields[$cntgrps]||$username'");
56 }
57 }
58 + if ($Kaa) {
59 +
60 + print "creating SME default pseudonyms\a\n";
61 + system("/usr/sbin/lat-pseudonyms -a -c='$username|".$user{"FirstName"}.".".$user{"LastName"}."|".$user{"FirstName"}."_".$user{"LastName"}."'");
62 +
63 + }
64 }
65 }
66 else { print "User '$username' is not a correct username.\a\n"; }
67 @@ -136,18 +144,24 @@ if ($Del) {
68
69 if ((db_get(\%accounts, $username)) && (db_get_type(\%accounts, $username) eq "user")) {
70 my $yn = 'yes';
71 - if (! $Frc) {
72 - print "Do you want to delete user '$username'?\n";
73 - print "All files belonging to this user account will be deleted! [yes/NO/all] ";
74 - $yn = <STDIN>;
75 - if ($yn =~ /^a/i) { $Frc = -1; $yn="yes"; }
76 - }
77 - if ($yn =~ /^y/i) {
78 - print "Deleting user account '$username'.\n";
79 - db_delete(\%accounts, $username);
80 - system("/sbin/e-smith/signal-event", "user-delete", $username);
81 - system("/usr/sbin/lat-groups -r -f -c='*|$username'");
82 - }
83 + my $userdir = `cat /etc/passwd|grep "^$username:"|cut -d":" -f6`;
84 + print "$userdir\n";
85 + if ( $userdir eq "/home/e-smith/files/users/$username" )
86 + {
87 + if (! $Frc) {
88 + print "Do you want to delete user '$username'?\n";
89 + print "All files belonging to this user account will be deleted! [yes/NO/all] ";
90 + $yn = <STDIN>;
91 + if ($yn =~ /^a/i) { $Frc = -1; $yn="yes"; }
92 + }
93 + if ($yn =~ /^y/i) {
94 + print "Deleting user account '$username'.\n";
95 + db_delete(\%accounts, $username);
96 + system("/sbin/e-smith/signal-event", "user-delete", $username);
97 + system("/usr/sbin/lat-groups -r -f -c='*|$username'");
98 + }
99 + }
100 + else { print "'$username' is not a regular SME user with its home in /home/e-smith/files/users/, can not remove it\n\a";}
101 }
102 else { print "Can't find user '$username'.\n\a";}
103 }

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