/[smecontribs]/rpms/smeserver-lazy_admin_tools/contribs9/smeserver-lazy_admin_tools-1.1-patch0.patch
ViewVC logotype

Annotation of /rpms/smeserver-lazy_admin_tools/contribs9/smeserver-lazy_admin_tools-1.1-patch0.patch

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


Revision 1.1 - (hide annotations) (download)
Tue Feb 9 16:44:03 2016 UTC (8 years, 9 months ago) by stephdl
Branch: MAIN
CVS Tags: smeserver-lazy_admin_tools-1_1-4_el6_sme, smeserver-lazy_admin_tools-1_1-3_el6_sme, HEAD
* Tue Feb 9 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 1.1-3.sme
- Roll new rpm for sme9
- Bug 8503, 8500, 7731, 7706 are imported but not tested

1 stephdl 1.1 diff -up smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-dump.patch0 smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-dump
2     --- smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-dump.patch0 2013-06-26 18:05:29.000000000 -0400
3     +++ smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-dump 2014-07-28 15:12:03.000000000 -0400
4     @@ -63,7 +63,6 @@ if ($Dump) {
5     print REST "read c\n";
6     print REST 'if [ $c = "y" ] || [ $c = "Y" ]; then'."\n";
7     print REST " /usr/sbin/lat-users -a -i=$HostName.Users\n";
8     - print REST " /usr/sbin/lat-pseudonyms -a -i=$HostName.Pseudonyms\n";
9     print REST " /usr/sbin/lat-procmail -i=$HostName.Procmail\n";
10     print REST " /usr/sbin/lat-quota -i=$HostName.Quota\n";
11     print REST " /usr/sbin/lat-groups -a -i=$HostName.Groups\n";
12     @@ -71,6 +70,7 @@ if ($Dump) {
13     print REST " /usr/sbin/lat-ibays -a -i=$HostName.Ibays\n";
14     print REST " /usr/sbin/lat-domains -a -i=$HostName.Domains\n";
15     print REST " /usr/sbin/lat-hosts -a -i=$HostName.Hosts\n";
16     + print REST " /usr/sbin/lat-pseudonyms -a -i=$HostName.Pseudonyms\n";
17     print REST " /usr/sbin/lat-shadow -a -i=$HostName.shadow\n";
18     print REST "else\n";
19     print REST " echo 'Action cancelled!'\n";
20     diff -up smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-pseudonyms.patch0 smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-pseudonyms
21     --- smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-pseudonyms.patch0 2006-02-09 23:19:25.000000000 -0500
22     +++ smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-pseudonyms 2014-07-28 15:10:48.000000000 -0400
23     @@ -15,6 +15,8 @@ my %conf;
24     tie %conf, 'esmith::config';
25     my %accounts;
26     tie %accounts, 'esmith::config', '/home/e-smith/db/accounts';
27     +my %domains;
28     +tie %domains, 'esmith::config', '/home/e-smith/db/domains';
29     my ($Hlp, $Cml, $Frc, $Inp);
30     my $Add =0;
31     my $Del =0;
32     @@ -101,6 +103,13 @@ sub TestName {
33     if ( $_[0] =~ /^[a-z][a-z\-\_\d\.]*$/ ) {
34     return -1;
35     }
36     + elsif ( $_[0] =~ /^[a-z][a-z\-\_\d\.]*\@([a-z\-\_\d\.]*)$/ ) {
37     + print "Trying to create a pseudonym specific for $1 domain,\n";
38     + print "checking if domain is configured for this server... \n";
39     + if (((db_get(\%domains, $1)) && (db_get_type(\%domains, $1) eq "domain" )) ){
40     + print "yes, it exists, go on!!\n";
41     + return -1
42     + }
43     else {
44     print "The pseudonym '$_[0]' contains illegal characters. The name should ";
45     print "contain only\nlower-case letters, numbers, hyphens, periods ";
46     @@ -178,16 +187,16 @@ Use the information from FILE to create
47    
48     user* : Must be a valid user or group on the server.
49     pseudonym* : Must contain only lower-case letters, numbers,
50     - hyphens, periods and underscores, and should
51     + hyphens, arobase, periods and underscores, and should
52     start with a lower-case letter.
53    
54     * mandatory field
55    
56     =head1 EXAMPLES
57    
58     -B<lat-pseudonyms -a -c "harry | wizard | seeker">
59     +B<lat-pseudonyms -a -c "harry | wizard | seeker |potter@existinglocaldomain.com">
60    
61     -Creates the pseudonyms 'wizard' and 'seeker' for user 'harry'.
62     +Creates the pseudonyms 'wizard', 'seeker' and 'potter@existinglocaldomain.com' for user 'harry'.
63    
64     B<lat-pseudonyms -a -i /root/pseudonyms.list>
65    
66     diff -up smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-shadow.patch0 smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-shadow
67     --- smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-shadow.patch0 2013-06-26 18:05:29.000000000 -0400
68     +++ smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-shadow 2014-07-28 14:39:48.000000000 -0400
69     @@ -85,7 +85,7 @@ if ($Add) {
70     s/^$username:(!!):(.*):(.*):(.*):(.*):(.*):(.*):$/$username:$password:$2:$3:$4:$5:$6:$7:/i;
71     #print $_ ;
72     (print SHADOWNEW $_) or die "can not write $newshadow: $!";
73     - $PasswordSet="yes";
74     + $PasswordSet="no";
75     print "password set.\n";
76     }
77     elsif (m/^$username:/ ) { # one of our users if there is already a pass set
78     diff -up smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-users.patch0 smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-users
79     --- smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-users.patch0 2013-06-26 18:05:29.000000000 -0400
80     +++ smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-users 2014-07-28 14:37:01.000000000 -0400
81     @@ -146,8 +146,8 @@ if ($Del) {
82    
83     if ((db_get(\%accounts, $username)) && (db_get_type(\%accounts, $username) eq "user")) {
84     my $yn = 'yes';
85     - my $userdir = `cat /etc/passwd|grep "^$username:"|cut -d":" -f6`;
86     - print "$userdir\n";
87     + my $userdir = `cat /etc/passwd|grep "^$username:"|cut -d":" -f6|tr -d '\n'`;
88     + print "user folder: '$userdir'\n";
89     if ( $userdir eq "/home/e-smith/files/users/$username" )
90     {
91     if (! $Frc) {

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