Changeset 8ac1bcd


Ignore:
Timestamp:
10/24/18 18:30:50 (7 years ago)
Author:
Edwin Eefting <edwin@datux.nl>
Branches:
master, perl-5.22
Children:
6856db8
Parents:
8b3c2d2
Message:

SSL support option fetchmail. abort task function fixed. backup-test to smbservers always succeeded.

Location:
npl/syn3/webint
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • npl/syn3/webint/src/backup/syn3backup.php

    r8b3c2d2 r8ac1bcd  
    4141function TestSmb($new_smbserver,$new_smbshare,$new_smbdomain,$new_smbuser,$new_smbpasswd)
    4242{
    43         $ret=Cmd( "smbclient -c 'put /etc/HOSTNAME syn3test.txt ; rm syn3test.txt' -U '$new_smbuser' -W '$new_smbdomain' '//$new_smbserver/$new_smbshare' '$new_smbpasswd'", '', $out, $err );
     43        $ret=Cmd( "smbclient -s /dev/null -c 'put /etc/HOSTNAME syn3test.txt ; rm syn3test.txt' -U '$new_smbuser' -W '$new_smbdomain' '//$new_smbserver/$new_smbshare' '$new_smbpasswd'", '', $out, $err );
    4444
    4545        if ($ret!=0 || $out)
  • npl/syn3/webint/src/fetchmail/editaccount.php

    r8b3c2d2 r8ac1bcd  
    1 <? 
     1<?
    22
    33$LEVEL=10;
     
    99Title(_EditAccount($_REQUEST[name]));
    1010
    11 Tip(_TipEditAcount()); 
     11Tip(_TipEditAcount());
    1212
    1313//load current values
     
    7676
    7777<? FormStart($TITLE);?>
    78        
     78
    7979<table>
    8080<tr>
     
    8989        <td><?=_MailProtocol();?>
    9090        <td><?Select("new_proto",array("pop3"=>"POP3","imap"=>"IMAP"),$errors);?>
     91         <? InputCheckBox("new_ssl");?> SSL
    9192</tr>
    9293<tr>
     
    9596</tr>
    9697</table>
    97        
     98
    9899<p>
    99100<?InputCheckBox("new_keep");?>
     
    104105
    105106<?
    106 /* 
     107/*
    107108(C) 2004-2013 DatuX - info@datux.nl
    108109
     
    124125        echo _UsedByMultipleUsers();
    125126        echo "<p>";
    126        
     127
    127128        if ($new_multidrop=='on')
    128129        {
     
    137138                InputText("new_to",$errors);
    138139        }
    139 ?>     
     140?>
    140141
    141142<p>
     
    146147
    147148<?
    148 /* 
     149/*
    149150(C) 2004-2013 DatuX - info@datux.nl
    150151
     
    165166        if ($test)
    166167        {
    167                
     168
    168169                if ($test[ok])
    169170                        echo "<h2>"._MailBoxTestOK()."</h2>";
     
    176177
    177178<? Foot(); ?>
    178 
  • npl/syn3/webint/src/fetchmail/fm.php

    r8b3c2d2 r8ac1bcd  
    11<?
    2 /* 
     2/*
    33(C) 2004-2013 DatuX - info@datux.nl
    44
     
    2424        //returns configfile for accountname
    2525        function fm_ConfFile($account)
    26         {       
     26        {
    2727                return (FM_CONFDIR."/$account");
    2828        }
     
    4848                $ret[out]=$out;
    4949                $ret[err]=$err;
    50                 return ($ret); 
     50                return ($ret);
    5151        }*/
    5252
     
    5454        //the variables that are parsed and returned are defined in $vartypes.
    5555        //s=single value
    56         //m=multiple values (stored in array)   
     56        //m=multiple values (stored in array)
    5757        //k=keyword (value will be set to 1 if keyword is found)
    5858        function fm_Load($account)
     
    6565                        "proto"         =>'s',
    6666                        "keep"          =>'k',
     67                        "ssl"           =>'k',
    6768                        "aka"           =>'m',
    6869                        "smtpaddress"=>'s'
     
    7879                        $varname=$matches[1];
    7980                        $value=$matches[2];
    80                        
    81                         //strip quotes 
     81
     82                        //strip quotes
    8283                        $value=str_replace("'","",$value);
    8384                        $type=$vartypes[$varname];
     
    9394                                        $ret[$varname]='on';
    9495                                        break;
    95                         }                               
     96                        }
    9697                }
    9798                return ($ret);
     
    102103                $state=fm_GetState($account);
    103104                if ($state[pid])
    104                 {       
     105                {
    105106                        posix_kill($state[pid],9);
    106107                        sleep(5);
     
    124125                $raw[]="server '$config[server]'";
    125126                $raw[]="timeout 30";
    126                 foreach ($config[aka] as $value)               
     127                foreach ($config[aka] as $value)
    127128                {
    128129                        if ($value)
     
    135136                if ($config[keep]=='on')
    136137                        $raw[]="keep";
     138                if ($config[ssl]=='on')
     139                        $raw[]="ssl";
    137140                //$raw[]="bsmtp -";
    138141                $raw[]="smtpaddress '$config[smtpaddress]'";
     
    145148        function fm_TestConfig($config)
    146149        {
    147                 $raw=fm_ConfigToRaw($config);           
     150                $raw=fm_ConfigToRaw($config);
    148151
    149152                $tmp="/tmp/fetchmailtest";
     
    156159                $ret[out]=$out;
    157160                $ret[err]=$err;
    158                 return ($ret); 
     161                return ($ret);
    159162        }
    160163
     
    167170                $filename=fm_ConfFile($account);
    168171
    169                 $raw=fm_ConfigToRaw($config);           
     172                $raw=fm_ConfigToRaw($config);
    170173
    171174                FileWrite($filename,$raw);
     
    192195
    193196        //returns:
    194         //[ok]=1 
     197        //[ok]=1
    195198        //[msg] message
    196199        //[time] timestamp
     
    201204                if (
    202205                        is_file($conffile.".out") &&
    203                         is_file($conffile.".err") && 
     206                        is_file($conffile.".err") &&
    204207                        is_file($conffile.".code"))
    205208                {
    206                
     209
    207210                        $code=FileReadRaw($conffile.".code");
    208211                        $ret[ok]=(($code==1)||($code==0));
     
    212215                                $msg=FileRead($conffile.".err");
    213216                        $ret[msg]=implode("<br>",$msg);
    214                        
     217
    215218                        $stat=stat($conffile.".out");
    216219                        $ret['time']=$stat[mtime];
    217220                }
    218        
     221
    219222                //is running?
    220223                $pid=file_get_contents("/tmp/fetchmail.pid");
     
    226229                $ret['pid']=$pid;
    227230        }
    228                
    229                 return ($ret);
    230         }
    231 
    232    
    233    
    234 
     231
     232                return ($ret);
     233        }
  • npl/syn3/webint/src/sessionlock.php

    r8b3c2d2 r8ac1bcd  
    11<?
    2 /* 
     2/*
    33(C) 2004-2013 DatuX - info@datux.nl
    44
     
    2424                global $lock_fh;
    2525                global $lock_filename;
    26                
     26
    2727                flock($lock_fh, LOCK_UN);
    28                 fclose($lock_fh);       
    29                
     28                fclose($lock_fh);
     29
    3030                //kill any remaining sub processes that still have our file open
    31                 `fuser -9 -k $lock_filename`;
     31                `/usr/bin/fuser -9 -k $lock_filename`;
    3232
    3333                unlink($lock_filename);
    3434        }
    35        
     35
    3636        //in commandline mode we just use plain session starting...
    3737        if (!$_SERVER[argv])
     
    4646                        $session_id=session_id();
    4747                }
    48        
     48
    4949                //determine lockfile for this session
    5050                //preg replace is for security!!
    5151                $lock_filename="/tmp/lock.".preg_replace("/^[a-f0-9]/","",$session_id);
    52        
     52
    5353
    5454                if ($_GET[lock_abort])
    55                 {
     55                { 
    5656                        //kill processes that holds the lock
    57                         `fuser -9 -k $lock_filename`;
     57                        `/usr/bin/fuser -9 -k $lock_filename`;
    5858                        Redirect(preg_replace("/lock_abort=1/","",$URI));
    5959                }
    60                
     60
    6161                //see if this session can be locked
    6262                $lock_fh = fopen($lock_filename, "w");
     
    8383                                else
    8484                                        $abortURI="$URI?lock_abort=1";
    85        
     85
    8686                                LinkButton(_AbortLockingProcess(),$abortURI);
    8787                                echo "</tr>";
     
    9494                        Redirect($URI);
    9595                        exit;
    96                 } 
    97                
     96                }
     97
    9898                register_shutdown_function ("removelock");
    9999
     
    112112                }
    113113        }
    114        
     114
    115115        session_start();
    116116?>
  • npl/syn3/webint/webint.build

    r8b3c2d2 r8ac1bcd  
    1 6567
     16568
  • npl/syn3/webint/webint.md5

    r8b3c2d2 r8ac1bcd  
    11911944e1f535bed6e7f16e41d96abeba5f56  ./src/backup/startrestorefiles.php
    120120678555e8cf13f518a7377cd39824a64d  ./src/backup/startrestore.php
    121 f5f46a2712175be9659b2d227a6654f5  ./src/backup/syn3backup.php
     1214ea6c1dfdd44a54c1454ec95b15f90f0  ./src/backup/syn3backup.php
    12212206540e48b49b2b69168ccda00e865e50  ./src/backup/wizardchoose.php
    123123818978bae75fd32160fbceb342002f2e  ./src/backup/wizardman.php
     
    1981983fb8ed50605a860855713f5836010ab4  ./src/examplemodule/wizardman.php
    1991990ae0ac074ec96d4184545b12ee335ae1  ./src/favicon.ico
    200 686325f0e39ea2b16992cca2c7805706  ./src/fetchmail/editaccount.php
     200c1bb8926d59dfd15a54f5595f04fb723  ./src/fetchmail/editaccount.php
    20120131fa0cae2724ac5f4b4e0cbb1201dc52  ./src/fetchmail/fetchmail.sh
    202 fef605062944dc1cad3f4bd87d015979  ./src/fetchmail/fm.php
     202ab8fc96fe04ad052ddd1e18c822779ec  ./src/fetchmail/fm.php
    203203ba743fea268407f080bca4e306748493  ./src/fetchmail/lang_deD.php
    2042045f73887c0948c07cc2c612407926dac4  ./src/fetchmail/lang_de.php
     
    10001000840b923c6832539ffa374ab1b5bfd04c  ./src/services/svcman.php
    100110013fb6f3f7eea029703cb956069bf7ee2b  ./src/services/svc.php
    1002 cc7c71e5ca6a42047cd1a006437de0f4  ./src/sessionlock.php
     1002963a714155112f9d49a6715cd7c39e73  ./src/sessionlock.php
    1003100327e9f8953c42935fd49355d38ff01215  ./src/settings/lang_deD.php
    100410041667ffca522a9b7710d9c0abd8bc6f95  ./src/settings/lang_de.php
     
    116011603d8b121024940b3004ca67bacb88b74e  ./updatelang.sh
    11611161e15c0d77cf349ff3f2c55bf1b48ea567  ./upload.sh
    1162 42fbe1c601c88923318f610cb2319f58  ./webint.pkg
     1162f01bce7a60941ecf82a53039a6c807d5  ./webint.pkg
    1163116305d46c478b4e8c14eafeb686a5b8c064  ./webint.SlackBuild
    1164 3db1ee2be91a49d10c7479486b5fb458  ./webint.SlackBuild.log.gz
     1164d552136d85965a50bcf591ebdfa035a7  ./webint.SlackBuild.log.gz
    11651165693ffd7c59a1fe2b34276bec14f3ebfb  ./zones.conf
Note: See TracChangeset for help on using the changeset viewer.